[Nagios-users] ANNOUNCE: Nagios::WebTransact and Nagios::Config on CPAN!
John Arley Burns
johnarleyburns at yahoo.com
Mon Jul 28 21:39:05 CEST 2003
--- Russell Adams <RLAdams at Kelsey-Seybold.com> wrote:
> Any plans for creating a module to write Nagios configs?
>
> Perhaps dump a hash tree out to config file, optionally with
> optimizations?
The system I use here is template-driven. I have a template for what I
want a service or hostgroup to look like, with replacement variables in
the template file. Then I load the template into perl and do a simple
search/replace on the template code.
Template-driven configuration is generally easier than using hash trees
because there's a lot of stuff I don't care about in the program that's
easier to edit in a text file. For instance, I may want to change
timeout or check command or so forth in the text file and then just
re-run the config maker program using the template.
If Nagios ever adopts XML config files, which it should, then XSLT
provides an existing mechanism to generate config files via templates.
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
More information about the Developers
mailing list