Command to check Windows logs

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
jamesc23
Posts: 82
Joined: Thu Jan 15, 2015 11:55 pm

Command to check Windows logs

Post by jamesc23 »

Hi,

Been looking around on the interwebs and this is the command I found, but doesn't work
$USER1$/check_nrpe -H $HOSTNAME$ -p 5666 -c CheckEventLog -a filter=new file=application MinWarn=0 MinCrit=0 filter-generated=\>1d filter+eventID=="111" filter+eventType==error filter=out filter=all

I'm trying to to monitor application log for an event ID of 111 filtering on error. The error I'm getting in Nagios console is unknown command: checkeventlog

Please kindly advise.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Command to check Windows logs

Post by WillemDH »

If you are using NSClient, you better setup real-time eventlog monitoring..
Made a basic guide here:

http://outsideit.net/real-time-eventlog-monitoring/

Hope this helps. I never tried active eventlog checks, as the load is much higher for Nagios.

Grtz

Willem
Nagios XI 5.8.1
https://outsideit.net
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Command to check Windows logs

Post by hsmith »

Thank you, Willem. @jamesc23, let us know if this works out for you!
Former Nagios Employee.
me.
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: Command to check Windows logs

Post by gormank »

For the unknown command: checkeventlog issue check the nsclient.ini for the command.

find /i checkeventlog nsclient.ini
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Command to check Windows logs

Post by hsmith »

gormank wrote:For the unknown command: checkeventlog issue check the nsclient.ini for the command.

find /i checkeventlog nsclient.ini
Thank you for the help :)
Former Nagios Employee.
me.
jamesc23
Posts: 82
Joined: Thu Jan 15, 2015 11:55 pm

Re: Command to check Windows logs

Post by jamesc23 »

Thanks all.

I've read through NSCA stuff and I believe I got all necessary steps ready. How do I create or use the command? I can see that I have a service template with check_dummy command.

Please advise.
Many thanks.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Command to check Windows logs

Post by tmcdonald »

Somewhat older docs but the process hasn't changed much:

https://assets.nagios.com/downloads/nag ... ith_XI.pdf
https://assets.nagios.com/downloads/nag ... ith_XI.pdf

Basically, if you have NSCA set up properly they should show up in Unconfigured Objects under the Admin menu, and you can run a wizard from there to import them.
Former Nagios employee
jamesc23
Posts: 82
Joined: Thu Jan 15, 2015 11:55 pm

Re: Command to check Windows logs

Post by jamesc23 »

Forgive me as I'm very new at this still. I can see unconfigured objects but that's about it. I don't know the arguments to even try to make this work. That documentation doesn't explain how to setup the service to monitor the eventlog.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Command to check Windows logs

Post by tgriep »

If they are in the Unconfigured Objects, you would click on them to import them into XI and that is how the service checks will be setup for you.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Command to check Windows logs

Post by eloyd »

Sorry, but I need to put the obvious plug in here:

Get Nagios Log Server, send your Windows logs there, make a query in NLS to check for your issue, and then send alerts through Nagios or email from NLS.

There. Commercial over.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Locked