Page 1 of 1

Check custom log on windows; search for specific strings

Posted: Wed May 13, 2020 3:05 pm
by mrjsokol
Hello all,

Im about 30 days into nagios xi utilizing the platform toward a windows primarily environment. I was able to monitor windows logs in event log but trying to utilize a third party plugin(check_files) and made a custom cmd against it. Attached to this post is the plugin. Getting the that it cant access the log file, which I have been able to access the main dir of win machines with other plugins so not so sure what is going on. Attached are the attempts with the paths used as well.
attempt3.PNG
attempt2.PNG
attempt1.PNG
There is one more attempt but max is 3 files and apparently cant attach the plugin but will provide the link.

(Windows clients) Monitoring custom logs

Posted: Thu May 14, 2020 7:17 am
by mrjsokol
Hello all,

Ive been successful on monitoring windows logs but cant seem to find the plugin that nagios officially supports for monitoring custom logs. I have tried a few third party plugins but was un-successful in reading the log itself from what im assuming is related to a permission issue because the directory is the C:\. Can anyone point me in the correct direction to log custom txt and be able to set args against that command/plugin to specify when to notify admin console for a warning or critical state. I am currently using nagios in a passive manager with ncpa as my main client.

Re: Check custom log on windows; search for specific strings

Posted: Thu May 14, 2020 1:16 pm
by ssax
That plugin is for checking logfiles on a linux/unix system on the local system, it won't work across the network or on windows systems.

The only windows one I'm aware of is check_logfiles, you can find it here:

Code: Select all

https://labs.consol.de/nagios/check_logfiles/index.html
See attached for a binary that I've compiled for 64bit. They don't offer binaries for download but you're free to compile it yourself, I spent the time and compiled it for customers.

NSClient can do it as well:

Code: Select all

https://docs.nsclient.org/reference/windows/CheckEventLog/#using-real-time-monitoring