Hi all,
I've setup an eventlog() item to collect entries from a custom windows event log (i.e. "Custom Log"), and this appears to be working fine.
I'd like to configure a trigger to alert if the log source is "Testing" and if "text-A" is found in the event description, and if possible to clear the alert if "text-B" is found later (same log source).
Note: the qoutes (") aren't in the actual trigger, they just mask my actual names for security purposes.
Having searched the forum I've found a similar trigger posted by "doofkopf" which I've modified to use my log source / text-A / text-B however it seems to work intermittently.
Here is the trigger I'm trying to use:
((({TRIGGER.VALUE}#2)|({Template_Eventlog:eventlog["Custom Log"].nodata(30)}#1))&((({Template_Eventlog:eventlog["Custom Log"].logsource("Testing")}=1)&({Template_Eventlog:even tlog["Custom Log"].str("text-A")}=1))|(({TRIGGER.VALUE}=1)&(({Template_Eventlog :eventlog["Custom Log"].logsource("Testing")}#1)|({Template_Eventlog:even tlog["Custom Log"].str("text-B")}#1)))))
So, I currently have an action defined to report when the trigger changes and this is working, however I'm not sure the {ITEM.LASTVALUE} is reporting the actual value that caused the trigger to change. I say this because the value it reports in the e-mail is sometimes the "text-A" / "text-B" that I'm searching for - but other times it's a completely different event log entry!
My questions are:
a) Is this trigger (see above) wrong in some way?
b) Is the {ITEM.LASTVALUE} "out of synch" somehow? (the item collects every 60 seconds, but the events are written about 20 secs apart)
Hopefully someone can point out the flaw in this trigger, or maybe share one of their own that performs a similar function.
Thanks,
DSon.
I've setup an eventlog() item to collect entries from a custom windows event log (i.e. "Custom Log"), and this appears to be working fine.
I'd like to configure a trigger to alert if the log source is "Testing" and if "text-A" is found in the event description, and if possible to clear the alert if "text-B" is found later (same log source).
Note: the qoutes (") aren't in the actual trigger, they just mask my actual names for security purposes.
Having searched the forum I've found a similar trigger posted by "doofkopf" which I've modified to use my log source / text-A / text-B however it seems to work intermittently.
Here is the trigger I'm trying to use:
((({TRIGGER.VALUE}#2)|({Template_Eventlog:eventlog["Custom Log"].nodata(30)}#1))&((({Template_Eventlog:eventlog["Custom Log"].logsource("Testing")}=1)&({Template_Eventlog:even tlog["Custom Log"].str("text-A")}=1))|(({TRIGGER.VALUE}=1)&(({Template_Eventlog :eventlog["Custom Log"].logsource("Testing")}#1)|({Template_Eventlog:even tlog["Custom Log"].str("text-B")}#1)))))
So, I currently have an action defined to report when the trigger changes and this is working, however I'm not sure the {ITEM.LASTVALUE} is reporting the actual value that caused the trigger to change. I say this because the value it reports in the e-mail is sometimes the "text-A" / "text-B" that I'm searching for - but other times it's a completely different event log entry!
My questions are:
a) Is this trigger (see above) wrong in some way?
b) Is the {ITEM.LASTVALUE} "out of synch" somehow? (the item collects every 60 seconds, but the events are written about 20 secs apart)
Hopefully someone can point out the flaw in this trigger, or maybe share one of their own that performs a similar function.
Thanks,
DSon.


Comment