Testing plugins from the command line

Whenever we add a new plugin, figuring out the various options and arguments can be a lot of work, and doing this from the web interface might take too long.

Testing plugins from the command line speeds things up considerably. Once the plugin is installed (as discussed in the Adding plugins to the system section in Chapter 2, Basic Configuration), we can simply call it using various arguments.

So, logged in as the user Nagios, we start with a simple help call that should show all the arguments available in our plugin. This command assumes that the plugin was installed on our Opsview server.

/usr/local/nagios/libexec/check_my_plugin -h

If the plugin was installed on a remote host and the agent was updated to ...

Get Monitoring with Opsview now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.