[Nagiosplug-devel] Perl Plugin - Output
Claudio M. Llanca
claudioll at gmail.com
Tue Feb 8 17:01:56 CET 2011
Make sense, thanks a lot Thomas.
On Fri, Feb 4, 2011 at 2:26 AM, Thomas Guyot-Sionnest <dermoth at aei.ca> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> On 11-02-03 02:24 PM, Claudio M. Llanca wrote:
>> Hi Guys, well, this is my fist post in this list. :)
>> So here is my doubt.
>> I'm using nagios perl module, to create a set of monitors to check for
>> specific application metrics on my company's client.
>> For that I'm using perl and the nagios perl module Nagios::Plugin .
>> The problem seems to be the exit structure of the performance data, as
>> you can see in my example, each value are separated using double
>> semi-colon , instead of a single. like the following link shows.
>> OUTPUT :
>> WWW RESPONSES OK | 20x=94.71%;; 30x=5.00%;; 40x=0.28%;; 50x=0.00%;;
>> So I've found the following line on Performance.pm (part of the nagios
>> plugin module)
>> # Previous implementation omitted trailing ;; - do we need this?
>> $out =~ s/;;$//;
>> So .. my question is, that output is still valid for nagios ?
> Yes, but you shouldn't have to do that. In fact, there's a number of
> semicolon for additional performance data, and each additional part is
> optional as well as the ; (if there's is no more parts).
> The spec is:
> so for example if you have only max to show, it will look like:
> But if you really want to remove any extra trailing semicolon, you can do:
> $out =~ s/;+(\s|$)/$1/g;
> Or keep the last one:
> $out =~ s/;+(\s|$)/;$1/g;
> This shouldn't affect performance data parsers at all.
> - --
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> -----END PGP SIGNATURE-----
> The modern datacenter depends on network connectivity to access resources
> and provide services. The best practices for maximizing a physical server's
> connectivity to a physical network are well understood - see how these
> rules translate into the virtual world?
> Nagios Plugin Development Mailing List Nagiosplug-devel at lists.sourceforge.net
> Unsubscribe at https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
> ::: Please include plugins version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
Claudio M. Llanca
More information about the Devel