mirror of
https://github.com/Icinga/icinga2.git
synced 2026-06-08 16:26:42 -04:00
ITL: Enhanced SMART attributes monitoring plugin check configuration to more parameters
This commit is contained in:
parent
c2c9b6b159
commit
0dbc1a7e6b
3 changed files with 50 additions and 9 deletions
1
AUTHORS
1
AUTHORS
|
|
@ -221,6 +221,7 @@ Nicolas Limage <github@xephon.org>
|
|||
Nicolas Rodriguez <nico@nicoladmin.fr>
|
||||
Nicole Lang <nicole.lang@icinga.com>
|
||||
Niflou <dubuscyr@gmail.com>
|
||||
Nils Czernia <nils@czserver.de>
|
||||
Noah Hilverling <noah.hilverling@icinga.com>
|
||||
noobahoi <20069422+noobahoi@users.noreply.github.com>
|
||||
Obihörnchen <obihoernchende@gmail.com>
|
||||
|
|
|
|||
|
|
@ -3032,10 +3032,18 @@ uses the `smartctl` binary to monitor SMART values of SSDs and HDDs.
|
|||
|
||||
Custom variables passed as [command parameters](03-monitoring-basics.md#command-passing-parameters):
|
||||
|
||||
Name | Description
|
||||
--------------------------------|-----------------------------------------------------------------------
|
||||
smart_attributes_config_path | **Required.** Path to the smart attributes config file (e.g. check_smartdb.json).
|
||||
smart_attributes_device | **Required.** Device name (e.g. /dev/sda) to monitor.
|
||||
Name | Description
|
||||
---------------------------------------|-----------------------------------------------------------------------
|
||||
smart_attributes_smartclt_path | **Optional.** Path where the smartctl binary can be found.
|
||||
smart_attributes_device | **Required.** Device name (e.g. /dev/sda) to monitor.
|
||||
smart_attributes_device_regex | **Required.** Alternative to *smart_attributes_device* but with the availability to use regex.
|
||||
smart_attributes_config_path | **Required.** Path to the smart attributes config file (e.g. check_smartdb.json).
|
||||
smart_attributes_user_config_path | **Optional.** Path where the JSON user config file can be found.
|
||||
smart_attributes_critical_if_not_found | **Optional.** If set to true, the check enters cirical state if the device was not found in the database.
|
||||
smart_attributes_no_sudo | **Optional.** If set to true, disable the usage of sudo for smartctl.
|
||||
smart_attributes_get_allperfs | **Optional.** Get performance data for all monitor-able smart attributes and don't limit performance data to the 'Perfs' section in the smartdb.json.
|
||||
smart_attributes_ssd_only | **Optional.** If set to true, only SSDs are checked, even if more devices are given
|
||||
smart_attributes_options | **Optional.** Additional parameters forwarded to smartctl binary
|
||||
|
||||
|
||||
### IcingaCLI <a id="plugin-contrib-icingacli"></a>
|
||||
|
|
|
|||
|
|
@ -8,15 +8,47 @@ object CheckCommand "smart-attributes" {
|
|||
command = [ PluginContribDir + "/check_smart_attributes" ]
|
||||
|
||||
arguments = {
|
||||
"-dbj" = {
|
||||
"--path" = {
|
||||
value = "$smart_attributes_smartclt_path$"
|
||||
description = "Specify the path at which the smartctl binary can be found."
|
||||
}
|
||||
"--device" = {
|
||||
value = "$smart_attributes_device$"
|
||||
description = "Insert the device name (e.g. /dev/sda) to monitor"
|
||||
}
|
||||
"--regex" = {
|
||||
value = "$smart_attributes_device_regex$"
|
||||
description = "Insert a regex to finde devices to monitori (version > 1.6)"
|
||||
}
|
||||
"--dbjson" = {
|
||||
required = true
|
||||
value = "$smart_attributes_config_path$"
|
||||
description = "Path to the smart attributes config file (e.g. check_smartdb.json)"
|
||||
}
|
||||
"-d" = {
|
||||
required = true
|
||||
value = "$smart_attributes_device$"
|
||||
description = "Insert the device name (e.g. /dev/sda) to monitor"
|
||||
"--ucfgjson" = {
|
||||
value = "$smart_attributes_user_config_path$"
|
||||
description = "Specify the path at which the JSON smart db can be found."
|
||||
|
||||
}
|
||||
"--critical_on_unknown" = {
|
||||
set_if = "$smart_attributes_critical_if_not_found$"
|
||||
description = "Show critical if the device was not found in database."
|
||||
}
|
||||
"-nosudo" = { # Only one '-' is correct, not a typo
|
||||
set_if = "$smart_attributes_no_sudo$"
|
||||
description = "Disable the usage of sudo for smartctl."
|
||||
}
|
||||
"--allperfs" = {
|
||||
set_if = "$smart_attributes_get_allperfs$"
|
||||
description = "Get performance data for all monitor-able smart attributes and don't limit performance data to the 'Perfs' section in the smartdb.json."
|
||||
}
|
||||
"--ssdonly" = {
|
||||
set_if = "$smart_attributes_ssd_only$"
|
||||
description = "Check SSDs only, even if more devices are given."
|
||||
}
|
||||
"--options" = {
|
||||
value = "$smart_attributes_options$"
|
||||
description = "Additional parameters forwarded to smarctl binary"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue