GUI status information UTF-8 characters
Posted: Wed Dec 23, 2015 5:33 am
Enviroment
Nagios Core 4.1.1
OS: Linux Debian 8
Kernel: 3.16.0-4-amd64
The instance is running on an VMware ESXi 5.5.0
Compiled from source
Problem description
Status Information work fine in command line, but not show on GUI.
Example:
./check_printer X.X.X.X public 1 toner 4
OK - Tóner magenta 60% (60 of 100 left) | toner=60;20;0;0;100
X.X.X.X = ip address
The printer use Spanish as language. Answer back by SNMP using UTF-8 characters
But in the GUI can't show Status Information, no errors, only blank
On nagios.log
[1450393200] CURRENT SERVICE STATE: RICOH_MP_C4503;Estado toner MAGENTA;OK;HARD;1;OK - Left 100% of Tner magenta
Look at charset error....
In Spanish the word "toner" has an accent mark in "o"..
Apache virtual host conf has this entry:
AddDefaultCharset UTF-8
/usr/local/nagios/etc/cgi.cfg disable html tags:
escape_html_tags=0
Locale settings:
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
Thanks.
Nagios Core 4.1.1
OS: Linux Debian 8
Kernel: 3.16.0-4-amd64
The instance is running on an VMware ESXi 5.5.0
Compiled from source
Problem description
Status Information work fine in command line, but not show on GUI.
Example:
./check_printer X.X.X.X public 1 toner 4
OK - Tóner magenta 60% (60 of 100 left) | toner=60;20;0;0;100
X.X.X.X = ip address
The printer use Spanish as language. Answer back by SNMP using UTF-8 characters
But in the GUI can't show Status Information, no errors, only blank
On nagios.log
[1450393200] CURRENT SERVICE STATE: RICOH_MP_C4503;Estado toner MAGENTA;OK;HARD;1;OK - Left 100% of Tner magenta
Look at charset error....
In Spanish the word "toner" has an accent mark in "o"..
Apache virtual host conf has this entry:
AddDefaultCharset UTF-8
/usr/local/nagios/etc/cgi.cfg disable html tags:
escape_html_tags=0
Locale settings:
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
Thanks.