nagios-common: locale problem breaks ping plugin

Bug #21187 reported by Debian Bug Importer
4
Affects Status Importance Assigned to Milestone
nagios (Debian)
Fix Released
Unknown
nagios (Ubuntu)
Fix Released
High
Tollef Fog Heen

Bug Description

Automatically imported from Debian bug report #327212 http://bugs.debian.org/327212

Revision history for this message
In , sean finney (seanius) wrote : Re: [Pkg-nagios-devel] Bug#327212: nagios-common: locale problem breaks ping plugin

severity 327212 normal
thanks

hi jerome,

On Thu, Sep 08, 2005 at 02:12:16PM +0200, Jerome Alet wrote:
> Package: nagios-common
> Version: 2:1.3-cvs.20050402-2.sarge.1
> Severity: grave
> Justification: renders package unusable

i'm readjusting the severity of this, as the nagios is still quite
installable for everyone and useable for most people. i'm also
pondering reassigning it to nagios-plugins, as i believe it is
specific plugins failing and not the nagios subsystem, but i'll
hold off on that until we get all the information necessary.

> It seems that Nagios can't parse the output of some plugins when
> the decimal point is ',' instead of '.', that's probably why
> /etc/init.d/nagios contains LC_NUMERIC=POSIX.

hmm.. strange. i would think that exporting the above would be all
that we needed, i guess not. can you give me a specific example?

> However, this doesn't seem to be sufficient if the system has
> started in a non-default locale.
>
> By modifying /etc/init.d/nagios and setting :
>
> export LC_ALL=POSIX

it'd be nice if there were some medium ground where non-relevant
locale settings could remain at what they were, so error messages etc
could remain in the right locale.

