ITL: Add sar-perf

This commit is contained in:
Michael Friedrich 2019-08-16 13:01:34 +02:00
parent c2e1d023e2
commit aab6c91e79
3 changed files with 34 additions and 1 deletions

View File

@ -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)

View File

@ -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 <a id="plugin-contrib-command-sar-perf"></a>
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 <disk>`. Can be a string or an array of multiple profiles.
sar_perf_disk | **Optional.** Disk name for the 'disk' profile.
#### running_kernel <a id="plugin-contrib-command-running_kernel"></a>
The [check_running_kernel](https://packages.debian.org/stretch/nagios-plugins-contrib) plugin

View File

@ -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 <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$")