NSClient++ check_logfile NRPE not alerting
Posted: Wed Feb 05, 2020 1:43 pm
Hi,
I'm having an issue getting a Nagios alert generated when wanting to add monitoring on a file on a remote Windows system.
I have followed documentation, in particular "Demo 3: Passive realtime checks via NRPE" here: https://www.medin.name/blog/2012/10/26/ ... sentation/ and put in the configuration below, but for the moment I'm just not understanding why I retrieve the check and file extract (when adding 'show-all') on my Nagios server but receive no alerts for the lines.
Sample file content:
INFORMATION : LOG : Creating Log on 05/02/2020 at 08:10:00
INFORMATION : Application : Auto import enabled! at 08:10:01
INFORMATION : Error : Unable to connect at 08:10:04
There are time entries in the log file (for example 08:10:01), but I have set the "column separator / column split to " : " to overcome this.
My Nagios Server - v4.4.5
NSClient++ on Windows client - vNSCP-0.5.2.35-x64
Disk, CPU and Memory checks have already been working fine for the client for many months.
On the Client, I have added the sections below in the nsclient.ini file and restarted services with each change:
; MODULES
[/modules]
.......
; Load Check_LogFile Module
CheckLogFile = enabled
SimpleCache = enabled
SimpleFileWriter = enabled
; ACTIVATE REAL-TIME SUPERVISION
[/settings/logfile/real-time]
enabled = true
; CREATE SEARCH FILTER
[/settings/logfile/real-time/checks/logfile]
file = C:\test\logfile.txt
destination = CACHE,FILE
column-split=' : '
filter = column1 like 'INFORMATION'
warn = column2 like 'Error'
From my Nagios server command line, if I run /usr/local/nagios/libexec/check_nrpe -H <IP> -c check_logfile -n -a file='C:\test\logfile.txt' column-split=' : ' filter="column1 like 'INFORMATION'" warn="column2 like 'Error'"
I receive output below indicating one warning threshold found, so I believe the nrpe check from my server is working:
217/222 (INFORMATION )
My check command in my nagios config is:
check_command check_nrpe!check_logfile -n -a file='C:\test\logfile.txt' column-split="' : '" filter="column1 like 'INFORMATION'" warn="column2 like 'ERROR'" show-all
Any pointers in the right direction would be appreciated.
Thank you
I'm having an issue getting a Nagios alert generated when wanting to add monitoring on a file on a remote Windows system.
I have followed documentation, in particular "Demo 3: Passive realtime checks via NRPE" here: https://www.medin.name/blog/2012/10/26/ ... sentation/ and put in the configuration below, but for the moment I'm just not understanding why I retrieve the check and file extract (when adding 'show-all') on my Nagios server but receive no alerts for the lines.
Sample file content:
INFORMATION : LOG : Creating Log on 05/02/2020 at 08:10:00
INFORMATION : Application : Auto import enabled! at 08:10:01
INFORMATION : Error : Unable to connect at 08:10:04
There are time entries in the log file (for example 08:10:01), but I have set the "column separator / column split to " : " to overcome this.
My Nagios Server - v4.4.5
NSClient++ on Windows client - vNSCP-0.5.2.35-x64
Disk, CPU and Memory checks have already been working fine for the client for many months.
On the Client, I have added the sections below in the nsclient.ini file and restarted services with each change:
; MODULES
[/modules]
.......
; Load Check_LogFile Module
CheckLogFile = enabled
SimpleCache = enabled
SimpleFileWriter = enabled
; ACTIVATE REAL-TIME SUPERVISION
[/settings/logfile/real-time]
enabled = true
; CREATE SEARCH FILTER
[/settings/logfile/real-time/checks/logfile]
file = C:\test\logfile.txt
destination = CACHE,FILE
column-split=' : '
filter = column1 like 'INFORMATION'
warn = column2 like 'Error'
From my Nagios server command line, if I run /usr/local/nagios/libexec/check_nrpe -H <IP> -c check_logfile -n -a file='C:\test\logfile.txt' column-split=' : ' filter="column1 like 'INFORMATION'" warn="column2 like 'Error'"
I receive output below indicating one warning threshold found, so I believe the nrpe check from my server is working:
217/222 (INFORMATION )
My check command in my nagios config is:
check_command check_nrpe!check_logfile -n -a file='C:\test\logfile.txt' column-split="' : '" filter="column1 like 'INFORMATION'" warn="column2 like 'ERROR'" show-all
Any pointers in the right direction would be appreciated.
Thank you