SNMP4Nagios
Home
Features
Requirements
Documentation
Downloads
Support
Legal
Contact
previous next title contents index option index software index

8. Developing New Plugins

Developing new plugins is not too difficult. In any case you should only need to copy and change one of the check_*.c files, preferrably check_if_by_snmp.c because this has additional comments regarding what needs to be modified.

You should never need to change any “helper” file.

Before you start coding, you should have collected the symbolic and numerical OIDs and the type, description and (if applicable) possible values for the objects which are provided by the appropriate MIB file.

8.1. The Helper Files

All helper headers contain at least some documentation about the symbols which are declared.

decoders.[ch]
Provides a function mapping locations as returned by Compaq agents to the appropriate strings. You don't need to bother with this.
globals.[ch]
Declares global variables and functions which have to be provided by the program.
nagiosif.[ch]
Provides a few utility functions for the interface to nagios.
rrdif.[ch]
Provides the interface to librrd. There are quite a few constants and functions declared there—you should really read the header file.
snmpif.[ch]
Provides the interface to Net-SNMP.
strutils.[ch]
Provides a few functions which have to do with strings.
syslogif.[ch]
Provides utility functions to handle logging and error handling (which is: log the error and exit).
utilities.[ch]
Provides functions which either read command line parameters or write some kind of message to stdout.
previous next title contents index option index software index
SourceForge.net Logo    Copyright © 2006, 2007 Peter Gritsch