check_load by nrpe

Hello all!

First :
my nagios server : Debian testing
my remote host (with nrpe): Solaris 8
All the other check by nrpe are OK but…
I try to get the result of the check_load on my remote host.
With command in my remote host :
./check_load -w 3,3,2 -c 4,4,3 i have this resut :
OK - load average: 0.05, 0.03, 0.04|load1=0.046875;3.000000;4.000000;0.000000 load5=0.031250;3.000000;4.000000;0.000000 load15=0.039063;2.000000;3.000000;0.000000
but when I execute this command in my nagios server with check_nrpe the response is : “Warning threshold must be float or float triplet!”

What is the problem?

Thank you for your response and sorry for my english…

Cheers,
Lime

The solution is to replace in check_load.c the line
setlocale (LC_ALL, “”);
by
setlocale (LC_NUMERIC, “POSIX”);

Next compiling check_load and all is OK!

Thx

Hello
i checked my plugins dir for check_load.c .i am using plugins1.3.0 .i didnt found a line setlocale (LC_ALL, “”);

wht do i do?

download the 1.4 plugin package
sourceforge.net/project/showfile … p_id=29880
in this package you’ll find the latest plugins available.

Hello
Cant i get it working with plugins 1.3.0.
Is it necessary for me to download 1.4 package?
Thanks
Aparna

No it’s not, but you still need the source file and will have to recompile after you have made the change as instructed.

Can you please elaborate it more.No its not for wht?is tht mean tht it is not necessary for me to install plugins 1.4.And how to recompile

Thanks
Aparna

Hello i uploaded check_load.c from nagios-plugins1.4 and compiled it i got these errors

