Monitor Keywords for client logs and return status to nagios

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ISGPRDFT
Posts: 1
Joined: Fri Jan 22, 2021 12:03 am

Monitor Keywords for client logs and return status to nagios

Post by ISGPRDFT »

i want to monitor certain keywords like "error" or warning" in client logs file.How to setup and to monitor this keyword ?
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: Monitor Keywords for client logs and return status to na

Post by vtrac »

Hi,
You can try the "check_log" script which came standard with Nagios XI located at:

Code: Select all

/usr/local/nagios/libexec/check_log
Example: Check "/var/log/messages" for word "error:":
(NOTE: the very first runs of check_log will initialize the "oldlog" file, so no output or checking is done on the first run of check_log.)

Code: Select all

./check_log -F /var/log/messages -O /var/log/oldlog -q "error:" -w 2
or you could try searching the Nagios Exchange web page:
https://exchange.nagios.org/


Regards,
Vinh
ISGPRDCIS
Posts: 1
Joined: Fri Mar 26, 2021 2:21 am

Re: Monitor Keywords for client logs and return status to na

Post by ISGPRDCIS »

Still encountering issue :

This one parameter I set at my nagios server using check_nrpe :
$ /usr/local/nagios/libexec/check_nrpe -H xxx.xxx.xxx.xxx -t 30 -c keywords
NRPE_NT failed to create process, exiting...


This is window server. But it doesnt work.
command[keywords]=C:\NRPE_NT\plugins\check_log -F D:\emaileater_20210308.out.log -O D:\oldlog -q "Detected invalid subscription" -w 2

for the check_log,i download the plugin from the nagios xi >Admin > Manage Plugins >Check_log ...so it is not compatible to windew?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Monitor Keywords for client logs and return status to na

Post by ssax »

Correct, not compatible with Windows.

Locking thread, ticket received, we will continue support through the ticket.

Thank you!
Locked