Plugin to archive cisco configs

Cook, Garry GWCOOK at mactec.com
Fri Mar 5 16:59:48 CET 2004


I recently spoke of using plugins to upload cisco configuration files to
a tftp server on the Nagios Users list. The discussion didn't get very
far, so I thought it might be apt to try again on this list.

Some time ago I created a shell script that uses snmpset to tell devices
(IOS routers/switches and CatOS switches) to upload their running
configuration to a tftp server. On IOS devices the running configs are
also written to NVRAM, so that any unsaved changes are not lost during a
reboot. I started thinking about how much easier it would be to have a
Nagios plugin to do this, as I could then just apply it to devices as
needed, rather than having to edit the script each time I wanted a new
device backed up. This would also give me the ability to put devices on
different backup schedules, as currently my script is run from cron for
all devices at once. I looked into using the check_snmp plugin, although
that seems to only use the 'snmpget' command, and as it is written in C
(IIRC) I don't yet possess the ability to change it.

I've created a shell script plugin to perform this task and tested from
the command line, although it still needs work and I have not yet tested
it from within Nagios. Therefore, I will not yet include it for review,
unless specifically asked to do so.

What I would like to request at this time is input on whether or not
such a plugin fits the standard definition of 'plugin'. It seems to me
as though most of the available plugins are only 'checks', in that they
check and report on the status of services. If we want to actually make
a device do something, an event handler must be used. Is this a correct
statement, and is it considered a rule to be followed?
If so, I will consider moving towards creating a plugin that checks the
mtime of archived configs and then runs an event handler to do the work
of uploading a new config if necessary. Although this would then require
that either the configs be archived on the Nagios server, or NRPE or
something similar be used to check the mtime of the archives. I'd rather
not go this route if my current solution would be considered valid.
Just out of curiosity, has anyone ever contributed a plugin with an
attached event handler?

Garry W. Cook, CCNA
Network Infrastructure Manager
MACTEC, Inc. - http://www.mactec.com/
303.308.6228 (Office) - 720.220.1862 (Mobile) 


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click




More information about the Developers mailing list