[Nagiosplug-devel] [ nagiosplug-Bugs-1266157 ] Problems with LC_ALL and check_ping, check_load...
SourceForge.net
noreply at sourceforge.net
Wed Aug 24 04:20:38 CEST 2005
Bugs item #1266157, was opened at 2005-08-22 14:59
Message generated for change (Comment added) made by sgala2
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1266157&group_id=29880
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Parsing problem
Group: snapshot rpm
Status: Open
Resolution: None
Priority: 5
Submitted By: Alen Salamun (alien2108)
Assigned to: Nobody/Anonymous (nobody)
Summary: Problems with LC_ALL and check_ping, check_load...
Initial Comment:
With the latest nagios_plugins
(nagios-plugins-1.4-2.rf) compiled by myself I have
problems with numerious check scripts.
For example if I run check_ping:
# ./check_ping1 -H 192.168.10.2 -w10,20% -c
50,50%/bin/ping -n -U -w 10 -c 5 192.168.10.2
CRITICAL - Could not interpret output from ping command
BUT:
LC_ALL=C ./check_ping1 -H 192.168.10.2 -w10,20% -c 50,50%
PING OK - Packet loss = 0%, RTA = 0.23 ms
Is this problem with plugins not correctly handling
locales? System is Linux Mandrake 10.0 with LC's:
LC_ADDRESS=sl_SI
LC_COLLATE=en_US
LC_CTYPE=en_US
LC_IDENTIFICATION=sl_SI
LC_MEASUREMENT=sl_SI
LC_MESSAGES=en_US
LC_MONETARY=sl_SI
LC_NAME=sl_SI
LC_NUMERIC=sl_SI
LC_PAPER=sl_SI
LC_SOURCED=1
LC_TELEPHONE=sl_SI
LC_TIME=en_US
MAILCHECK=60
----------------------------------------------------------------------
Comment By: Matteo (sgala2)
Date: 2005-08-24 13:19
Message:
Logged In: YES
user_id=755585
the problem seems to be in the parsing with scanf that when
you are in locale that have the comma as decimal separator
the scanf fail.
I fixed replacing in all plugin that i nedd the line
setlocale (LC_ALL, "");
with
setlocale (LC_ALL, "C");
all now work fine!
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1266157&group_id=29880
More information about the Devel
mailing list