[Nagiosplug-devel] Suggested alterations to the Performance Protocoll

Ben Clewett Ben at clewett.org.uk
Mon Sep 20 04:01:06 CEST 2004


Just a comment or two, I want to get this completed now :)

Andreas,

>>I suggest following the KISS rule. Please don't turn perfparse into
>>something too complicated for users to use, and don't make it too
>>monolithic to install.

I totally agree with KISS.  Very easy to go on designing way beyond what 
is needed or wanted.  Can I pick up your commend about making PerfParse 
something 'too monolithic to install'.  I am not sure what you mean.  Do 
you mean we should break the product into lots of libs?

> This was just a bad example. For now, I only see the following uses :
> label1:string='any string'
> label2:perf=valueUOM;range...
> label3:log=timestamp;'log line'

Have we agreed 1 and 2?  I think so.  Label 3 looks interesting, 
although not much to separate from label 2.

Can I suggest with log lines, and other non-unique data, that the data 
is written into the standard textual output of the plugin, with the 
timestamp of the plugin.  This already does a very good job of storing 
this kind of data.  An extension of '| timestamp=23432432432.123'  has 
already been discusses as a correction if the plugin time is not 
correct.  Do we need anything more?  If so is it time to break into XML 
rather than a large confusing collection of metric formats?  (Sorry Yves :)

>>Use shell (backslash) escapes or die. ;)
> 
> I prefer the backslash too. Others said '' to escape a '
> This is not too hard to code and I can change that in my parser. What should I do ?

I have to observe that the metric label already uses the SQL style 
'escape''d' varaibles.  It would look odd for the string to then use the 
UNIX style 'escape\'d' format?  So I die ;)

I also observer that no published plugins use any label escaping at the 
moment, so there is no reason not to change it .

I also note that this format is flawed.  You can only escape ''''.  You 
cannot escape other characters.  Like \n as 'n or \t as 't.  Doesn't work.

Further, users are UNIX scripters before SQL scripters and the backslash 
might look more natural to them.

So I vote to scrap the '' in all cases and use \\ instead.  For what 
it's worth...

Ben






More information about the Devel mailing list