Support quoting vertical bar (|) character in plugin output
Jochen Bern
Jochen.Bern at LINworks.de
Wed Mar 27 13:51:39 CET 2013
On 27.03.2013 12:24, Andreas Ericsson wrote:
> OTOH, perfdata should've been on a line of its own from the start,
> prefixed with 'perfdata=' instead of a magic character put in the
> plugin output.
Just in case that someone reads (or later unearths) this thread looking
for actual suggestions: Making it a magic *character* IMHO isn't the
problem *IF*:
-- it helps with still-limited buffers
-- you require it to appear *first* on the line (no scanning ahead
Lord-knows-how-far or breaking lines up)
-- you define a method (character stuffing?) to escape it in
non-perfdata ("output") lines
-- you allow an *arbitrary mix* of output and perfdata lines (so that
you can run a *series* of plugins or have a plugin printf() data
in whichever sequence it "naturally" comes across it without having
to worry that that'll break the global syntax)
-- you do the concatenation within Nagios properly (add back the '\n'
at the end of output lines *and a ' ' between perfdata lines*; the
current core assembles the perfdata from
printf("foo|bar=1\nbaz|org=2\n");
into "bar=1org=2")
^^
Regards,
J. Bern
--
*NEU* - NEC IT-Infrastruktur-Produkte im <http://www.linworks-shop.de/>:
Server--Storage--Virtualisierung--Management SW--Passion for Performance
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
------------------------------------------------------------------------------
Own the Future-Intel® Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
More information about the Developers
mailing list