Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ Nicolas Limage <[email protected]>
Nicolas Rodriguez <[email protected]>
Nicole Lang <[email protected]>
Niflou <[email protected]>
Nils Czernia <[email protected]>
Noah Hilverling <[email protected]>
noobahoi <[email protected]>
Obihörnchen <[email protected]>
Expand Down
16 changes: 12 additions & 4 deletions doc/10-icinga-template-library.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
42 changes: 37 additions & 5 deletions itl/plugins-contrib.d/smart-attributes.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

Expand Down
Loading