From: Eduardo M. <ema...@bs...> - 2005-03-02 17:53:19
|
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Matthias, I have tried running perfparse as a daemon. I ran it like this /opt/nagios/bin/perfparsed -d -e /var/log/perfparsed.error.log --drop-file /var/log/perfdrop.log -l /opt/nagios/var/perfdata-service.log --storage_modules_dir /opt/nagios/lib --storage_modules_load mysql The module load successfully 2005/03/02 11:41:59 [ storage.c:95 11976 ] storage_mysql module successfully loaded But I sill see no data in the database. So I have returned to having Nagios invoke perfparse. Which still gives me the same result. ####### Ben, <SHELL> rm /opt/nagios/var/perfdata_log.perfdata-service.log.mark I restarted nagios and restarted the server just to be sure and then ran the command again. <SHELL> /opt/nagios/bin/perfparse-log2mysql -r -e /var/log/nagios.error -l /opt/nagios/var/perfdata-service.log --drop-file /var/log/perf-drop.log -U nagios -P password -D perfparse -H localhost +-----------------------------+ +-----------------------------+ | Generic statistics | | Nb Log Lines : 1 | | Nb lines parsed : 0 | | Nb lines dropped : 0 | | Start date : 2005-03-02 | | Elapsed time : 00:00:00 | | Start time : 10:24:01 | | Rate : (line/sec) 0.00 | +-----------------------------+ +-----------------------------+ +-----------------------------+ +-----------------------------+ | MySQL storage statistics | | | | New Hosts : 0 | | Metric/line : 0.00 | | New Metrics : 0 | | Metrics Recorded : 0 | | New Services : 0 | | Summary Rec Added : 0 | | New Summary Group : 0 | | SQL Queries : 19 | +-----------------------------+ +-----------------------------+ no luck yet The lock regenerated, perfdata_log.perfdata-service.log.mark has the following contents... though I am not sure if this helps.: <SHELL>less perfdata_log.perfdata-service.log.mark 0 -1573911398 -Eduardo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ per...@li... wrote: >Send Perfparse-users mailing list submissions to > per...@li... > >To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/perfparse-users >or, via email, send a message with subject or body 'help' to > per...@li... > >You can reach the person managing the list at > per...@li... > >When replying, please edit your Subject line so it is more specific >than "Re: Contents of Perfparse-users digest..." > > >Today's Topics: > > 1. Re: zero values in database (Jessica Holle) > 2. Re: Problems in getting data [Virus checked] (Veiko Kukk) > 3. RE: No Data in Database after checking config files... [Virus > checked] (Mat...@ka...) > 4. Re: No performance data gathered (Steve Greenland) > 5. Re:Contents of Perfparse-users digest (Eduardo Martinez) > 6. Re: Re:Contents of Perfparse-users digest (Ben Clewett) > >--__--__-- > >Message: 1 >Date: Wed, 2 Mar 2005 07:38:07 +0100 (MET) >From: "Jessica Holle" <Je...@gm...> >To: Ben Clewett <bcl...@pe...> >Cc: per...@li... >Subject: Re: [Perfparse-users] zero values in database > >Hi, > >this is the link of the check_icmp patch which doesn't work. >I tested it with all the plugins which i can download and the icmp plugin is >there, it doesn't work... > >http://perfparse.sourceforge.net/files/check_icmp.c.patch > > > > > >>Jessica Holle wrote: >> >> >>>Hi, >>> >>>here is the output with this link you gice: >>> >>> >>>nagios@rzvlabwks:~/nagios-plugins-HEAD-200503010547/plugins> patch >>>check_icmp.c check_icmp.c.patch >>>patching file check_icmp.c >>>Hunk #1 FAILED at 657. >>>1 out of 1 hunk FAILED -- saving rejects to file check_icmp.c.rej >>> >>>it doesn't work... >>> >>> >>You will have to report this to the author of this patch. Can you tell >>me where you got it from? >> >>The correct place for the line I gave you is after the textdomain line. >> But I see this was for the file check_load. I can see you confusion >>since this does not exist in check_icmp. :) >> >>This may still work. Try adding this after line 347, which will now read: >> >> icmp_sockerrno = udp_sockerrno = tcp_sockerrno = sockets = 0; >> >> setlocale(LC_NUMERIC, "POSIX"); >> >>This should result in all ',' becoming '.'. Both in input and output. >> >>I do very much hope this is your problem fixed. >> >>Ben. >> >> >> >> >> >> >> >> >> >> >> >>>Where is the right place for this? >>> >>>setlocale(LC_NUMERIC, "POSIX"); >>> >>>can I write it where I want? Sorry for my noob qustions... >>> >>> >>> >>> >>> >>>>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 ??? >>>>>>>>> >>>>>>>>> >>>>>>>>> > > > |