[Nagiosplug-devel] [ nagiosplug-Bugs-1164325 ] Warning threshold must be float or float triplet!" at check_

SourceForge.net noreply at sourceforge.net
Wed Mar 16 01:47:02 CET 2005


Bugs item #1164325, was opened at 2005-03-16 09:44
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1164325&group_id=29880

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Wilfried Brunken (df7be)
Assigned to: Nobody/Anonymous (nobody)
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-------------------

----------------------------------------------------------------------

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