really, i'm suspecting the real fix should be in the individual plugins
(which i've actually fixed upstream in later versions), but i'll need
to see an example before i can be sure of that.

 sean

--

Revision history for this message
In , Alet (alet) wrote :

Hi again,

On Thu, Sep 08, 2005 at 09:40:03AM -0400, sean finney wrote:
> > Justification: renders package unusable
>
> i'm readjusting the severity of this, as the nagios is still quite
> installable for everyone and useable for most people. i'm also
> pondering reassigning it to nagios-plugins, as i believe it is
> specific plugins failing and not the nagios subsystem, but i'll
> hold off on that until we get all the information necessary.

OK.

> > It seems that Nagios can't parse the output of some plugins when
> > the decimal point is ',' instead of '.', that's probably why
> > /etc/init.d/nagios contains LC_NUMERIC=POSIX.
>
> hmm.. strange. i would think that exporting the above would be all
> that we needed, i guess not. can you give me a specific example?
>
> > However, this doesn't seem to be sufficient if the system has
> > started in a non-default locale.
> >
> > By modifying /etc/init.d/nagios and setting :
> >
> > export LC_ALL=POSIX
>
> it'd be nice if there were some medium ground where non-relevant
> locale settings could remain at what they were, so error messages etc
> could remain in the right locale.
>
> really, i'm suspecting the real fix should be in the individual plugins
> (which i've actually fixed upstream in later versions), but i'll need
> to see an example before i can be sure of that.

I too think the fix should be done once and for all in the plugins,
however the LC_ALL solution fixed the problem for me.

Here's what I've got :

--- CUT ---
servmediup:~# printenv |grep LC_
LC_ALL=fr_FR@euro
servmediup:~# /usr/lib/nagios/plugins/check_ping -H 134.59.53.14 -w 10,15% -c 15,20%
/bin/ping -n -U -w 10 -c 5 134.59.53.14
CRITIQUE - Impossible d'interpréter le réponse de la commande ping
servmediup:~# export LC_NUMERIC=POSIX
servmediup:~# /usr/lib/nagios/plugins/check_ping -H 134.59.53.14 -w 10,15% -c 15,20%
/bin/ping -n -U -w 10 -c 5 134.59.53.14
CRITIQUE - Impossible d'interpréter le réponse de la commande ping
servmediup:~# export LC_ALL=POSIX
servmediup:~# /usr/lib/nagios/plugins/check_ping -H 134.59.53.14 -w 10,15% -c 15,20%
PING OK - Packet loss = 0%, RTA = 0.29 ms
servmediup:~#
--- CUT ---

the lines beginning with "CRITIQUE" are the error message translated
into French. I guess the original is something like :

        "CRITICAL - Impossible to parse the answer of the ping command"

hoping this helps

bye

Jerome Alet

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Automatically imported from Debian bug report #327212 http://bugs.debian.org/327212

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Thu, 08 Sep 2005 14:12:16 +0200
From: Jerome Alet <email address hidden>
To: Debian Bug Tracking System <email address hidden>
Subject: nagios-common: locale problem breaks ping plugin

Package: nagios-common
Version: 2:1.3-cvs.20050402-2.sarge.1
Severity: grave
Justification: renders package unusable

It seems that Nagios can't parse the output of some plugins when
the decimal point is ',' instead of '.', that's probably why
/etc/init.d/nagios contains LC_NUMERIC=POSIX.

However, this doesn't seem to be sufficient if the system has
started in a non-default locale.

By modifying /etc/init.d/nagios and setting :

 export LC_ALL=POSIX

it seems to work fine.

hoping this helps.

bye

Jerome Alet

-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.4.27-2-686-smp
Locale: LANG=fr_FR@euro, LC_CTYPE=fr_FR@euro (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to POSIX)

Versions of packages nagios-common depends on:
ii adduser 3.63 Add and remove users and groups
ii apache [htt 1.3.33-6 versatile, high-performance HTTP s
ii coreutils [ 5.2.1-2 The GNU core utilities
ii debconf [de 1.4.30.13 Debian configuration management sy
ii fileutils 5.2.1-2 The GNU file management utilities
ii mailx 1:8.1.2-0.20040524cvs-4 A simple mail user agent
ii nagios-pgsq 2:1.3-cvs.20050402-2.sarge.1 A host/service/network monitoring
ii nagios-plug 1.4-6 Plugins for the nagios network mon

-- debconf information:
  nagios/adminpassword: (password omitted)
  nagios/wwwsuid: true
  nagios/upgradefromnetsaint:
* nagios/configapache: None

Revision history for this message
In , sean finney (seanius) wrote :

hey jerome,

On Thu, Sep 08, 2005 at 03:50:49PM +0200, <email address hidden> wrote:
> --- CUT ---
> servmediup:~# printenv |grep LC_
> LC_ALL=fr_FR@euro
> servmediup:~# /usr/lib/nagios/plugins/check_ping -H 134.59.53.14 -w 10,15% -c 15,20%
> /bin/ping -n -U -w 10 -c 5 134.59.53.14
> CRITIQUE - Impossible d'interpréter le réponse de la commande ping
> servmediup:~# export LC_NUMERIC=POSIX
> servmediup:~# /usr/lib/nagios/plugins/check_ping -H 134.59.53.14 -w 10,15% -c 15,20%
> /bin/ping -n -U -w 10 -c 5 134.59.53.14
> CRITIQUE - Impossible d'interpréter le réponse de la commande ping
> servmediup:~# export LC_ALL=POSIX
> servmediup:~# /usr/lib/nagios/plugins/check_ping -H 134.59.53.14 -w 10,15% -c 15,20%
> PING OK - Packet loss = 0%, RTA = 0.29 ms
> servmediup:~#
> --- CUT ---

okay, looks like it's LC_TIME that's doing it. try

export LC_NUMERIC
export LC_TIME
LC_NUMERIC=POSIX
LC_TIME=POSIX
/usr/lib/nagios/plugins/check_ping -H 134.59.53.14 -w 10,15% -c 15,20%

> the lines beginning with "CRITIQUE" are the error message translated
> into French. I guess the original is something like :
>
> "CRITICAL - Impossible to parse the answer of the ping command"
>
> hoping this helps

je pense que oui--je voudrais bien savoir ci ça marche :)

 sean

--

Revision history for this message
In , Alet (alet) wrote :

Hi again,

On Thu, Sep 08, 2005 at 10:21:58AM -0400, sean finney wrote:
>
> On Thu, Sep 08, 2005 at 03:50:49PM +0200, <email address hidden> wrote:
> > --- CUT ---
> > servmediup:~# printenv |grep LC_
> > LC_ALL=fr_FR@euro
> > servmediup:~# /usr/lib/nagios/plugins/check_ping -H 134.59.53.14 -w 10,15% -c 15,20%
> > /bin/ping -n -U -w 10 -c 5 134.59.53.14
> > CRITIQUE - Impossible d'interpréter le réponse de la commande ping
> > servmediup:~# export LC_NUMERIC=POSIX
> > servmediup:~# /usr/lib/nagios/plugins/check_ping -H 134.59.53.14 -w 10,15% -c 15,20%
> > /bin/ping -n -U -w 10 -c 5 134.59.53.14
> > CRITIQUE - Impossible d'interpréter le réponse de la commande ping
> > servmediup:~# export LC_ALL=POSIX
> > servmediup:~# /usr/lib/nagios/plugins/check_ping -H 134.59.53.14 -w 10,15% -c 15,20%
> > PING OK - Packet loss = 0%, RTA = 0.29 ms
> > servmediup:~#
> > --- CUT ---
>
> okay, looks like it's LC_TIME that's doing it. try
>
> export LC_NUMERIC
> export LC_TIME
> LC_NUMERIC=POSIX
> LC_TIME=POSIX
> /usr/lib/nagios/plugins/check_ping -H 134.59.53.14 -w 10,15% -c 15,20%

doesn't work.

> je pense que oui--je voudrais bien savoir ci ça marche :)

cela ne marche pas :-)

en fait, LC_NUMERIC seems to be sufficient, as long as LC_ALL is unset.

If I do :

  $ export LC_NUMERIC=POSIX
  $ /usr/lib/nagios/plugins/check_ping -H 134.59.53.14 -w 10,15% -c 15,20%

it fails.

but then :

  $ unset LC_ALL
  (here LC_NUMERIC is still defined to be POSIX since we're in the
   same session)
  $ /usr/lib/nagios/plugins/check_ping -H 134.59.53.14 -w 10,15% -c 15,20%

it works

hth

Jerome Alet

Revision history for this message
In , sean finney (seanius) wrote :

On Thu, Sep 08, 2005 at 04:38:39PM +0200, <email address hidden> wrote:
> > export LC_NUMERIC
> > export LC_TIME
> > LC_NUMERIC=POSIX
> > LC_TIME=POSIX
> > /usr/lib/nagios/plugins/check_ping -H 134.59.53.14 -w 10,15% -c 15,20%
>
> doesn't work.
>
> en fait, LC_NUMERIC seems to be sufficient, as long as LC_ALL is unset.
>
> If I do :
>
> $ export LC_NUMERIC=POSIX
> $ /usr/lib/nagios/plugins/check_ping -H 134.59.53.14 -w 10,15% -c 15,20%
>
> it fails.
>
> but then :
>
> $ unset LC_ALL
> (here LC_NUMERIC is still defined to be POSIX since we're in the
> same session)
> $ /usr/lib/nagios/plugins/check_ping -H 134.59.53.14 -w 10,15% -c 15,20%
>
> it works

aha. spending some time r'ing tfm on locale(7):

       If the second argument to setlocale() is empty string, "", for the
       default locale, it is determined using the following steps:

       1. If there is a non-null environment variable LC_ALL, the value of
              LC_ALL is used.

       2. If an environment variable with the same name as one of the cat-
              egories above exists and is non-null, its value is used for that
              category.

       3. If there is a non-null environment variable LANG, the value of
              LANG is used.

so LC_ALL trumps all other settings, then the individual settings like
LC_NUMERIC etc, then LANG. i don't know much about how the default
locale is set up for debian boxes when you use a different locale... are
both environemnt variables LC_ALL and LANG set to the same value, or is
only LC_ALL set?

if they're both set then simply unsetting LC_ALL before setting LC_NUMERIC
etc would work afaict. otherwise we'd have to do something like fetch
LC_ALL, unset it, set LC_NUMERIC etc, and then put the original value
of LC_ALL into LANG.

 sean

--

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Thu, 8 Sep 2005 09:40:03 -0400
From: sean finney <email address hidden>
To: Jerome Alet <email address hidden>, <email address hidden>
Cc: <email address hidden>
Subject: Re: [Pkg-nagios-devel] Bug#327212: nagios-common: locale problem breaks ping plugin

--x+6KMIRAuhnl3hBn
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

severity 327212 normal
thanks

hi jerome,

On Thu, Sep 08, 2005 at 02:12:16PM +0200, Jerome Alet wrote:
> Package: nagios-common
> Version: 2:1.3-cvs.20050402-2.sarge.1
> Severity: grave
> Justification: renders package unusable

i'm readjusting the severity of this, as the nagios is still quite
installable for everyone and useable for most people. i'm also
pondering reassigning it to nagios-plugins, as i believe it is
specific plugins failing and not the nagios subsystem, but i'll
hold off on that until we get all the information necessary.

> It seems that Nagios can't parse the output of some plugins when
> the decimal point is ',' instead of '.', that's probably why
> /etc/init.d/nagios contains LC_NUMERIC=3DPOSIX.

hmm.. strange. i would think that exporting the above would be all
that we needed, i guess not. can you give me a specific example?

> However, this doesn't seem to be sufficient if the system has
> started in a non-default locale.
>=20
> By modifying /etc/init.d/nagios and setting :
>=20
> export LC_ALL=3DPOSIX

it'd be nice if there were some medium ground where non-relevant
locale settings could remain at what they were, so error messages etc
could remain in the right locale.

really, i'm suspecting the real fix should be in the individual plugins
(which i've actually fixed upstream in later versions), but i'll need
to see an example before i can be sure of that.

 sean

--=20

--x+6KMIRAuhnl3hBn
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFDID8zynjLPm522B0RAtZxAJ4lIJ3zM+Ab5+jxesLLpjHDv86yWACghYUZ
V07qKLx+lQb4+jenjCc+BBE=
=67ck
-----END PGP SIGNATURE-----

--x+6KMIRAuhnl3hBn--

Revision history for this message
Debian Bug Importer (debzilla) wrote :
Download full text (3.2 KiB)

Message-ID: <email address hidden>
Date: Thu, 8 Sep 2005 15:50:49 +0200
From: <email address hidden>
To: sean finney <email address hidden>
Cc: <email address hidden>, <email address hidden>
Subject: Re: [Pkg-nagios-devel] Bug#327212: nagios-common: locale problem breaks ping plugin

--uxuisgdDHaNETlh8
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi again,

On Thu, Sep 08, 2005 at 09:40:03AM -0400, sean finney wrote:
> > Justification: renders package unusable
>=20
> i'm readjusting the severity of this, as the nagios is still quite
> installable for everyone and useable for most people. i'm also
> pondering reassigning it to nagios-plugins, as i believe it is
> specific plugins failing and not the nagios subsystem, but i'll
> hold off on that until we get all the information necessary.

OK.

> > It seems that Nagios can't parse the output of some plugins when
> > the decimal point is ',' instead of '.', that's probably why
> > /etc/init.d/nagios contains LC_NUMERIC=3DPOSIX.
>=20
> hmm.. strange. i would think that exporting the above would be all
> that we needed, i guess not. can you give me a specific example?
>=20
> > However, this doesn't seem to be sufficient if the system has
> > started in a non-default locale.
> >=20
> > By modifying /etc/init.d/nagios and setting :
> >=20
> > export LC_ALL=3DPOSIX
>=20
> it'd be nice if there were some medium ground where non-relevant
> locale settings could remain at what they were, so error messages etc
> could remain in the right locale.
>=20
> really, i'm suspecting the real fix should be in the individual plugins
> (which i've actually fixed upstream in later versions), but i'll need
> to see an example before i can be sure of that.

I too think the fix should be done once and for all in the plugins,=20
however the LC_ALL solution fixed the problem for me.

Here's what I've got :

--- CUT ---
servmediup:~# printenv |grep LC_
LC_ALL=3Dfr_FR@euro
servmediup:~# /usr/lib/nagios/plugins/check_ping -H 134.59.53.14 -w 10,15% =
-c 15,20%
/bin/ping -n -U -w 10 -c 5 134.59.53.14
CRITIQUE - Impossible d'interpr=E9ter le r=E9ponse de la commande ping
servmediup:~# export LC_NUMERIC=3DPOSIX
servmediup:~# /usr/lib/nagios/plugins/check_ping -H 134.59.53.14 -w 10,15% =
-c 15,20%
/bin/ping -n -U -w 10 -c 5 134.59.53.14
CRITIQUE - Impossible d'interpr=E9ter le r=E9ponse de la commande ping
servmediup:~# export LC_ALL=3DPOSIX =20
servmediup:~# /usr/lib/nagios/plugins/check_ping -H 134.59.53.14 -w 10,15% =
-c 15,20%
PING OK - Packet loss =3D 0%, RTA =3D 0.29 ms
servmediup:~#=20
--- CUT ---

the lines beginning with "CRITIQUE" are the error message translated
into French. I guess the original is something like :

        "CRITICAL - Impossible to parse the answer of the ping command"
       =20
hoping this helps

bye

Jerome Alet

--uxuisgdDHaNETlh8
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDIEG4yl5Sl04/FQQRAkoVAKC4sIEpMS9DOKUbecHaKTiykdWRWwCdH/qE
P1qy29jsnCdboae...

Read more...

Revision history for this message
In , Alet (alet) wrote :

Hi again,

On Thu, Sep 08, 2005 at 10:55:17AM -0400, sean finney wrote:
>
> so LC_ALL trumps all other settings, then the individual settings like
> LC_NUMERIC etc, then LANG. i don't know much about how the default
> locale is set up for debian boxes when you use a different locale... are
> both environemnt variables LC_ALL and LANG set to the same value, or is
> only LC_ALL set?
>
> if they're both set then simply unsetting LC_ALL before setting LC_NUMERIC
> etc would work afaict. otherwise we'd have to do something like fetch
> LC_ALL, unset it, set LC_NUMERIC etc, and then put the original value
> of LC_ALL into LANG.

On **MY** system, the /etc/environment file contains the setting
of both LANG and LC_ALL to identical values.

However, I don't remember if I did this myself, or if some
system tool or library setup did it for me, so I don't know how
it is on a "clean" Debian box.

Also I don't know exactly if or when this file is used.

bye

Jerome Alet

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Thu, 8 Sep 2005 10:21:58 -0400
From: sean finney <email address hidden>
To: <email address hidden>
Cc: <email address hidden>
Subject: Re: [Pkg-nagios-devel] Bug#327212: nagios-common: locale problem breaks ping plugin

--0F1p//8PRICkK4MW
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

hey jerome,

On Thu, Sep 08, 2005 at 03:50:49PM +0200, <email address hidden> wrote:
> --- CUT ---
> servmediup:~# printenv |grep LC_
> LC_ALL=3Dfr_FR@euro
> servmediup:~# /usr/lib/nagios/plugins/check_ping -H 134.59.53.14 -w 10,15=
% -c 15,20%
> /bin/ping -n -U -w 10 -c 5 134.59.53.14
> CRITIQUE - Impossible d'interpr=E9ter le r=E9ponse de la commande ping
> servmediup:~# export LC_NUMERIC=3DPOSIX
> servmediup:~# /usr/lib/nagios/plugins/check_ping -H 134.59.53.14 -w 10,15=
% -c 15,20%
> /bin/ping -n -U -w 10 -c 5 134.59.53.14
> CRITIQUE - Impossible d'interpr=E9ter le r=E9ponse de la commande ping
> servmediup:~# export LC_ALL=3DPOSIX =20
> servmediup:~# /usr/lib/nagios/plugins/check_ping -H 134.59.53.14 -w 10,15=
% -c 15,20%
> PING OK - Packet loss =3D 0%, RTA =3D 0.29 ms
> servmediup:~#=20
> --- CUT ---

okay, looks like it's LC_TIME that's doing it. try

export LC_NUMERIC
export LC_TIME
LC_NUMERIC=3DPOSIX
LC_TIME=3DPOSIX
/usr/lib/nagios/plugins/check_ping -H 134.59.53.14 -w 10,15% -c 15,20%

> the lines beginning with "CRITIQUE" are the error message translated
> into French. I guess the original is something like :
>=20
> "CRITICAL - Impossible to parse the answer of the ping command"
> =20
> hoping this helps

je pense que oui--je voudrais bien savoir ci =E7a marche :)

 sean

--=20

--0F1p//8PRICkK4MW
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFDIEkGynjLPm522B0RAoDWAKCFd2XGUnI0V4vgv8gJkId3Ze1e/wCdGoMH
C9TFg+0gctUaPSX6RDKvfaA=
=KLXD
-----END PGP SIGNATURE-----

--0F1p//8PRICkK4MW--

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Thu, 8 Sep 2005 16:38:39 +0200
From: <email address hidden>
To: sean finney <email address hidden>
Cc: <email address hidden>, <email address hidden>
Subject: Re: [Pkg-nagios-devel] Bug#327212: nagios-common: locale problem breaks ping plugin

--9crTWz/Z+Zyzu20v
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi again,

On Thu, Sep 08, 2005 at 10:21:58AM -0400, sean finney wrote:
>=20
> On Thu, Sep 08, 2005 at 03:50:49PM +0200, <email address hidden> wrote:
> > --- CUT ---
> > servmediup:~# printenv |grep LC_
> > LC_ALL=3Dfr_FR@euro
> > servmediup:~# /usr/lib/nagios/plugins/check_ping -H 134.59.53.14 -w 10,=
15% -c 15,20%
> > /bin/ping -n -U -w 10 -c 5 134.59.53.14
> > CRITIQUE - Impossible d'interpr=E9ter le r=E9ponse de la commande ping
> > servmediup:~# export LC_NUMERIC=3DPOSIX
> > servmediup:~# /usr/lib/nagios/plugins/check_ping -H 134.59.53.14 -w 10,=
15% -c 15,20%
> > /bin/ping -n -U -w 10 -c 5 134.59.53.14
> > CRITIQUE - Impossible d'interpr=E9ter le r=E9ponse de la commande ping
> > servmediup:~# export LC_ALL=3DPOSIX =20
> > servmediup:~# /usr/lib/nagios/plugins/check_ping -H 134.59.53.14 -w 10,=
15% -c 15,20%
> > PING OK - Packet loss =3D 0%, RTA =3D 0.29 ms
> > servmediup:~#=20
> > --- CUT ---
>=20
> okay, looks like it's LC_TIME that's doing it. try
>=20
> export LC_NUMERIC
> export LC_TIME
> LC_NUMERIC=3DPOSIX
> LC_TIME=3DPOSIX
> /usr/lib/nagios/plugins/check_ping -H 134.59.53.14 -w 10,15% -c 15,20%

doesn't work.

> je pense que oui--je voudrais bien savoir ci =E7a marche :)

cela ne marche pas :-)

en fait, LC_NUMERIC seems to be sufficient, as long as LC_ALL is unset.

If I do :

  $ export LC_NUMERIC=3DPOSIX
  $ /usr/lib/nagios/plugins/check_ping -H 134.59.53.14 -w 10,15% -c 15,20%
 =20
it fails.
 =20
but then :

  $ unset LC_ALL
  (here LC_NUMERIC is still defined to be POSIX since we're in the
   same session)
  $ /usr/lib/nagios/plugins/check_ping -H 134.59.53.14 -w 10,15% -c 15,20%
 =20
it works =20
 =20
hth

Jerome Alet

--9crTWz/Z+Zyzu20v
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDIEzvyl5Sl04/FQQRAohyAKC/MamO+bL2aIm58Ne3OHqRlBTz6gCeIfUK
17rbNqlDuK1QO+IsLWeoN8E=
=4PTm
-----END PGP SIGNATURE-----

--9crTWz/Z+Zyzu20v--

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Thu, 8 Sep 2005 10:55:17 -0400
From: sean finney <email address hidden>
To: <email address hidden>
Cc: <email address hidden>
Subject: Re: [Pkg-nagios-devel] Bug#327212: nagios-common: locale problem breaks ping plugin

--FCuugMFkClbJLl1L
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Sep 08, 2005 at 04:38:39PM +0200, <email address hidden> wrote:
> > export LC_NUMERIC
> > export LC_TIME
> > LC_NUMERIC=3DPOSIX
> > LC_TIME=3DPOSIX
> > /usr/lib/nagios/plugins/check_ping -H 134.59.53.14 -w 10,15% -c 15,20%
>=20
> doesn't work.
>=20
> en fait, LC_NUMERIC seems to be sufficient, as long as LC_ALL is unset.
>=20
> If I do :
>=20
> $ export LC_NUMERIC=3DPOSIX
> $ /usr/lib/nagios/plugins/check_ping -H 134.59.53.14 -w 10,15% -c 15,20%
> =20
> it fails.
> =20
> but then :
>=20
> $ unset LC_ALL
> (here LC_NUMERIC is still defined to be POSIX since we're in the
> same session)
> $ /usr/lib/nagios/plugins/check_ping -H 134.59.53.14 -w 10,15% -c 15,20%
> =20
> it works =20

aha. spending some time r'ing tfm on locale(7):

       If the second argument to setlocale() is empty string, "", for =
the
       default locale, it is determined using the following steps:

       1. If there is a non-null environment variable LC_ALL, the value=
 of
              LC_ALL is used.

       2. If an environment variable with the same name as one of the c=
at-
              egories above exists and is non-null, its value is used for t=
hat
              category.

       3. If there is a non-null environment variable LANG, the value=
 of
              LANG is used.

so LC_ALL trumps all other settings, then the individual settings like
LC_NUMERIC etc, then LANG. i don't know much about how the default
locale is set up for debian boxes when you use a different locale... are
both environemnt variables LC_ALL and LANG set to the same value, or is
only LC_ALL set? =20

if they're both set then simply unsetting LC_ALL before setting LC_NUMERIC
etc would work afaict. otherwise we'd have to do something like fetch
LC_ALL, unset it, set LC_NUMERIC etc, and then put the original value
of LC_ALL into LANG.

 sean

--=20

--FCuugMFkClbJLl1L
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFDIFDVynjLPm522B0RArBlAJwNq3vCCCRdQrTFKrpYzREZB5Qv+QCfc145
CenmyaA29/pcig3Er5J9tjU=
=TWuC
-----END PGP SIGNATURE-----

--FCuugMFkClbJLl1L--

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Thu, 8 Sep 2005 17:53:22 +0200
From: <email address hidden>
To: sean finney <email address hidden>
Cc: <email address hidden>, <email address hidden>
Subject: Re: [Pkg-nagios-devel] Bug#327212: nagios-common: locale problem breaks ping plugin

--82I3+IH0IqGh5yIs
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi again,

On Thu, Sep 08, 2005 at 10:55:17AM -0400, sean finney wrote:
>=20
> so LC_ALL trumps all other settings, then the individual settings like
> LC_NUMERIC etc, then LANG. i don't know much about how the default
> locale is set up for debian boxes when you use a different locale... are
> both environemnt variables LC_ALL and LANG set to the same value, or is
> only LC_ALL set? =20
>=20
> if they're both set then simply unsetting LC_ALL before setting LC_NUMERIC
> etc would work afaict. otherwise we'd have to do something like fetch
> LC_ALL, unset it, set LC_NUMERIC etc, and then put the original value
> of LC_ALL into LANG.

On **MY** system, the /etc/environment file contains the setting
of both LANG and LC_ALL to identical values.

However, I don't remember if I did this myself, or if some
system tool or library setup did it for me, so I don't know how
it is on a "clean" Debian box.

Also I don't know exactly if or when this file is used.

bye

Jerome Alet

--82I3+IH0IqGh5yIs
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDIF5yyl5Sl04/FQQRAh4oAJ9AgyCRmPp4odg8Abv/AzSEi/3NsACgsQN7
pbS2WTNJ1aOud5g/rwsXngU=
=VMYp
-----END PGP SIGNATURE-----

--82I3+IH0IqGh5yIs--

Revision history for this message
In , sean finney (seanius) wrote :

reassign 327212 nagios-plugins
thanks

hey,

On Thu, Sep 08, 2005 at 05:53:22PM +0200, <email address hidden> wrote:
> On **MY** system, the /etc/environment file contains the setting
> of both LANG and LC_ALL to identical values.
>
> However, I don't remember if I did this myself, or if some
> system tool or library setup did it for me, so I don't know how
> it is on a "clean" Debian box.
>
> Also I don't know exactly if or when this file is used.

i "believe" it's sourced by the desktop login manager, and inherited
into x sessions, but could be wrong. anyway, afaict that was
a manual modification, as if i reconfigure locales and select a
different local it only puts LANG=foo in this file.

therefore, i think what would make the most sense to do then is to
do what i suggested in each of the plugins, where LC_ALL is transferred
to LANG (if set) and then unset. i'll do sometihng like this upstream.

in the meantime, i'll reassign this bug to nagios-plugins. guido: feel
free to tag this one upstream and it'll probably be fixed in 1.4.2 :)

 sean

--

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Thu, 8 Sep 2005 14:11:14 -0400
From: sean finney <email address hidden>
To: <email address hidden>
Cc: <email address hidden>, <email address hidden>
Subject: Re: [Pkg-nagios-devel] Bug#327212: nagios-common: locale problem breaks ping plugin

--pf9I7BMVVzbSWLtt
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

reassign 327212 nagios-plugins
thanks

hey,

On Thu, Sep 08, 2005 at 05:53:22PM +0200, <email address hidden> wrote:
> On **MY** system, the /etc/environment file contains the setting
> of both LANG and LC_ALL to identical values.
>=20
> However, I don't remember if I did this myself, or if some
> system tool or library setup did it for me, so I don't know how
> it is on a "clean" Debian box.
>=20
> Also I don't know exactly if or when this file is used.

i "believe" it's sourced by the desktop login manager, and inherited
into x sessions, but could be wrong. anyway, afaict that was
a manual modification, as if i reconfigure locales and select a
different local it only puts LANG=3Dfoo in this file.

therefore, i think what would make the most sense to do then is to
do what i suggested in each of the plugins, where LC_ALL is transferred
to LANG (if set) and then unset. i'll do sometihng like this upstream.

in the meantime, i'll reassign this bug to nagios-plugins. guido: feel
free to tag this one upstream and it'll probably be fixed in 1.4.2 :)

 sean

--=20

--pf9I7BMVVzbSWLtt
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFDIH7CynjLPm522B0RAk+QAJ9Cm4xQkXg+GGPeiD7gUpxiUoBu8ACbBUNt
U4MCRD5uvaklMpXcS3JBYVE=
=Q+sw
-----END PGP SIGNATURE-----

--pf9I7BMVVzbSWLtt--

Revision history for this message
Tollef Fog Heen (tfheen) wrote :

nagios (2:1.3-cvs.20050402-4ubuntu1) breezy; urgency=low

  * Work around problem where output of programs may be localised. Set
    LC_ALL to POSIX in init script. Ubuntu #14960, Debian #327212.
    This is not really the right fix, but works well enough as a band-aid
    until upstream releases a fixed version.

 -- Tollef Fog Heen <email address hidden> Tue, 13 Sep 2005 11:35:01 +0200

Revision history for this message
In , sean finney (seanius) wrote : Bug#327212: fixed in nagios-plugins 1.4.2-2

Source: nagios-plugins
Source-Version: 1.4.2-2

We believe that the bug you reported is fixed in the latest version of
nagios-plugins, which is due to be installed in the Debian FTP archive:

nagios-plugins_1.4.2-2.diff.gz
  to pool/main/n/nagios-plugins/nagios-plugins_1.4.2-2.diff.gz
nagios-plugins_1.4.2-2.dsc
  to pool/main/n/nagios-plugins/nagios-plugins_1.4.2-2.dsc
nagios-plugins_1.4.2-2_i386.deb
  to pool/main/n/nagios-plugins/nagios-plugins_1.4.2-2_i386.deb

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to <email address hidden>,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
sean finney <email address hidden> (supplier of updated nagios-plugins package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing <email address hidden>)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Fri, 07 Oct 2005 22:19:09 +0200
Source: nagios-plugins
Binary: nagios-plugins
Architecture: source i386
Version: 1.4.2-2
Distribution: unstable
Urgency: low
Maintainer: <email address hidden>
Changed-By: sean finney <email address hidden>
Description:
 nagios-plugins - Plugins for the nagios network monitoring and management system
Closes: 278817 306244 308458 312228 316534 316882 327212 332667
Changes:
 nagios-plugins (1.4.2-2) unstable; urgency=low
 .
   * Sean Finney:
     - ack, the perl plugins broke on the last upload, because "use lib"
       wasn't being properly substituted in. fixed. (closes: #332667).
     - include upstream fix for check_ups temperature perfdata. thanks
       to Chris AtLee for originally reporting this (closes: #316534).
     - stop mucking around with config.sub/config.guess in debian/rules.
     - last update in the changelog was missing a colon on the following:
       (closes: #312228, #306244, #308458, #327212, #316882).
     - have check_mysql read in defaults from my.cnf (closes: #278817).
Files:
 aaa7a8e305d1ea300d27fd4350379314 959 net extra nagios-plugins_1.4.2-2.dsc
 cabe99cfabace7af16464a00c14a02f3 28967 net extra nagios-plugins_1.4.2-2.diff.gz
 54bde448e6b541bf63a52676aa138b1d 354576 net extra nagios-plugins_1.4.2-2_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFDRt+HynjLPm522B0RAuroAKCGLqWBoKHAz3hJb6Lkv9mPb/XPawCeP+Sh
jw6q6+qYE1V4oBNw8OYzRp0=
=Af7h
-----END PGP SIGNATURE-----

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Fri, 07 Oct 2005 14:02:04 -0700
From: sean finney <email address hidden>
To: <email address hidden>
Subject: Bug#327212: fixed in nagios-plugins 1.4.2-2

Source: nagios-plugins
Source-Version: 1.4.2-2

We believe that the bug you reported is fixed in the latest version of
nagios-plugins, which is due to be installed in the Debian FTP archive:

nagios-plugins_1.4.2-2.diff.gz
  to pool/main/n/nagios-plugins/nagios-plugins_1.4.2-2.diff.gz
nagios-plugins_1.4.2-2.dsc
  to pool/main/n/nagios-plugins/nagios-plugins_1.4.2-2.dsc
nagios-plugins_1.4.2-2_i386.deb
  to pool/main/n/nagios-plugins/nagios-plugins_1.4.2-2_i386.deb

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to <email address hidden>,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
sean finney <email address hidden> (supplier of updated nagios-plugins package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing <email address hidden>)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Fri, 07 Oct 2005 22:19:09 +0200
Source: nagios-plugins
Binary: nagios-plugins
Architecture: source i386
Version: 1.4.2-2
Distribution: unstable
Urgency: low
Maintainer: <email address hidden>
Changed-By: sean finney <email address hidden>
Description:
 nagios-plugins - Plugins for the nagios network monitoring and management system
Closes: 278817 306244 308458 312228 316534 316882 327212 332667
Changes:
 nagios-plugins (1.4.2-2) unstable; urgency=low
 .
   * Sean Finney:
     - ack, the perl plugins broke on the last upload, because "use lib"
       wasn't being properly substituted in. fixed. (closes: #332667).
     - include upstream fix for check_ups temperature perfdata. thanks
       to Chris AtLee for originally reporting this (closes: #316534).
     - stop mucking around with config.sub/config.guess in debian/rules.
     - last update in the changelog was missing a colon on the following:
       (closes: #312228, #306244, #308458, #327212, #316882).
     - have check_mysql read in defaults from my.cnf (closes: #278817).
Files:
 aaa7a8e305d1ea300d27fd4350379314 959 net extra nagios-plugins_1.4.2-2.dsc
 cabe99cfabace7af16464a00c14a02f3 28967 net extra nagios-plugins_1.4.2-2.diff.gz
 54bde448e6b541bf63a52676aa138b1d 354576 net extra nagios-plugins_1.4.2-2_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFDRt+HynjLPm522B0RAuroAKCGLqWBoKHAz3hJb6Lkv9mPb/XPawCeP+Sh
jw6q6+qYE1V4oBNw8OYzRp0=
=Af7h
-----END PGP SIGNATURE-----

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.