[Nagiosplug-devel] [ nagiosplug-Bugs-1164325 ] Warning threshold must be float or float triplet!" at check_
SourceForge.net
noreply at sourceforge.net
Mon Jun 27 19:29:00 CEST 2005
Bugs item #1164325, was opened at 2005-03-16 04:44
Message generated for change (Comment added) made by seanius
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1164325&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: None
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Wilfried Brunken (df7be)
>Assigned to: M. Sean Finney (seanius)
Summary: Warning threshold must be float or float triplet!" at check_
Initial Comment:
No output generated, because of this
Can the configure Script automatically find the problem ?
(or documentation "INSTALL.UNIX" adding ?)
The Workaround to fix the Problem was:
- add the Line "setlocale(LC_NUMERIC, "POSIX");"
in plugins/check_load.c
- ./configure --disable-nls
- Short Test:
cd plugins
./check_load -w 1,1,1 -c 2,2,2
Needed "--disable-nls" at following OS:
RedHat AS 3 ( gcc-3.2.3-49 )
SuSe-LINUX 9.x ( gcc-3.3.4-11 on 9.2 ) NOT
SuSe 8.2 !!
AIX 5.1 (not 4.3) ! ( C for AIX Compiler, Version 6 )
I found the Information visiting the following site:
http://article.gmane.org/gmane.network.nagios.plugins.d
evel/2473
1. Recompile the plugins using:
./configure --disable-nls
I have not tested this, but I believe this should work.
After the 'textdomain' call at the start of the plugin
source code,
add the line:
setlocale(LC_NUMERIC, "POSIX");
Eg, with your problem plugin check_load. Edit
plugins/check_load.c:
-------------------check_load.c-------------------
int
main (int argc, char **argv)
{
int result = STATE_UNKNOWN;
#if HAVE_GETLOADAVG==1
double la[3] = { 0.0, 0.0, 0.0 }; /* NetBSD
complains
about unitialized arrays */
#else
# if HAVE_PROC_LOADAVG==1
FILE *fp;
char input_buffer[MAX_INPUT_BUFFER];
char *tmp_ptr;
# else
char input_buffer[MAX_INPUT_BUFFER];
# endif
#endif
float la1, la5, la15;
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
setlocale(LC_NUMERIC, "POSIX");
<--- HERE!!
-------------------check_load.c-------------------
----------------------------------------------------------------------
>Comment By: M. Sean Finney (seanius)
Date: 2005-06-27 22:27
Message:
Logged In: YES
user_id=226838
thanks!
----------------------------------------------------------------------
Comment By: M. Sean Finney (seanius)
Date: 2005-06-27 22:27
Message:
Logged In: YES
user_id=226838
this problem is now fixed in cvs. thank you for your report.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1164325&group_id=29880
More information about the Devel
mailing list