- update to 2.4.0 General + Use C99 booleans @RincewindsHat + Improve negate plugin helptext @euniceremoquillo + Add new test function for percentage expressions @RincewindsHat Single Plugins + check_mailq: remove trailing whitespaces @sni + check_mailq: unify tabs/spaces @sni + check_oracle: Shellcheck fixes @RincewindsHat + check_ups: output ups.realpower if supported @sbraz + check_disk: add -n short option for --ignore-missing @sni + check_procs: Improve help text, mentioning excluded processes @shartge + check_procs: Generalise wording, remove mentioning of nrpe @shartge + check_curl: add haproxy protocol option @emriver + check_disk: increase alert precision @sni + check_ircd: IPv6 support @oxzi + check_nwstat: adds percentage used space + check_swap: Possibility to run check_swap without thresholds @Napsty + check_ups: additional alarm conditions @RincewindsHat + check_http/check_curl: added a --regex-state option to change the state of a regex check @andreasbaumann General Fixes + Fixes for -Wsign-compare @RincewindsHat + Fix logic in is_uint64_t to fix type-limit warning @RincewindsHat + Prevent -lcrypto from showing up in Makefile dependencies @EricFromCanada + Change irritating NULL assignment @RincewindsHat Single Plugin Fixes + check_dbi: Compiler warning for uninitialized variable @RincewindsHat + check_curl: Initialize pointer before usage @RincewindsHat + check_ntp: Initialize intermediate results in any case @RincewindsHat + check_tcp: Fixes an error with using the wrong type for a variable @RincewindsHat OBS-URL: https://build.opensuse.org/request/show/1194151 OBS-URL: https://build.opensuse.org/package/show/server:monitoring/monitoring-plugins?expand=0&rev=123
96 lines
3.2 KiB
Plaintext
96 lines
3.2 KiB
Plaintext
Topics:
|
|
* Extra-Opts
|
|
* Further use of the /etc/monitoring-plugins directory
|
|
|
|
|
|
|
|
|
|
Extra-Opts
|
|
==========
|
|
|
|
Starting with the 1.4.12 release, most Monitoring Plugins (those written in C)
|
|
support reading options from a configuration file. Since version 2.0, this is
|
|
enabled by default.
|
|
|
|
You can easily know if a plugin supports Extra-Opts by checking the --help
|
|
output for the --extra-opts option. Once compiled in, the --extra-opts plugin
|
|
option allows reading extra options from a config file. The syntax for the
|
|
command is:
|
|
|
|
--extra-opts=[section][@file]
|
|
|
|
Some examples:
|
|
|
|
Read special_opts section of default config file:
|
|
|
|
$ ./check_stuff --extra-opts=special_opts
|
|
|
|
Read special_opts section of /etc/myconfig.ini:
|
|
|
|
$ ./check_stuff --extra-opts=special_opts@/etc/myconfig.ini
|
|
|
|
Read check_stuff section of /etc/myconfig.ini:
|
|
|
|
$ ./check_stuff --extra-opts=@/etc/myconfig.ini
|
|
|
|
Read check_stuff section of default config file and use additional
|
|
arguments along with the other specified arguments (Extra-Opts arguments are
|
|
always processed first no matter where --extra-opts appears on the command
|
|
line):
|
|
|
|
$ ./check_stuff --extra-opts -jk --some-other-opt
|
|
|
|
The default nagios plugins file is used if no explicit filename is given. The
|
|
current standard locations checked are:
|
|
|
|
/usr/local/etc/monitoring-plugins/monitoring-plugins.ini
|
|
/usr/local/etc/monitoring-plugins.ini
|
|
/etc/monitoring-plugins/monitoring-plugins.ini
|
|
/etc/monitoring-plugins.ini
|
|
|
|
To use a custom location, set the MP_CONFIG_FILE environment variable to the
|
|
desired path name.
|
|
|
|
To specify an option without parameter, you can use a key without value, but
|
|
the equal sign must remain, for example:
|
|
|
|
allow-regex=
|
|
|
|
Also note that repeated keys are allowed within sections just like you can
|
|
repeat arguments on the command line.
|
|
|
|
The basic theory is that options specified in the configuration files are
|
|
substituted at the beginning of the command line.
|
|
|
|
The initial use case for this functionality is for hiding passwords, so you do
|
|
not have to define sensitive credentials in the configuration of your
|
|
monitoring server and these options won't appear in the command line.
|
|
|
|
|
|
Permissions
|
|
===========
|
|
|
|
As some plugins require log in data, which are formerly stored in
|
|
/etc/{icinga,nagios}/resource.cfg
|
|
and can now be stored inside the extra-opts file, please remember that the same
|
|
security rules apply now also to this new extra-opts file. Under normal
|
|
circumstances, you should set restrictive permissions (600 or 640) on them.
|
|
User: root
|
|
Group: icinga or nagios, depending on your monitoring daemon
|
|
|
|
|
|
Further use of the /etc/monitoring-plugins directory
|
|
====================================================
|
|
|
|
Some Monitoring Plugins (like check_zypper) support additional configuration
|
|
files to be included/sourced in on execution. As long as the location of those
|
|
additional configuration files is not fixed, we recommend to use this directory
|
|
for it.
|
|
|
|
@Packagers: please consider encapsulating Plugins with Apparmor or SELinux
|
|
profiles. For security and conveniance reasons, please allow your plugins to
|
|
read in the /etc/monitoring-plugins directory - or even better: allow your
|
|
plugins to read their configuration file below /etc/monitoring-plugins.
|
|
|
|
|