[Nagiosplug-devel] RFC: Plugin API Changes
jd at op5.se
Tue Feb 28 13:18:04 CET 2006
Ethan Galstad wrote:
> On 28 Feb 2006 at 20:53, Andreas Ericsson wrote:
>> Ethan Galstad wrote:
>>> On 28 Feb 2006 at 10:52, Jason Martin wrote:
>>>> On Tue, Feb 28, 2006 at 12:10:02PM -0600, Ethan Galstad wrote:
>>>>> Line1: "Short output | Perf1"
>>>>> Line2: "Long output 1"
>>>>> Line3: "Long output 2"
>>>>> Line4: "Long output3 | Perf2"
>>>>> Line5: "Perf3"
>>>>> Line6: "Perf4"
>>>>> $SERVICEOUTPUT$="Short output"
>>>>> $PERFDATA$="Perf1 Perf2 Perf3 Perf4"
>>>>> $LONGSERVICEOUTPUT$="Long output 1\nLong output2\nLong output3\n"
>>>> How does Nagios differentiate between Line2 being 'long output' and
>>>> line5 being perfdata? Both follow a line with a | character in it.
>>> Any additional lines (beyond the first one) are considered standard
>>> text output and made a part of the $LONGSERVICEOUTPUT$ macro. Once
>>> a pipe symbol is found in those additional lines, anything after
>>> that symbol (including additional full lines of text) are considered
>>> to be performance data.
>> Seems like a tricky rule. Why not just stick with current behaviour
>> (that is, first pipe-char splits output and perf-data)? One can
>> already do multiple perf-data entries with that, using the current
> Just to make things clear, each of the "Perfx" components in the
> above example can contain multiple perf data entries. The additional
> perf data lines are present to allow for more (optional) perf data
> that could potentially break backward compatability in terms of line
> length if it was all on the first line.
> If all the perf data entries can fit on the first line, that's great.
> If not, some of them can be appended in later lines as described
> above. Either way, any perf data entries found will get concatenated
> into the $xPERFDATA$ macros.
> So the current plugins run just fine as they are, but the new design
> allows for longer output and perf data if necessary.
I might be way of here but why not simply let \n separate the diffrent
lines of perfdata as well as for the plugin output.
plugin output\n even more output\n output on third line | perfdata for
line1\n perfdata for line2\n perfdata for line3
SE-411 11 Göteborg
Cellphone: +46 733-709024
Fax: +46 31-7740432
> Ethan Galstad,
> Nagios Developer
> Email: nagios at nagios.org
> Website: http://www.nagios.org
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live webcast
> and join the prime developer group breaking into this new coding territory!
> 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
More information about the Devel