From 581ebb6a7cec89c7d36466d717fe66be505e195d Mon Sep 17 00:00:00 2001 From: Tobias Bauriedel Date: Wed, 11 Sep 2024 10:29:42 +0200 Subject: [PATCH] Update existing IfW-Plugin templates --- .../cpu_windows_powershell_framework.ini | 9 ++--- ...disk_used_windows_powershell_framework.ini | 21 ++++++++++++ .../disk_windows_powershell_framework.ini | 32 ++++-------------- .../memory_windows_powershell_framework.ini | 33 ++++++++++--------- 4 files changed, 51 insertions(+), 44 deletions(-) create mode 100644 templates/disk_used_windows_powershell_framework.ini diff --git a/templates/cpu_windows_powershell_framework.ini b/templates/cpu_windows_powershell_framework.ini index f156851b..90d8cf32 100644 --- a/templates/cpu_windows_powershell_framework.ini +++ b/templates/cpu_windows_powershell_framework.ini @@ -2,18 +2,19 @@ check_command = "Invoke-IcingaCheckCPU" [load-windows.metrics_filters] -load.value = "$service_name_template$.perfdata.$load$.value" -crit.value = "$service_name_template$.perfdata.$load$.crit" -warn.value = "$service_name_template$.perfdata.$load$.warn" +load.value = "$service_name_template$.perfdata.$load$.ifw_cpu.load.value" +crit.value = "$service_name_template$.perfdata.$load$.ifw_cpu.load.crit" +warn.value = "$service_name_template$.perfdata.$load$.ifw_cpu.load.warn" [load-windows.urlparams] areaAlpha = "0.5" lineWidth = "2" min = "0" +max = "100" title = "CPU $load$ %" yUnitSystem = "none" [load-windows.functions] load.value = "alias(color($metric$, '#1a7dd7'), 'CPU usage(%)')" crit.value = "alias(color($metric$, '#ff0000'), 'Crit (%)')" -warn.value = "alias(color($metric$, '#ff8d00'), 'Warn (%)')" +warn.value = "alias(color($metric$, '#ff8d00'), 'Warn (%)')" \ No newline at end of file diff --git a/templates/disk_used_windows_powershell_framework.ini b/templates/disk_used_windows_powershell_framework.ini new file mode 100644 index 00000000..ab4c5b0b --- /dev/null +++ b/templates/disk_used_windows_powershell_framework.ini @@ -0,0 +1,21 @@ +[disk.graph] +check_command = "Invoke-IcingaCheckUsedPartitionSpace" + +[disk.metrics_filters] +value = "$service_name_template$.perfdata.$disk$.ifw_partitionspace.used.value" +max = "$service_name_template$.perfdata.$disk$.ifw_partitionspace.used.max" +crit = "$service_name_template$.perfdata.$disk$.ifw_partitionspace.used.crit" +warn = "$service_name_template$.perfdata.$disk$.ifw_partitionspace.used.warn" +[disk.urlparams] +areaAlpha = "0.5" +areaMode = "first" +lineWidth = "2" +min = "0" +title = "Disk $disk$" +yUnitSystem = "binary" + +[disk.functions] +value = "alias(color($metric$, '#1a7dd7'), 'Used (bytes)')" +max = "alias(color($metric$, '#cfd7e6'), 'Size (bytes)')" +crit = "alias(color($metric$, '#ff0000'), 'Crit (bytes)')" +warn = "alias(color($metric$, '#ff8d00'), 'Warn (bytes)')" \ No newline at end of file diff --git a/templates/disk_windows_powershell_framework.ini b/templates/disk_windows_powershell_framework.ini index 1b8e827f..fd81797e 100644 --- a/templates/disk_windows_powershell_framework.ini +++ b/templates/disk_windows_powershell_framework.ini @@ -1,11 +1,12 @@ [disk.graph] -check_command = "Invoke-IcingaCheckUsedPartitionSpace" +check_command = "Invoke-IcingaCheckPartitionSpace" [disk.metrics_filters] -value = "$service_name_template$.perfdata.used_space_$disk$.value" -max = "$service_name_template$.perfdata.used_space_$disk$.max" -crit = "$service_name_template$.perfdata.used_space_$disk$.crit" -warn = "$service_name_template$.perfdata.used_space_$disk$.warn" +value = "$service_name_template$.perfdata.$disk$.ifw_partitionspace.used.value" +max = "$service_name_template$.perfdata.$disk$.ifw_partitionspace.used.max" +crit = "$service_name_template$.perfdata.$disk$.ifw_partitionspace.used.crit" +warn = "$service_name_template$.perfdata.$disk$.ifw_partitionspace.used.warn" + [disk.urlparams] areaAlpha = "0.5" areaMode = "first" @@ -18,23 +19,4 @@ yUnitSystem = "binary" value = "alias(color($metric$, '#1a7dd7'), 'Used (bytes)')" max = "alias(color($metric$, '#cfd7e6'), 'Size (bytes)')" crit = "alias(color($metric$, '#ff0000'), 'Crit (bytes)')" -warn = "alias(color($metric$, '#ff8d00'), 'Warn (bytes)')" - -[disk-percent.graph] -check_command = "Invoke-IcingaCheckUsedPartitionSpace" - -[disk-percent.metrics_filters] -value = "$service_name_template$.perfdata.$disk$.value" -crit = "$service_name_template$.perfdata.$disk$.crit" -warn = "$service_name_template$.perfdata.$disk$.warn" -[disk-percent.urlparams] -areaAlpha = "0.5" -areaMode = "first" -lineWidth = "2" -min = "0" -title = "Disk $disk$" - -[disk-percent.functions] -value = "alias(color($metric$, '#1a7dd7'), 'Used (%)')" -crit = "alias(color($metric$, '#ff0000'), 'Crit (%)')" -warn = "alias(color($metric$, '#ff8d00'), 'Warn (%)')" +warn = "alias(color($metric$, '#ff8d00'), 'Warn (bytes)')" \ No newline at end of file diff --git a/templates/memory_windows_powershell_framework.ini b/templates/memory_windows_powershell_framework.ini index 53f89f4b..19f9b3d9 100644 --- a/templates/memory_windows_powershell_framework.ini +++ b/templates/memory_windows_powershell_framework.ini @@ -2,10 +2,10 @@ check_command = "Invoke-IcingaCheckMemory" [memory.metrics_filters] -value = "$service_name_template$.perfdata.used_bytes.value" -max = "$service_name_template$.perfdata.used_bytes.max" -crit = "$service_name_template$.perfdata.used_bytes.crit" -warn = "$service_name_template$.perfdata.used_bytes.warn" +value = "$service_name_template$.perfdata.memory.ifw_memory.used.value" +max = "$service_name_template$.perfdata.memory.ifw_memory.used.max" +crit = "$service_name_template$.perfdata.memory.ifw_memory.used.crit" +warn = "$service_name_template$.perfdata.memory.ifw_memory.used.warn" [memory.urlparams] areaAlpha = "0.5" @@ -21,22 +21,25 @@ max = "alias(color($metric$, '#cfd7e6'), 'Size (bytes)')" crit = "alias(color($metric$, '#ff0000'), 'Crit (bytes)')" warn = "alias(color($metric$, '#ff8d00'), 'Warn (bytes)')" -[memory-percent.graph] +[pagefile.graph] check_command = "Invoke-IcingaCheckMemory" -[memory-percent.metrics_filters] -value = "$service_name_template$.perfdata.memory_percent_used.value" -crit = "$service_name_template$.perfdata.memory_percent_used.crit" -warn = "$service_name_template$.perfdata.memory_percent_used.warn" +[pagefile.metrics_filters] +value = "$service_name_template$.perfdata.$pagefile$.ifw_pagefile.used.value" +max = "$service_name_template$.perfdata.$pagefile$.ifw_pagefile.used.max" +crit = "$service_name_template$.perfdata.$pagefile$.ifw_pagefile.used.crit" +warn = "$service_name_template$.perfdata.$pagefile$.ifw_pagefile.used.warn" -[memory-percent.urlparams] +[pagefile.urlparams] areaAlpha = "0.5" areaMode = "first" lineWidth = "2" min = "0" -title = "Memory % used" +title = "Pagefile used $pagefile$" +yUnitSystem = "binary" -[memory-percent.functions] -value = "alias(color($metric$, '#1a7dd7'), 'Used (%)')" -crit = "alias(color($metric$, '#ff0000'), 'Crit (%)')" -warn = "alias(color($metric$, '#ff8d00'), 'Warn (%)')" +[pagefile.functions] +value = "alias(color($metric$, '#1a7dd7'), 'Used (bytes)')" +max = "alias(color($metric$, '#cfd7e6'), 'Size (bytes)')" +crit = "alias(color($metric$, '#ff0000'), 'Crit (bytes)')" +warn = "alias(color($metric$, '#ff8d00'), 'Warn (bytes)')" \ No newline at end of file