Hello all,
I have set up an item, that uses the Active Check log[<file>,<pattern>...]
The Key looks thus:
log[/tmp/syslog.log,Notification]
I have a Trigger set up, looking for the regexp 'Notification' and it all works great, except for one bit.
Upon reading the manual, the explanation about 'log' says that it will use 2 things from the DB to determine whether it has read the most recent iteration of the file or not, 1 being the file size (lastlogsize) and the second being a time stamp (lastclock).
Basically, what I am getting is every iteration within the file being reported on, not just the last. The manual seems to imply this shouldn't be the case.
For instance, the syslog may have a line item that reads:
# Notification : LINE 1
Then, the trigger will activate and I will get an alert, with all the detail, which is great. However, if another notification occurs in the log file, for example.
# Notification : LINE 1
# Everything is ok
# Notification : LINE 3
It will record, in its history, both lines, the new one AND the old one again. So I get 2 email notifications since it has found 2 again.
I checked the DB and can confirm that the 'lastclock' AND 'lastlogsize' do update as they should, but it still alerts me to every iteration in the log file every time a new one is found. (So you can imagine, if I have 60 Notifications, I don't want to get 60 alerts all over again when its finds another one. And I don't want to fill up the history records with ones I already know about)
So, the questions are:
1. Do I have something missing from my KEY to say that it should only look for new iterations since last check?
2. Is there some other caveat I have forgotten to include?
Any direction would be greatly appreciated.
Regards,
JC
p.s Current version is 1.8.3 for both server and agent, that's probably important
I have set up an item, that uses the Active Check log[<file>,<pattern>...]
The Key looks thus:
log[/tmp/syslog.log,Notification]
I have a Trigger set up, looking for the regexp 'Notification' and it all works great, except for one bit.
Upon reading the manual, the explanation about 'log' says that it will use 2 things from the DB to determine whether it has read the most recent iteration of the file or not, 1 being the file size (lastlogsize) and the second being a time stamp (lastclock).
Basically, what I am getting is every iteration within the file being reported on, not just the last. The manual seems to imply this shouldn't be the case.
For instance, the syslog may have a line item that reads:
# Notification : LINE 1
Then, the trigger will activate and I will get an alert, with all the detail, which is great. However, if another notification occurs in the log file, for example.
# Notification : LINE 1
# Everything is ok
# Notification : LINE 3
It will record, in its history, both lines, the new one AND the old one again. So I get 2 email notifications since it has found 2 again.
I checked the DB and can confirm that the 'lastclock' AND 'lastlogsize' do update as they should, but it still alerts me to every iteration in the log file every time a new one is found. (So you can imagine, if I have 60 Notifications, I don't want to get 60 alerts all over again when its finds another one. And I don't want to fill up the history records with ones I already know about)
So, the questions are:
1. Do I have something missing from my KEY to say that it should only look for new iterations since last check?
2. Is there some other caveat I have forgotten to include?
Any direction would be greatly appreciated.
Regards,
JC
p.s Current version is 1.8.3 for both server and agent, that's probably important

Comment