root@server ~/nagios-plugins-1.3.0]# make all
Making all in lib
make[1]: Entering directory /root/nagios-plugins-1.3.0/lib' make[1]: Nothing to be done forall’.
make[1]: Leaving directory /root/nagios-plugins-1.3.0/lib' Making all in plugins make[1]: Entering directory/root/nagios-plugins-1.3.0/plugins’
gcc -DHAVE_CONFIG_H -I. -I. -I. -I. -I. -I. -I. -I. -I… -I…/lib -I/usr/include -g -O2 -c check_load.c
check_load.c:72:2: invalid preprocessing directive #changed
check_load.c: In function main': check_load.c:73: error:LC_NUMERIC’ undeclared (first use in this function)
check_load.c:73: error: (Each undeclared identifier is reported only once
check_load.c:73: error: for each function it appears in.)
check_load.c:74: error: LOCALEDIR' undeclared (first use in this function) check_load.c:131: warning: passing arg 1 ofprintf’ makes pointer from integer without a cast
check_load.c: In function process_arguments': check_load.c:202: warning: passing arg 1 ofusage’ makes pointer from integer without a cast
check_load.c:218: warning: passing arg 1 of usage' makes pointer from integer without a cast check_load.c:227: warning: passing arg 1 ofusage2’ makes pointer from integer without a cast
check_load.c: In function validate_arguments': check_load.c:271: warning: passing arg 1 ofusage’ makes pointer from integer without a cast
check_load.c:273: warning: passing arg 1 of usage' makes pointer from integer without a cast check_load.c:275: warning: passing arg 1 ofusage’ makes pointer from integer without a cast
check_load.c:277: warning: passing arg 1 of usage' makes pointer from integer without a cast check_load.c:279: warning: passing arg 1 ofusage’ makes pointer from integer without a cast
check_load.c:281: warning: passing arg 1 of usage' makes pointer from integer without a cast check_load.c:283: warning: passing arg 1 ofusage’ makes pointer from integer without a cast
check_load.c:285: warning: passing arg 1 of usage' makes pointer from integer without a cast check_load.c:287: warning: passing arg 1 ofusage’ makes pointer from integer without a cast
check_load.c: In function print_help': check_load.c:299: error:COPYRIGHT’ undeclared (first use in this function)
check_load.c:301: warning: passing arg 1 of printf' makes pointer from integer without a cast check_load.c:305: error:UT_HELP_VRSN’ undeclared (first use in this function)
check_load.c:305: warning: passing arg 1 of printf' makes pointer from integer without a cast check_load.c:307: warning: passing arg 1 ofprintf’ makes pointer from integer without a cast
check_load.c:314: error: UT_SUPPORT' undeclared (first use in this function) check_load.c:314: warning: passing arg 1 ofprintf’ makes pointer from integer without a cast
make[1]: *** [check_load.o] Error 1
make[1]: Leaving directory `/root/nagios-plugins-1.3.0/plugins’
make: *** [all-recursive] Error 1

please help

Thanks
Aparna

Hi i again installed my old plugin check_load.c and configured it.
but when i tried to recompile just check_load.c i got errors there.they are as follows

root@server ~/nagios-plugins-1.3.1/plugins]# cc check_load.c
/tmp/cc22w0FI.o(.text+0x44): In function main': : undefined reference tousage’
/tmp/cc22w0FI.o(.text+0x29a): In function process_arguments': : undefined reference tois_intnonneg’
/tmp/cc22w0FI.o(.text+0x38a): In function process_arguments': : undefined reference tousage’
/tmp/cc22w0FI.o(.text+0x3a0): In function process_arguments': : undefined reference tois_intnonneg’
/tmp/cc22w0FI.o(.text+0x490): In function process_arguments': : undefined reference tousage’
/tmp/cc22w0FI.o(.text+0x4ab): In function process_arguments': : undefined reference toprint_revision’
/tmp/cc22w0FI.o(.text+0x4d4): In function process_arguments': : undefined reference tousage’
/tmp/cc22w0FI.o(.text+0x524): In function process_arguments': : undefined reference tois_nonnegative’
/tmp/cc22w0FI.o(.text+0x591): In function process_arguments': : undefined reference tois_nonnegative’
/tmp/cc22w0FI.o(.text+0x5fe): In function process_arguments': : undefined reference tois_nonnegative’
/tmp/cc22w0FI.o(.text+0x66b): In function process_arguments': : undefined reference tois_nonnegative’
/tmp/cc22w0FI.o(.text+0x6d8): In function process_arguments': : undefined reference tois_nonnegative’
/tmp/cc22w0FI.o(.text+0x742): more undefined references to is_nonnegative' follow /tmp/cc22w0FI.o(.text+0x7a2): In functionvalidate_arguments’:
: undefined reference to usage' /tmp/cc22w0FI.o(.text+0x7c5): In functionvalidate_arguments’:
: undefined reference to usage' /tmp/cc22w0FI.o(.text+0x7e8): In functionvalidate_arguments’:
: undefined reference to usage' /tmp/cc22w0FI.o(.text+0x80b): In functionvalidate_arguments’:
: undefined reference to usage' /tmp/cc22w0FI.o(.text+0x82e): In functionvalidate_arguments’:
: undefined reference to usage' /tmp/cc22w0FI.o(.text+0x851): more undefined references tousage’ follow
/tmp/cc22w0FI.o(.text+0x907): In function print_help': : undefined reference toprint_revision’
/tmp/cc22w0FI.o(.text+0x934): In function print_help': : undefined reference tosupport’
collect2: ld returned 1 exit status

hey does it mean that there is problem with my nagios-plugins1.3.0 check_load.c

Also do i have to download any patch to get it all wrking?
Thanks for helping me out
Aparna

Hello
is there any other setting we have to do for nrpe to get it working.Also is there any patch for getting things wrkng?
Let me knw if u can help me out
Thanks
Aparna

Also i checked the ssl by this command and got this output
root@server [/usr/bin]# openssl verify /root/nrpe-2.0/src/nrpe
unable to load certificate
14909:error:0906D06C:PEM routines:PEM_read_bio:no start line:Pem_lib.c:632:Expecting: TRUSTED CERTIFICATE
root@server [/usr/bin]#

Aparna

[quote=“lime”]The solution is to replace in check_load.c the line
setlocale (LC_ALL, “”);
by
setlocale (LC_NUMERIC, “POSIX”);

Next compiling check_load and all is OK!

Thx[/quote]

Hi
I did that.But got errors while compiling.the errs are stated in my prev post

Thanks

Personally, I’d make the suggested change and then recompile the entire plugin directory, and not just one of them. ./configure, make, make install.

Hi
i tried making the changes in check_load.c and then compiling the whole directory but i get these errors

root@host ~/tmp/nagios/nagios-plugins-1.4]# make all
make all-recursive
make[1]: Entering directory /root/tmp/nagios/nagios-plugins-1.4' Making all in intl make[2]: Entering directory/root/tmp/nagios/nagios-plugins-1.4/intl’
make[2]: Nothing to be done for all'. make[2]: Leaving directory/root/tmp/nagios/nagios-plugins-1.4/intl’
Making all in lib
make[2]: Entering directory /root/tmp/nagios/nagios-plugins-1.4/lib' make all-am make[3]: Entering directory/root/tmp/nagios/nagios-plugins-1.4/lib’
make[3]: Nothing to be done for all-am'. make[3]: Leaving directory/root/tmp/nagios/nagios-plugins-1.4/lib’
make[2]: Leaving directory /root/tmp/nagios/nagios-plugins-1.4/lib' Making all in plugins make[2]: Entering directory/root/tmp/nagios/nagios-plugins-1.4/plugins’
if gcc -DLOCALEDIR="/usr/local/nagios/share/locale" -DHAVE_CONFIG_H -I. -I. -I… -I… -I…/lib -I…/intl -I/include -I/usr/kerberos/include -g -O2 -MT check_load.o -MD -MP -MF “.deps/check_load.Tpo” -c -o check_load.o check_load.c;
then mv -f “.deps/check_load.Tpo” “.deps/check_load.Po”; else rm -f “.deps/check_load.Tpo”; exit 1; fi
check_load.c:73:9: invalid preprocessing directive #setlocale
make[2]: *** [check_load.o] Error 1
make[2]: Leaving directory /root/tmp/nagios/nagios-plugins-1.4/plugins' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/root/tmp/nagios/nagios-plugins-1.4’
make: *** [all] Error 2
root@host ~/tmp/nagios/nagios-plugins-1.4]# make all
make all-recursive
make[1]: Entering directory /root/tmp/nagios/nagios-plugins-1.4' Making all in intl make[2]: Entering directory/root/tmp/nagios/nagios-plugins-1.4/intl’
make[2]: Nothing to be done for all'. make[2]: Leaving directory/root/tmp/nagios/nagios-plugins-1.4/intl’
Making all in lib
make[2]: Entering directory /root/tmp/nagios/nagios-plugins-1.4/lib' make all-am make[3]: Entering directory/root/tmp/nagios/nagios-plugins-1.4/lib’
make[3]: Nothing to be done for all-am'. make[3]: Leaving directory/root/tmp/nagios/nagios-plugins-1.4/lib’
make[2]: Leaving directory /root/tmp/nagios/nagios-plugins-1.4/lib' Making all in plugins make[2]: Entering directory/root/tmp/nagios/nagios-plugins-1.4/plugins’
if gcc -DLOCALEDIR="/usr/local/nagios/share/locale" -DHAVE_CONFIG_H -I. -I. -I… -I… -I…/lib -I…/intl -I/include -I/usr/kerberos/include -g -O2 -MT check_load.o -MD -MP -MF “.deps/check_load.Tpo” -c -o check_load.o check_load.c;
then mv -f “.deps/check_load.Tpo” “.deps/check_load.Po”; else rm -f “.deps/check_load.Tpo”; exit 1; fi
check_load.c:73:9: invalid preprocessing directive #setlocale
make[2]: *** [check_load.o] Error 1
make[2]: Leaving directory /root/tmp/nagios/nagios-plugins-1.4/plugins' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/root/tmp/nagios/nagios-plugins-1.4’
make: *** [all] Error 2
root@host ~/tmp/nagios/nagios-plugins-1.4]# cd plugins
root@host ~/tmp/nagios/nagios-plugins-1.4/plugins]# make
if gcc -DLOCALEDIR="/usr/local/nagios/share/locale" -DHAVE_CONFIG_H -I. -I. -I… -I… -I…/lib -I…/intl -I/include -I/usr/kerberos/include -g -O2 -MT check_load.o -MD -MP -MF “.deps/check_load.Tpo” -c -o check_load.o check_load.c;
then mv -f “.deps/check_load.Tpo” “.deps/check_load.Po”; else rm -f “.deps/check_load.Tpo”; exit 1; fi
check_load.c:73:9: invalid preprocessing directive #setlocale
make: *** [check_load.o] Error 1