Monitoring::Plugin::Config(3pm) | User Contributed Perl Documentation | Monitoring::Plugin::Config(3pm) |
Monitoring::Plugin::Config - read nagios plugin .ini style config files
# Read given nagios plugin config file $Config = Monitoring::Plugin::Config->read( '/etc/nagios/plugins.ini' ); # Search for and read default nagios plugin config file $Config = Monitoring::Plugin::Config->read(); # Access sections and properties (returns scalars or arrayrefs) $rootproperty = $Config->{_}->{rootproperty}; $one = $Config->{section}->{one}; $Foo = $Config->{section}->{Foo};
Monitoring::Plugin::Config is a subclass of the excellent Config::Tiny, with the following changes:
To use a custom location, set a "NAGIOS_CONFIG_PATH" environment variable to the set of directories that should be checked. The first "plugins.ini" or "nagios-plugins.ini" file found will be used.
Config::Tiny, Monitoring::Plugin
This code is maintained by the Monitoring Plugin Development Team: see https://monitoring-plugins.org
Copyright (C) 2014 by Monitoring Plugin Team Copyright (C) 2006-2014 by Nagios Plugin Development Team
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
2018-07-26 | perl v5.26.2 |