icinga2/itl/plugins-contrib.d
Rostislav Opocensky e05128fa3c
pass nwc_health check SNMPv3 args only if needed (#9095)
* pass nwc_health check SNMPv3 args only if needed

check_nwc_health fails if any of the SNMPv3 arguments were passed but
the SNMP version 3 protocol was not requested.

For instance the following works:

	check_nwc_health --hostname 192.0.2.3 --mode cpu-load \
		--protocol 1 --community public

While the following plugin invocation results in an error:

	check_nwc_health --hostname 192.0.2.3 --mode cpu-load \
		--protocol 1 --community public \
		--username joe --authpassword xxx

The superfluous SNMPv3 arguments may easily get inherited e.g. from host
templates.

* string()ify the result of macro() calls

Always convert results of macro("$nwc_health_protocol$") to strings
so both numbers and strings are correctly recognized.

* Revert "string()ify the result of macro() calls"

This reverts commit 3636b5b4ba.

Wrong method applied to the result of macro().

* string()ify the result of macro() calls

Always convert results of macro("$nwc_health_protocol$") in the
set_if clauses of the nwc_health command arguments to strings.
Both numbers and strings are then correctly recognized as the
nwc_health_protocol argument.

* string()ify the result of macro() calls

Always convert results of macro("$nwc_health_protocol$") in the
set_if clauses of the nwc_health command arguments to strings.
Both numbers and strings are then correctly recognized as the
nwc_health_protocol argument.
2021-12-07 15:29:34 +01:00
..
CMakeLists.txt ITL: Add check_systemd 2021-01-15 13:27:25 +01:00
big-data.conf ITL: Align plugins-contrib.d to PluginContribDir 2019-07-22 09:37:48 +02:00
databases.conf [ITL] Added --datadir, --language and --perflimit for check_postgres 2021-10-01 19:53:53 +02:00
hardware.conf ITL: Align plugins-contrib.d to PluginContribDir 2019-07-22 09:37:48 +02:00
icingacli.conf Add check command for x509's host check 2019-05-13 14:36:27 +02:00
ipmi.conf Added new options for ipmi-sensor to ITL 2020-11-25 16:10:30 +01:00
logmanagement.conf ITL: Fix check_logfiles definition and documentation 2019-07-11 19:31:37 +02:00
metrics.conf Replace Copyright header with a short version, part I 2019-02-25 14:48:22 +01:00
network-components.conf pass nwc_health check SNMPv3 args only if needed (#9095) 2021-12-07 15:29:34 +01:00
network-services.conf Added parameter to monitor a specific jail only, as this has been available in the original check_command for years but hasn't made it into the checkcommand yet 2020-04-03 13:18:53 +02:00
operating-system.conf ITL: Add sar-perf 2019-08-16 13:46:22 +02:00
raid-controller.conf ITL: Align plugins-contrib.d to PluginContribDir 2019-07-22 09:37:48 +02:00
smart-attributes.conf ITL: Align plugins-contrib.d to PluginContribDir 2019-07-22 09:37:48 +02:00
storage.conf ITL: Align plugins-contrib.d to PluginContribDir 2019-07-22 09:37:48 +02:00
systemd.conf ITL: Add check_systemd 2021-01-15 13:27:25 +01:00
virtualization.conf Add new -S parameter for esxi_hardware ITL 2021-05-28 11:06:59 +02:00
vmware.conf Replace Copyright header with a short version, part I 2019-02-25 14:48:22 +01:00
web.conf check_ssl_cert: support --ignore-tls-renegotiation (#9042) 2021-11-02 12:05:30 +01:00
windows.conf Change file location, doc, and varaible names as requested in the review 2019-10-18 07:45:21 +02:00