GUI status information UTF-8 characters
GUI status information UTF-8 characters
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.
Re: GUI status information UTF-8 characters
Can you post a link to where you downloaded the check_printer plugin?
Former Nagios Employee
Re: GUI status information UTF-8 characters
That takes the script out of the question. If you run a SNMP walk against the printer are your results in Spanish?
Former Nagios Employee
Re: GUI status information UTF-8 characters
Hi. Sorry for the delay. No, the result of snmpwalk are in English. Only when the snmp_get query include the word "toner" in the answer the result didn't see in the GUI.
Re: GUI status information UTF-8 characters
Sorry for asking the obvious here, but have you restarted the nagios and httpd(apache2) services since applying the changes to allow UTF-8?
How long ago did you compile and install core? We did release a few changes for non-english systems, but I don't know if check results were included.
Have you tested using spanish as the locale on the machine, if that's the language a lot of your stuff is in?
How long ago did you compile and install core? We did release a few changes for non-english systems, but I don't know if check results were included.
Have you tested using spanish as the locale on the machine, if that's the language a lot of your stuff is in?
Former Nagios Employee.
me.
me.
Re: GUI status information UTF-8 characters
Don't worry...
Yes, I was restarted apache and nagios services.
I was compile about 3 months ago.
And yes, I was test change the system locale to es_ES.UTF-8 and the problem persist.
Yes, I was restarted apache and nagios services.
I was compile about 3 months ago.
And yes, I was test change the system locale to es_ES.UTF-8 and the problem persist.
-
jfrickson
Re: GUI status information UTF-8 characters
I configured snmp on one of my systems to say syslocation "Tóner room". Then I ran an snmpwalk:
As you can see, snmpd returned T..ner room so I suspect either snmpd itself is having problems with utf-8, or the default language of the device is not set to utf-8.
Code: Select all
john@linux-jtgl:~$ snmpwalk -Os -c public -v 1 localhost sysLocation.0
sysLocation.0 = STRING: \"T..ner room\"
Re: GUI status information UTF-8 characters
Hi.. But, if I run the script in shell, the results it's ok, the accent mark characters show ok...
----
./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 problem is only in the GUI, if the snmp answer contain has an accent mark in some character can't show status information...
----
./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 problem is only in the GUI, if the snmp answer contain has an accent mark in some character can't show status information...
-
jfrickson
Re: GUI status information UTF-8 characters
Ok, let me check some more. I'll get back to you.tremcer wrote:Hi.. But, if I run the script in shell, the results it's ok, the accent mark characters show ok...
----
./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 problem is only in the GUI, if the snmp answer contain has an accent mark in some character can't show status information...
[EDIT] Please upload a screen shot where it is showing wrong. Thanks.