Page 1 of 2
Service Status Information not being displayed
Posted: Mon May 08, 2017 8:48 am
by gga_py
I have a service with the following output:
plugin_output=HTTP OK: HTTP/1.1 302 Movido temporálmente - 158 bytes in 0,001 second response time
It's in spanish, the problem is the "á" character. If I deleted it in the status.dat file the status shows in the web page but it obviously get overwritten in the next check.
Is there a way I can make nagios accept a plugin output in another language?.
Re: Service Status Information not being displayed
Posted: Mon May 08, 2017 10:52 am
by dwhitfield
What's the output of the following commands:
Code: Select all
./check_http -V
localectl status
cat /etc/*-release
I want to make sure I have the right testing environment, so I have a couple of other questions. Did you install the *plugins* from a repo or compile from source? What version of *Core* are you using? Was it compiled from source or installed from distro repos?
I initially tested on CentOS 7, with LANG=es_US, and check_http 2.0.3, and I was not able to reproduce this behavior, but I compiled under English, so thinking that's where my issue in testing may be...but it could be a problem with the type of Spanish, or with the OS version.
Re: Service Status Information not being displayed
Posted: Mon May 08, 2017 12:05 pm
by gga_py
I forgot to mention that NRPE is involved.
Server Nagios 4.3.1 compiled from source, including plugins.
localectl status
System Locale: LANG=en_GB.UTF-8
LANGUAGE=en_GB:en
VC Keymap: n/a
X11 Layout: latam
X11 Model: pc105
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.2 LTS"
NAME="Ubuntu"
VERSION="16.04.2 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.2 LTS"
VERSION_ID="16.04"
HOME_URL="
http://www.ubuntu.com/"
SUPPORT_URL="
http://help.ubuntu.com/"
BUG_REPORT_URL="
http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
Client Installed from distro rep
check_http v2.1.1 (monitoring-plugins 2.1.1)
System Locale: LANGUAGE=en_US:en
VC Keymap: n/a
X11 Layout: latam
X11 Model: pc105
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
HOME_URL="
http://www.debian.org/"
SUPPORT_URL="
http://www.debian.org/support/"
BUG_REPORT_URL="
https://bugs.debian.org/"
Re: Service Status Information not being displayed
Posted: Mon May 08, 2017 12:14 pm
by dwhitfield
Is it possible to compile the plugins from source on Debian? Although similar, monitor plugins are not technically our plugins.
Also, I see a lot of English there. What's the output of env | grep LANG on the Debian side for whatever user is running the checks?
Re: Service Status Information not being displayed
Posted: Mon May 08, 2017 12:17 pm
by gga_py
Debian
env | grep LANG
LANG=en_US.UTF-8
LANGUAGE=en_US:en
Re: Service Status Information not being displayed
Posted: Mon May 08, 2017 12:47 pm
by tgriep
You could try doing this for the command that not displaying the output when it is ran and see if this works for you.
Setting "LANG=C LC_ALL=C" before that command which should force the system language to whatever language the strings in the plugin/binary/application are written in, only for the duration of that command.
You can add that to the check_nrpe command like the example below and see if the command forces it to English and the status is displayed.
Code: Select all
LANG=C LC_ALL=C /usr/local/nagios/libexec/check_nrpe -H $HOSTADDRESS$ -t 30:CRITICAL -c $ARG1$ $ARG2$
Re: Service Status Information not being displayed
Posted: Mon May 08, 2017 1:24 pm
by gga_py
That didn't work tgriep. English wasn't forced.
Now I'll try to compile plugins from source as dwhitfield suggested.
Re: Service Status Information not being displayed
Posted: Mon May 08, 2017 1:28 pm
by dwhitfield
Debian instructions are something like halfway down the page at
https://support.nagios.com/kb/article.php?id=569
Re: Service Status Information not being displayed
Posted: Mon May 08, 2017 2:09 pm
by gga_py
dwhitfield, I compiled the plugins from source. Made no difference.
Re: Service Status Information not being displayed
Posted: Mon May 08, 2017 3:37 pm
by tgriep
I am thinking it is a setting or configuration setting for the Apache Web server on the Nagios system that is causing the error and not Nagios Core itself.
If you look at the nagios.log file do you see that entry for that service check and does it look correct?
Can you post a screen shot of what is displayed in the GUI so we can see what it looks like?
You may want to enable this setting for the Apache server and see if that fixes it.
https://httpd.apache.org/docs/2.4/mod/c ... ultcharset
You would check the main httpd.conf file for that settings.