[Nagiosplug-help] encoding of non-ascii plugin output in nagios3
John McPherson
jmcpherson+nagios at global-pix.com
Mon Apr 20 06:49:47 CEST 2009
Hi,
We've just upgraded our Debian GNU/Linux machine from nagios2 to nagios3.0.6.
We have a custom check command that reads a temperature from the /sys
filesystem, and outputs something like
"OK - 30.1°C|temperature=30.1"
with the degree sign, encoded with utf-8. This worked fine with nagios2.
Now with nagios3, the string gets converted as if it were
Latin1/iso-8859-1 because it appears in the CGI output as
"OK - 30.1°C". The actual string in the HTML file looks like
<TD CLASS='dataVal'>OK - 31.0°C</TD>
I tried setting the LANG variable in the startup script so that nagios
runs with a .UTF-8 locale, but that didn't make any difference.
Some part of nagios is assuming that its input is 8859-1 and html
escaping it; is there any way to get it to be utf-8 aware?
Thanks
John McPherson
ps - I'm aware that the degree sign is in iso-8859-1, and I could
make my check command output that, but I'd rather get a utf-8 solution
working for when we want other non-ascii characters.
More information about the Help
mailing list