Fixes CPU check example for Icinga configuration

This commit is contained in:
Christian Stein 2020-07-28 10:43:05 +02:00
parent 2d7cb5ea34
commit 31d34c5565

View file

@ -31,38 +31,49 @@ Check-Command definition for Icinga
A example Check-Command for Icinga could look like this: A example Check-Command for Icinga could look like this:
```icinga ```icinga
object CheckCommand "Windows Check CPU" { object CheckCommand "PowerShell Base" {
import "plugin-check-command" import "plugin-check-command"
command = [ command = [
"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe" "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"
] ]
timeout = 3m timeout = 3m
}
object CheckCommand "Invoke-IcingaCheckCPU" {
import "PowerShell Base"
arguments += { arguments += {
"-C" = { "-C" = {
order = 0 order = 0
value = "Use-Icinga; exit Invoke-IcingaCheckCPU" value = "Use-Icinga; exit Invoke-IcingaCheckCPU"
} }
"-Core" = {
order = 4
value = "$IcingaCheckCPU_String_Core$"
}
"-Critical" = { "-Critical" = {
order = 2 order = 3
value = "$PowerShell_Critical$" value = "$IcingaCheckCPU_Object_Critical$"
} }
"-NoPerfData" = { "-NoPerfData" = {
order = 6 order = 99
set_if = "$PowerShell_NoPerfData$" value = "$IcingaCheckCPU_Switchparameter_NoPerfData$"
} }
"-Verbose" = { "-Verbosity" = {
order = 4 order = 5
value = "$PowerShell_Verbose$" value = "$IcingaCheckCPU_Int32_Verbosity$"
} }
"-Warning" = { "-Warning" = {
order = 1 order = 2
value = "$PowerShell_Warning$" value = "$IcingaCheckCPU_Object_Warning$"
} }
} }
vars.PowerShell_Critical = "$$null"
vars.PowerShell_NoPerfData = "0" vars.IcingaCheckCPU_String_Core = "*"
vars.PowerShell_Verbose = "0" vars.IcingaCheckCPU_Object_Critical = "$$null"
vars.PowerShell_Warning = "$$null" vars.IcingaCheckCPU_Switchparameter_NoPerfData = false
vars.IcingaCheckCPU_Int32_Verbosity = 0
vars.IcingaCheckCPU_Object_Warning = "$$null"
} }
``` ```