NSClient questions

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Bitflogger
Posts: 226
Joined: Mon Oct 16, 2017 9:24 am

NSClient questions

Post 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
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NSClient questions

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Bitflogger
Posts: 226
Joined: Mon Oct 16, 2017 9:24 am

Re: NSClient questions

Post by Bitflogger »

Thanks! Please lock the case.

Earl
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NSClient questions

Post by lmiltchev »

I am glad I was able to help Earl! I am locking the thread.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked