#551011 nagios-plugins-basic: several plugins depend on locale in performance data

#551011#5
Date:
2009-10-14 22:21:19 UTC
From:
To:
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

#551011#10
Date:
2009-10-14 23:22:44 UTC
From:
To:
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

#551011#15
Date:
2009-10-15 08:33:47 UTC
From:
To:
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

#551011#20
Date:
2011-08-29 13:02:38 UTC
From:
To:
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

#551011#25
Date:
2011-08-29 13:52:29 UTC
From:
To:
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

#551011#34
Date:
2015-07-01 10:03:33 UTC
From:
To:
The bug still exists.

Unsetting the locale in all checks seems reasonable. How's that going?

#551011#39
Date:
2015-07-01 10:33:01 UTC
From:
To:
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

#551011#44
Date:
2015-07-01 10:42:12 UTC
From:
To:
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.