From: Yves M. <yme...@li...> - 2004-07-20 15:25:15
|
Hi Garry, William... ! I just sent Ben my patch 0.99.01ym5 that should become 0.99.02 tomorrow. It has some bugs fixed, and a new feature: the quotes are now handled as = specified in nagios doc. label=3Dvalue 'label'=3Dvalue -> correct 'label with spaces ''nd quotes'=3Dvalue -> correct "label"=3Dvalue -> correct, but notice that "label" is equivalent to '"la= bel"' and not to label :) For Garry who maintains the documentation, there is a new option in the c= onfig file: Accept_Odd_Chars_in_Label: if you say yes, this is nagios behaviour. If y= ou say no (default answer), characters below ' ' are illegal characters. In previous versions of perfparse, they were already illegal characters. = Because this is not specified in nagios doc, I added this option. Now, what is not done: 1: "label =3D value" 2: 'label' =3D value 3: label =3D value I think that 'label'=3D value should work. The code allow this with a spa= ce char after the label. The 2/ and 3/ should be allowed. Maybe I will work on this one day. The 1/ has no interest, hasn't it ? You are supposed to quote texts, not = expressions. Expressions are usually inside brackets or parens. But what is the intere= st to have it here ? Now, if someone needs another syntax, it is possible to implement it: we = want perfparse flexible ! Yves > William, > > The documentation, as you say, states: > > 'label'=3Dvalue[UOM];[warn];[crit];[min];[max] > > However, PerfParse is very flexible. As so many 'official' plugins > don't provide the correct syntax, it will accept just about anything. = Eg: > > "label=3Dvalue" or even "label =3D value" > > With any unit (time/seconds/space/latency/users etc) you want, or none. > > However, PerfParse does not support the '' escapement. > > Eg, label =3D "metric's" should -> "'metric''s'" > > But PerfParse will read this as "'metric''s'" and not "metric's". :) > > This is not a problem as no plugins currently use this. It is on our > TODO list for future versions. > > However if you plan to use other tools than PerfParse, you may wish to > stick to the official where ever possible. > > I hope this is of some use, > > Regards, Ben. > > > Williams, P. Lane wrote: > >> I guess that's what I get for not following coding guidelines. Easy e= nough >> though. >> >> In the nagios performance guidelines, the data should look like >> >> 'label'=3Dvalue[UOM];[warn];[crit];[min];[max] >> >> Based on your example below....lets say with my disk data....My perfor= mance >> output should look like >> >> 'C-total'=3Dvalue 'C-free'=3Dvalue 'C-used'=3Dvalue;warn;crit;min;max >> >> Which I can exclude everything to the right of the semi-colon, if I wi= sh? >> >> Is this correct? >> >> Thanks, >> >> Lane >> >> -----Original Message----- >> From: Ben Clewett [mailto:Be...@cl...] >> Sent: Monday, July 19, 2004 4:13 AM >> To: Williams, P. Lane >> Subject: Re: Coding perfdata >> >> >> You can include as many metrics as you like in the performance data. >> You do have to use the correct syntax, which si explained here: >> >> http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN185 >> >> In it's simplest form, use: >> >> plugin output | metric1=3D12 metric2=3D54 metric3=3D43512.23432seconds >> >> I am glad you enjoy the product, >> >> Regards, >> >> Ben. >> >> >> Williams, P. Lane wrote: >> >> >>>Is there a certain way I should format the output of the performance >>>data. My performance data output contains more than just one value. >>>Such as my diskspace contains ....total=3D500,free=3D300,used=3D200. = Is only >>>one value allowed when using perfparse? Would it be possible to inclu= de >>>in the perfparse code a means for the code to detect multiple values a= nd >>>process accordingly. I am not a big C coder, but I believe it could b= e >>>done. >>> >>>This is a neat concept for Nagios. I see a lot of potential for this >>>app. Thanks, Lane >>> >> >> > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=3D4721&alloc_id=3D10040&op=3Dclick > _______________________________________________ > Perfparse-devel mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perfparse-devel > > --=20 - Homepage - http://ymettier.free.fr - http://www.logicacmg.com - - GPG key - http://ymettier.free.fr/gpg.txt - - Maitretarot - http://www.nongnu.org/maitretarot/ - - GTKtalog - http://www.nongnu.org/gtktalog/ - |