Page 1 of 1

NSClient questions

Posted: Tue Feb 11, 2020 4:53 pm
by Bitflogger
Hello,

I am running v5.6.9 on a 64-bit VM CentOS 7 server.

1) Can I use either the check_logfile module, and/or the check_logfiles program under NSClient 0.5.1.44 ? The program does not seem to be installed with NSClient as in previous versions.

2) I would vastly prefer to run a single-line command from Nagiso XI, since I generally do not have access to the client server and its NSClient .ini file.

I would like to run something like:

check_logfile file=C:\\Users\\Public\\Documents\\log.txt filter= ... critical=... warning=...

The filter options are listed in many web pages, but no indication that I can find about how to string options together within a filter.

Any help or advice would be greatly appreciated!

Earl

Re: NSClient questions

Posted: Wed Feb 12, 2020 10:53 am
by lmiltchev
The NSClient++ documentation is quite confusing, and there are no good examples... :(

I think, you could use something like this:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H <ip address> -c check_logfile -a file="C:\\Users\\Public\\Documents\\log.txt" filter="line like 'Failed'" top-syntax='${status}: ${count}/${total} matches' warn= count > 0' 'crit= count > 3'
Note: I used a keyword "Failed" in the example above, but you could use whatever is relevant to you.

Hope this helps.

Re: NSClient questions

Posted: Wed Feb 26, 2020 3:41 pm
by Bitflogger
Thanks! Please lock the case.

Earl

Re: NSClient questions

Posted: Wed Feb 26, 2020 4:01 pm
by lmiltchev
I am glad I was able to help Earl! I am locking the thread.