Page 1 of 1

Empty Status Information in Nagios graphic interface

Posted: Mon Jul 09, 2018 6:12 am
by ssm_mon
Hello,

We use «Nagios Core 4.2.4», plugin «check_nrpe 3.0.1» (in this case, with «check_eventlog» command) and «NSClient++ 0.5.0.62», on Windows servers, to check these servers System and Application Logs.

The issue is the following: in some situations, Status Information (in Nagios graphic interface) appears completely empty, as seen in Picture1 (at the end of this topic), that shows the result of a Nagios Availability Report.

We found that this happens when Nagios has to display a Windows System or Application Log event that contains at least one word with cedilla characters - ç - and/or characters with accent marks (acute, grave, circumflex accents or tilde) - like «á», «à», «ê», «ã», etc.

Here is an example (obtained from the command line) where the characters that cause the issue are «ç» and «ã» in the word «invocação» (highlighted in bold red):

# ./check_nrpe -H <hostname> -c check_eventlog -a "filter=level in ('error','critical') AND source IN ('SAPIntegrationServices') AND id IN (370)" "warn=count ge 1" "crit=count ge 1" "perf-config=*(ignored:true)" "empty-syntax=%(status): Eventlog check" "detail-syntax= ---INICIO--- log=%(log), level=%(level), source=%(source), eventid=%(id), written=%(written), message=%(message)(%(count))" log=system log=application "scan-range=-21h"

CRITICAL: 1 message(s) ---INICIO--- log=Application, level=error, source=SAPIntegrationServices, eventid=370, written=20:35, message=Internal errors: Erro na invoca▒▒o na logica SAP (...)

Can someone help us please?
Thanks in advance.
Picture1 - Nagios Availability Report
Picture1 - Nagios Availability Report

Re: Empty Status Information in Nagios graphic interface

Posted: Tue Jul 10, 2018 9:46 am
by mcapra
Try leveraging the encoding parameter in your NSClient++ configuration:
https://docs.nsclient.org/reference/cli ... d-encoding

Set it to whatever encoding is being used on your Nagios Core machine.

An alternative would be to leverage some sort of wrapper script with either check_nrpe or the check_eventlog command to strip out problematic characters, but that's kinda lazy.

Re: Empty Status Information in Nagios graphic interface

Posted: Tue Jul 10, 2018 3:50 pm
by scottwilkerson
mcapra wrote:Try leveraging the encoding parameter in your NSClient++ configuration:
https://docs.nsclient.org/reference/cli ... d-encoding

Set it to whatever encoding is being used on your Nagios Core machine.

An alternative would be to leverage some sort of wrapper script with either check_nrpe or the check_eventlog command to strip out problematic characters, but that's kinda lazy.
Thanks @mcapra

Re: Empty Status Information in Nagios graphic interface

Posted: Wed Jul 11, 2018 4:52 am
by ssm_mon
Hi mcapra!
Thanks a lot for your answer!
As soon as possible, we will create the conditions to try the solutions you suggested.

Re: Empty Status Information in Nagios graphic interface

Posted: Wed Jul 11, 2018 8:42 am
by scottwilkerson
ssm_mon wrote:Hi mcapra!
Thanks a lot for your answer!
As soon as possible, we will create the conditions to try the solutions you suggested.
Let us know how it turns out

Re: Empty Status Information in Nagios graphic interface

Posted: Fri Jul 13, 2018 4:49 am
by ssm_mon
Hi mcapra!
We are very grateful for your help.
We have tried your first suggestion («Try leveraging the encoding parameter in your NSClient++ configuration: (…) Set it to whatever encoding is being used on your Nagios Core machine») and it worked fully!

Since UTF8 is the Nagios Core machine encoding (LANG=en_US.UTF-8), we added the following entry in the nsclient.ini file of a Windows machine with accented characters in its Application log events:

[/settings/default]
; NRPE PAYLOAD ENCODING
encoding = utf8

After restarting NSClient++ service on that Windows machine, Nagios began showing Status Information with accented characters instead of an empty one.

Thanks a lot again!