[Nagiosplug-devel] Suggested alterations to the Performance Protocoll

Andreas Ericsson ae at op5.se
Fri Sep 17 02:56:07 CEST 2004


Yves Mettier wrote:
>>>2| label=valueUOM;range... label='string'
>>>3| label=valueUOM;range... label='string' | <xml>extra data</xml>
> 
> 
>>I vote for 2, but with a guideline on the type of strings (as suggested
>>by Ben). Log file entries that are uniquely different (eg, by the
>>addition of time), should not be included. I would also put a paragraph
>>on the future idea of XML data because everyone here seems to think it
>>is a good idea and I don't want to lose it.
> 
> 
> If you want a guideline on the type of strings, I agree in the concept, but we cannot do
> it easily and keep things simple.
> Why would we have valueUOM;range... without quotes, and all other possibilities inside
> quotes ? The answer is: because of compatibility. This is not a good answer for me.
> 
> I have an idea: we have nothing on the label yet :)
> Could we have label:type=value ?
> 
> label1:string='any string'
> label2:perf=valueUOM;range...
> label3:log=timestamp;'log line'
> label4:double=value   (just a value, that can be stored in a "double" variable in C)
> label5:int=value      (just an integer value...)
> 
> label:type=value
> 

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.

> - label allows any character except one of " :'" and if you want to put one of those
> chars inside the label, you can still do it if you put the label between quotes, and ''
> is considered as ' inside quotes, like now.
> 

Use shell (backslash) escapes or die. ;)

> - type is an allowed one. My parser allows "string" and "perf" but recognize it from a
> value with or without quotes. For compatibility, I will keep that behaviour when the
> type is not specified. Allowed types are discussed here of course :)
> 
> - value follows the syntax corresponding to the type. "string" syntax is any string
> inside quotes. "perf" syntax is the current one. "log" would be (remove the double
> quotes) "timestamp;'log line'". "ipaddress" would be A.B.C.D where A->D are either
> decimal or hexa numbers. We can even have a type "error" where the string explain the
> error. This is probably for debugging purpose. And so on...
> 

How about ip-ranges?
ip=192.168.0.1, network=192.168.0.255
or
ip_mask=192.168.0.0/24 ?

> 
> 
>>I think we should use standard C convention for the strings - eg, use
>>single quotes, allow any characters with two single quotes for a single
>>quote within the string, so check_procs may return:
>>   process_warn='httpd' process_warn='java program'
>>process_critical='/usr/bin/xntpd'
>>Also allow duplicate labels (for pie chart purposes).
> 
> 
> My parser already allows this, so I can only agree :)
> 

Since when is single quotes in the C convention for strings? Single 
quotes is generally considered for script languages in non-interpolated 
strings, and in C for alpha-numeric characters.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer




More information about the Devel mailing list