[Icinga-devel] Character encoding at plugin boundaries

haxtibal at t-online.de haxtibal at t-online.de
Wed Mar 9 12:38:57 CET 2016


Hi,
 
I'm looking for some hints on how Icinga plugins are supposed to behave 
regarding character encoding. The docs at 
https://www.monitoring-plugins.org/doc/guidelines.html and 
http://docs.icinga.org/latest/en/pluginapi.html are very useful and 
accurate in many situations, but lack information about character encodig 
and allowed characters. Sorry if I've overlooked something, please point me 
to correct location and ignore the part below in that case.
 
>From a plugin writers perspective you may want to receive command line 
arguments that are non-ASCII characters and apply some logic on them, and 
you may want to output characters that are above ASCII range. Say you want 
to ouput "OK - My environment temperature is 21°C" (or even the same in 
Cyrillic)
-is it possible at all?
-would you encode the degree sign to Latin-1, UTF-8, or the current locale 
settings (which may differ from default when the plugin is executed from a 
service started via init system), or some configured setting?
 
Afaik, Icinga (v1) and friends forward content mostly byte-wise. Sometimes 
they check for characters in the 7-bit ASCII range.
Passing UTF-8 and Latin-1 works, because the encoding is compatible in the 
7-bit ASCII range. In our setup we can sucessfully deal with unicode 
characters, e.g. by strictly decoding from and encoding to UTF-8 at plugin 
boundaries and having the Icinga definitions safed as UTF-8 endoded text.
 
It would be helpful to have something about that in the guidelines, what do 
you think? Otherwise, people (like we) hack down their own solution that is 
not interchangeable with others.
 
Best regards,
Tobias


<div style=\"border:0;border-bottom:1px solid black;width:100%;\"> Telekom 
Mail: Ihre Daten bleiben in Deutschland.
Jetzt persönliche E-Mail-Adresse sichern!
www.t-online.de/email-kostenlos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.icinga.org/pipermail/icinga-devel/attachments/20160309/83ceeb48/attachment.html>


More information about the icinga-devel mailing list