[Patch] Nagios 3.0.3: extinfo.cgi to show hosts custom vars and parents

Thomas Guyot-Sionnest thomas at zango.com
Wed Sep 24 19:06:08 CEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andreas Ericsson wrote:
> Marcus Fleige wrote:
>> Hi Ethan, hi list,
>>
>> i had a request here to make the custom variables defined in host 
>> definitions visible. Thought it might be useful for others too, so here 
>> is a patch against Nagios 3.0.3 extending the extinfo.cgi to show more 
>> info. (See screenshot for an example.)
>>
> 
> Looks nice, and I can imagine it being useful, depending on what kind
> of information you put there. OTOH, I know a lot of people put some
> confidential data in their custom variables.
> 
> If you amend the patch with the possibility to make displaying the
> custom vars configurable from cgi.cfg and let it have a default
> value of "off" (ie, don't show custom variables), I'll queue it
> for Ethan to review later.

Some time ago I suggested allowing custom macros to be processed by the
filters (url_encode, stripping shell characters) when they are prefixed
by specific strings (ex: _URL_SOMEURL would be URL-encoded). While the
exact syntax could be worked on, it would be possible at the same time
to allow prefixes for showing the variables. Maybe a single letter flag
could be useful as we could stack them. Ex: _SU_SOMETHING would mean
"showable + url_encode" so the macros would be both shown and url-encoded.

Also, using single-character flags, there would be a need to
differentiate between flagged and flagless custom macros - I haven't
really though about that yet... since underscores are likely valid,
maybe double underscore (ex: __SU_SOMETHING) with an error if a macro
contains unknown flags in case someone already use double_underscores
for some reason.

Any thoughts?

- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFI2nOA6dZ+Kt5BchYRAuiwAKDuK/1shxIDY0bwb2oQtF2e5lJX2ACgziPM
x4YRoyvQ0QiJplg7pf6Egh8=
=wVX/
-----END PGP SIGNATURE-----

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/




More information about the Developers mailing list