Monitoring event id in Nagios ystem.

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
imran_khan
Posts: 196
Joined: Mon May 27, 2013 3:16 pm

Re: Monitoring event id in Nagios ystem.

Post by imran_khan »

Hello,

I want to configure alert once particular event id generate in windows server.

Thanks,
Imran Khan.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Monitoring event id in Nagios ystem.

Post by abrist »

You are checking with "filter=new". Is the event still considered "new"?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
User avatar
mickem
Posts: 16
Joined: Tue Oct 08, 2013 2:17 am
Location: Stockholm, SWEDEN
Contact:

Re: Monitoring event id in Nagios ystem.

Post by mickem »

The syntax used in this thread is horribly old and does simply not work.

please upgrade to newer version and use the filter syntax present in 0.4.1 it will work much more easily and much more consistently.


// Michael Medin
// Michael Medin @mickem, blog.medin.name

Author of NSClient++ - http://nsclient.org
NSClient++ 0.4.2 Documentation: http://docs.nsclient.org
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Monitoring event id in Nagios ystem.

Post by lmiltchev »

@ imran_khan
Let us know if mickem's suggestion fixed your issue.
Be sure to check out our Knowledgebase for helpful articles and solutions!
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Monitoring event id in Nagios ystem.

Post by slansing »

@Michael Medin

Can you provide imran_khan with the correct syntax when he upgrades to 0.4.1?
User avatar
mickem
Posts: 16
Joined: Tue Oct 08, 2013 2:17 am
Location: Stockholm, SWEDEN
Contact:

Re: Monitoring event id in Nagios ystem.

Post by mickem »

Code: Select all

./check_nrpe -H IP_Address -p 5666 -c CheckEventLog -a filter=new file=all MaxWarn=1 MaxCrit=2 filter-generated=\<30 filter+eventID=="4111" filter+eventType==all filter=all
With 0.4.1. would be:

Code: Select all

./check_nrpe -H IP_Address -p 5666 -c CheckEventLog -a file=all MaxWarn=1 MaxCrit=2 "filter=generated\>-30 AND id=4111"
Just for completion 0.4.2:

Code: Select all

./check_nrpe -H IP_Address -p 5666 -c check_eventlog -a file=all "crit=count>0" "filter=generated\>-30 AND id=4111"
Not sure about "file=all" though but that goes for all versions really. Worth noticing is that if the log is not found Application is used so my guess is that that is what happens here and log=Application should be used.
In 0.4.2 the newer APIs no longer fall back to Application so log would need to be correct in that version.

// Michael Medin
// Michael Medin @mickem, blog.medin.name

Author of NSClient++ - http://nsclient.org
NSClient++ 0.4.2 Documentation: http://docs.nsclient.org
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Monitoring event id in Nagios ystem.

Post by lmiltchev »

Thanks, mickem!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked