From: Ben C. <bcl...@pe...> - 2005-03-01 13:49:17
|
Jessica, The fix I gave must work. Specifically the addition of this line in the correct place: setlocale(LC_NUMERIC, "POSIX"); This will convert the ',' to '.' and allow the plugin to work. I think you may need to start by downloading the very latest plugins from here: http://nagiosplug.sourceforge.net/snapshot/ Take the one containing the work 'HEAD'. Let me know, Ben Jessica Holle wrote: > Hi, > > I've tested the two things, but the problem is already the same. > > I can nithing find a place in the plugins where I should copy the one lin > you told. This is only in the check_load plugin. > > I think this problem is because of the point between the numbers there > should be a . !!! > > Another problem is the check_nt plugin... There are perfdata but no data is > written in the mysql database. > > nagios@rzvlabwks:/usr/local/nagios/libexec> ./check_nt -H jholle -v > USEDDISKSPACE -l C -w 85 -c 95 > C:\ - total: 38,28 Gb - used: 3,72 Gb (10%) - free 34,56 Gb (90%) | 'C:\ > Used Space'=3,72Gb;32,54;36,36;0.00;38,28 > > here are perfdata, this data is written in the log but not in the > database... > > > I've found patches for some plugins on the perparse homepage... but they > doesn't work... > > nagios@rzvlabwks:~/nagios-plugins-1.4/plugins> patch check_nt.c > check_nt.c.patch > patching file check_nt.c > Hunk #1 FAILED at 2. > Hunk #2 FAILED at 81. > Hunk #3 FAILED at 140. > Hunk #4 FAILED at 164. > Hunk #5 FAILED at 202. > Hunk #6 FAILED at 223. > Hunk #7 FAILED at 255. > Hunk #8 FAILED at 291. > Hunk #9 FAILED at 352. > Hunk #10 FAILED at 545. > Hunk #11 succeeded at 675 (offset 103 lines). > Hunk #12 succeeded at 685 (offset 103 lines). > Hunk #13 succeeded at 695 (offset 103 lines). > Hunk #14 succeeded at 716 with fuzz 1 (offset 104 lines). > 10 out of 14 hunks FAILED -- saving rejects to file check_nt.c.rej > > > > > >>Jessica, >> >>Sorry I missed that. The answer is however the same. Try editing >>and/or recompiling your plugin as I suggest. >> >>Regards, >> >>Ben Clewett. >> >> >>Jessica Holle wrote: >> >>>Sorry, >>> >>>but my problem is nocht the check_load! For this I've found an >> >>solution:-) >> >>>My problem is the check_icmp plugin. >>> >>>or is this problem solved if I configure it again? >>> >>>regards jessica >>> >>> >>> >>> >>>>Jessica, >>>> >>>>These are known bugs in the plugins which are causing lots of users >>>>problems. >>>> >>>>I can suggest two solutions. >>>> >>>>1. Recompile the plugins using: >>>> >>>>./configure --disable-nls >>>> >>>>I have not tested this, but I believe this should work. >>>> >>>>2. 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------------------- >>>> >>>>This should sort out your problems. Please let us know. >>>> >>>>Regards, >>>> >>>>Ben. >>>> >>>> >>>> >>>>Jessica Holle wrote: >>>> >>>> >>>>>Sorry, but I've forgotten another thing. >>>>> >>>>>First I tell you something, so it's better to understand I hope. >>>>> >>>>>I had problems with the check_load plugin: >>>>> >>>>>nagios@rzvlabwks:/usr/local/nagios/libexec> ./check_load -w 1.5,1.5,1.5 >>>> >>>>-c >>>> >>>> >>>>>4.0,2.0,2.0 >>>>>Warning threshold must be float or float triplet! >>>>> >>>>>Usage: check_load -w WLOAD1,WLOAD5,WLOAD15 -c CLOAD1,CLOAD5,CLOAD15 >>>>> >>>>> >>>>>So I get this bad output, but I've found a solution: >>>>> >>>>>nagios@rzvlabwks:/usr/local/nagios/libexec> ./check_load -w 1,5:1,5:1,5 >>>> >>>>-c >>>> >>>> >>>>>4,0:2,0:2,0 >>>>>OK - load average: 0,27, 0,30, >>>>>0,29|load1=0,270000;1,500000;4,000000;0,000000 >>>>>load5=0,300000;1,500000;2,000000;0,000000 >>>>>load15=0,290000;1,500000;2,000000;0,000000 >>>>> >>>>> >>>>>So I think there is a problem with , and . !!! >>>>> >>>>>Some days before the first "version" of my check_load numbers worked >> >>but >> >>>>now >>>> >>>> >>>>>I do it with the second. >>>>> >>>>> >>>>>And now to my right problem... >>>>> >>>>>It's about the values in my database: >>>>> >>>>>47020 | jholle | Ping | rta | 2005-02-28 15:51:39 >> >>| >> >>>> >>>> >>>> >>>>>0 | 85 | 95 | 0 | >>>>>| 47021 | jholle | Ping | pl | 2005-02-28 >> >>15:51:39 >> >>>>| >>>> >>>> >>>>> 0 | 40 | 80 | 0 | >>>>> >>>>> >>>>>There are no values only a zero. >>>>> >>>>>nagios@rzvlabwks:/usr/local/nagios/libexec> ./check_icmp -H jholle >>>>>OK - jholle: rta 0.224ms, lost 0%|rta=0.224ms;200.000;500.000;0; >>>>>pl=0%;40;80;; >>>>> >>>>> >>>>>But here are values. When this value goes over 1 it is shown in >>>> >>>>database, >>>> >>>> >>>>>but only as a 1 not the float integers. >>>>>I think this is because of the . ! I think it is like my first problem. >>>>>there was a point which could not be interpreted and here is a point >>>> >>>>again. >>>> >>>> >>>>>I don't know but I think when there is a , and not a . the problem is >>>>>solved... >>>>> >>>>>Can I think right ??? >>>>> >>>> > |