Re: [Nagios-devel] Re: [Nagios-users] ANNOUNCE: Nagios::WebTransact and Nagios::Config on CPAN!

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] Re: [Nagios-users] ANNOUNCE: Nagios::WebTransact and Nagios::Config on CPAN!

Post by Guest »

I figured template based was the way to go, but I was curious because
I'm hacking on CHIRP (a SNMP autoconfiguration perl script for
Cricket) to support some devices, and I was considering modifying the
output to create Nagios configs for the same devices.

I think the hashes that CHIRP keeps are config file specific, so it
may be a moot point.

Along the same lines, aside from nmap2nagios, what do others use to
automatically create/update their configs?

Russell

On Mon, Jul 28, 2003 at 12:39:05PM -0700, John Arley Burns wrote:
>
> --- Russell Adams 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 post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked