diff --git a/doc/08-advanced-topics.md b/doc/08-advanced-topics.md index 689be9a97..fe427abfb 100644 --- a/doc/08-advanced-topics.md +++ b/doc/08-advanced-topics.md @@ -529,7 +529,7 @@ System | Memory, Swap | [mem](10-icinga-template-library.md#plugin-contrib-co System | Hardware | [hpasm](10-icinga-template-library.md#plugin-contrib-command-hpasm), [ipmi-sensor](10-icinga-template-library.md#plugin-contrib-command-ipmi-sensor) System | Virtualization | [VMware](10-icinga-template-library.md#plugin-contrib-vmware), [esxi_hardware](10-icinga-template-library.md#plugin-contrib-command-esxi-hardware) System | Processes | [procs](10-icinga-template-library.md#plugin-check-command-processes), [service-windows](10-icinga-template-library.md#windows-plugins) (Windows Client) -System | System Activity Reports | [check_sar_perf](https://github.com/dnsmichi/icinga-plugins/blob/master/scripts/check_sar_perf.py) +System | System Activity Reports | [sar-perf](10-icinga-template-library.md#plugin-contrib-command-sar-perf) System | I/O | [iostat](10-icinga-template-library.md#plugin-contrib-command-iostat) System | Network interfaces | [nwc_health](10-icinga-template-library.md#plugin-contrib-command-nwc_health), [interfaces](10-icinga-template-library.md#plugin-contrib-command-interfaces) System | Users | [users](10-icinga-template-library.md#plugin-check-command-users), [users-windows](10-icinga-template-library.md#windows-plugins) (Windows Client) diff --git a/doc/10-icinga-template-library.md b/doc/10-icinga-template-library.md index a3cec4fd6..06f99b790 100644 --- a/doc/10-icinga-template-library.md +++ b/doc/10-icinga-template-library.md @@ -3293,6 +3293,19 @@ mem_cache | **Optional.** If set to true, plugin will count cache as free mem mem_warning | **Required.** Specify the warning threshold as number interpreted as percent. mem_critical | **Required.** Specify the critical threshold as number interpreted as percent. +#### sar-perf + +The [check_sar_perf.py](https://github.com/dnsmichi/check-sar-perf) +plugin collects performance metrics from Linux hosts using the `sar` binary available in the `sysstat` package. + +Custom variables passed as [command parameters](03-monitoring-basics.md#command-passing-parameters): + +Name | Description +-----------------|----------------------------------------------------------------------------------------------------------------------- +sar_perf_profile | **Required.** Define the run profile: `pagestat`, `cpu`, `memory_util`, `memory_stat`, `io_transfer`, `queueln_load`, `swap_util`, `swap_stat`, `task`, `kernel`, `disk `. Can be a string or an array of multiple profiles. +sar_perf_disk | **Optional.** Disk name for the 'disk' profile. + + #### running_kernel The [check_running_kernel](https://packages.debian.org/stretch/nagios-plugins-contrib) plugin diff --git a/itl/plugins-contrib.d/operating-system.conf b/itl/plugins-contrib.d/operating-system.conf index 34e7ea9cf..afab177f0 100644 --- a/itl/plugins-contrib.d/operating-system.conf +++ b/itl/plugins-contrib.d/operating-system.conf @@ -31,6 +31,26 @@ object CheckCommand "mem" { vars.mem_cache = false } +object CheckCommand "sar-perf" { + command = [ PluginContribDir + "/check_sar_perf.py" ] + + arguments = { + "sar_perf_profile" = { + value = "$sar_perf_profile$" + description = "Define the run profile: pagestat, cpu, memory_util, memory_stat, io_transfer, queueln_load, swap_util, swap_stat, task, kernel, disk . Can be a string or an array of multiple profiles." + skip_key = true + repeat_key = false + required = true + } + "sar_perf_disk" = { + value = "$sar_perf_disk$" + set_if = {{ macro("$sar_perf_profile$") == "disk" }} + description = "Disk name for the 'disk' profile" + skip_key = true + } + } +} + object CheckCommand "running_kernel" { command = {{ var use_sudo = macro("$running_kernel_use_sudo$")