- Package:
- nagios-plugins-basic
- Source:
- monitoring-plugins
- Submitter:
- Moritz Both
- Date:
- 2023-04-26 09:21:06 UTC
- Severity:
- normal
- Tags:
Several plugins produce performance data formatted depending on the locale under which they run. Performance data is supposed to be machine-readable and should come in a fixed format, not depending on the locale. Plugins affected are at least: check_ldap, check_ntp, check_nt, check_dns. (Other plugins once were affected and have already been fixed, like check_load and check_ping.) As a result of this bug, nagiosgrapher cannot interpret the performance data of these plugins in a reliable way. Note that nagios will run under the "C" locale if started at boot time via init, but under the system locale if manually started from a shell, so the results are unpredictable. In bug #509359, a variation of this problem was discussed. It ended with the suggestion to run nagios under the system locale and everything would be fine. I would disagree with that because it means that you would have to change configuration files (for nagios and nagiosgrapher) when the system locale is changed. The rest of my systems continue to run without change when I change the system locale. In bug #531716, basically the same argumentation was used: You get what you configure. To me this philosophy is wrong. Moritz
Hi Moritz, thanks for your bugreport. Maybe you noticed that also upstream commented[1] on this bug? With kind regards, Jan. [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=531716#15
Jan, thanks for the hint, I wasn't aware that Thomas is upstream maintainer. If command line parameters and output of the plugins are supposed to be locale-specific, that's one point. I still disagree, but the main point is performance data, which should be machine-readable. A search for "locale" and "performance" in the nagios-plugins sourceforge bugtracker had no result, by the way. Thomas, could you please kindly comment on this? Regards, Moritz
By the way, the locale-dependent performance data breaks the nagiosgrapher package as it uses regular expressions for performance data matching. Is it possible to assign a bug to two packages so folks can discuss which one is in charge? Moritz
Moritz Both schrieb am Monday, den 29. August 2011: Running nagios with a locale isn't really supported. And I don't think its a good idea to support that anyway. I guess I'll unset the locale in the next nagios/icinga update. Alex
The bug still exists. Unsetting the locale in all checks seems reasonable. How's that going?
Unsetting locale seems to be overkill. All you need to do is to set LC_NUMERIC to an appropriate value (e.g. „C“). In fact, that’s what Icinga 2 does to solve this issue. Gunnar
Hi, It is Icinga 2 that got into trouble handling this… I see a lot of complains about malformed performance data due to this in exactly Icinga 2.