Welcome to docs.opsview.com
Table of Contents
Developing Plugins
Introduction
Nagios uses 'plugins' for the purpose of monitoring. A monitoring plugin is simply an executable or script that conforms to a standard. Nagios executes monitoring plugins on remote hosts via a monitoring agent (NRPE).
Guidelines
All plugins should conform to the Nagios Plugin Project guidelines.
In general:
- Script should be capable of running as 'nagios' user (not root)
- Script should be runnable using the full path and not from the current directory
- i.e.
cd /tmp ; /path/to/plugin <args>
- Script should generate a single, concise, line of output (on stdout, not stderr).
- Scripts should return the following exit codes
- 0 - OK
- 1 - Warning (warning threshold exceeded or script identified a minor problem)
- 2 - Critical (critical threshold exceeded or script identified a 'critical' problem)
- 3 - Unknown (invalid arguments, unable to gather data, etc)
- Specifying an argument of '-h' should return usage information (what the script does, what arguments it accepts, etc)
- Script should confirm to using standard switches (see the full guidelines for more information), i.e.
- -H <hostaddress>
- -c <critical limit>
- -w <warning limit>
Trace: » quickstart » model » nagios » dbconnections » contributing » developmentserver » faq » templates » acl » plugins