[Nagiosplug-devel] Suggested alterations to the Performance Protocoll

Yves Mettier ymettier at libertysurf.fr
Tue Sep 14 08:47:05 CEST 2004


Inside this mail, you can find an URL to my new parser. Please test it and take it into
account before giving any opinion: some may change their point of view like I did :)
For comments on the parser, please change the subject. For bug reports, send a mail
directly to me :)

> Hi Yves,
>
> Thanks for the info.
>
> If we use strings, my idea is more advise to the developer of the
> plugin:  Strings are legal.  These will be interpreted as a collection
> of compatible objects, or an enumerated list.  Such as can be displayed
> in a pie chart.
>
> This will therefore allow the use of, say, IP addresses.  But not, say,
> arbitrary lines from a log file.

This is a debate for perfparse mailing list I think :)

Here is my actual point of view for perfparse:
The generic parser will parse numeric perf data AND strings.
The generic parser can recognize if this is a string (value beginning with quotes) or
numeric perf data (value beginning with anything else than quotes)

perfparse will use that and only work with numeric perf data to draw what is drawable.

Now, some extra feature of perfparse would be to understand some strings, but we have to
put that in some cfg file.

When you want that we allow "some collection of compatible objects, or an enumerated
list", you have to define this somewhere. We can define it in the plugins doc about perf
data. This restricts the use of perf data. We can also define it in each parser and have
the doc open.

I prefer to move the debate on what strings are allowed and what strings are illegal to
each perf tool (including perfparse) and have a generic parser to allow every string, as
soon as the string is inside quotes.

Now, please have a look on some preview of my parser (yes, at last ! :)
http://ymettier.chez.tiscali.fr/perfparse-devel/nagios_generic_perf_parser-0.0.1.tar.gz

Run the example with a serviceperf.log as an argument and it will parse it and show you
what was parsed on the command line.

log_parser.c and log_parser.h are the parser, that may be part of perfparse or that
could also be a standalone project. I don't know yet. Those don't use glib.
log_reader.c and log_reader.h will probably be part of perfparse. glib is needed here.

I have not tested it with "inf" and "nan" values. They are probably recognized. "~" is
also recognized.



>
> If the strings cannot be understood in a mathematical or statistical
> context, I think they should be added to the XML data, and not as
> performance data.  This gives the XML a valid use, and the performance
> data a valid use.

This is still possible, but not supported by my parser yet.

Yves
-- 
- 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/                    -







More information about the Devel mailing list