[Nagiosplug-devel] Testing the upcoming release
Jochen Bern
Jochen.Bern at LINworks.de
Thu Jun 28 15:42:37 CEST 2012
On 06/27/2012 07:05 PM, Jochen Bern wrote:
> On 06/27/2012 04:04 PM, Holger Weiß wrote:
>> Then again, according to
>> http://nagios.sourceforge.net/docs/3_0/pluginapi.html
>> the old output might be interpreted as a valid way to spit out
>> performance data (even though the first line contains no perfdata part).
>> I wouldn't have been sure whether Nagios actually passes this on as
>> performance data, but it seems you were able to use it?
>
> I can't say that I've tested it systematically, but I'm not aware of any
> problems in parsing multiline syntax in Nagios 3.x. Guess I'll slap a
> test plugin together, just in case ...
As it turns out, there *is* a small gotcha in how my 3.2.3 processes the
full-blown multiline format:
# ../libexec/check_multiline
Play Rock|foo=1 bar=2
Paper Scissors
Lizard Spock|baz=3 org=4
eeny=5 meeny=6
miny=7 moe=8
# grep -A 2 Play ../var/spool/status.dat
plugin_output=Play Rock
long_plugin_output=Paper Scissors\nLizard Spock
performance_data=foo=1 bar=2baz=3 org=4 eeny=5 meeny=6 miny=7 moe=8
(Note the missing whitespace between bar and baz. My test plugin doesn't
*provide* any whitespace there other than the EOL, on purpose, of course.)
I wonder how 3.3.x and 3.4.x handle this case ... ?
Regards,
J. Bern
--
Jochen Bern, Systemingenieur --- LINworks GmbH <http://www.LINworks.de/>
Postfach 100121, 64201 Darmstadt | Robert-Koch-Str. 9, 64331 Weiterstadt
PGP (1024D/4096g) FP = D18B 41B1 16C0 11BA 7F8C DCF7 E1D5 FAF4 444E 1C27
Tel. +49 6151 9067-231, Zentr. -0, Fax -299 - Amtsg. Darmstadt HRB 85202
Unternehmenssitz Weiterstadt, Geschäftsführer Metin Dogan, Oliver Michel
More information about the Devel
mailing list