O'Reilly logo

Nagios, 2nd Edition by Wolfgang Barth

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

25.6 Configuration Files for Plugins

A simple plugin can always be configured entirely on the command line. But if you need to incorporate more complex defaults, or if parameters should not appear as arguments in the process list, a configuration file may be of use. The module Nagios::Plugin enables you to access configuration files in a simple manner—one reason certainly being to encourage plugin programmers to use a uniform format, since this would considerably simplify configuration work for the Nagios admin, who no longer has to get used to different formats for every plugin.

Nagios::Plugin provides an interface for the module Config::Tiny. The file format corresponds to that of the INI files:

rootproperty=10.0

[math]
pi=3.1415
euler=2.78

A section ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required