diff --git a/icinga2/command.conf b/icinga2/command.conf index 6b17a3a..37425b2 100644 --- a/icinga2/command.conf +++ b/icinga2/command.conf @@ -1,4 +1,4 @@ -object CheckCommand "winrm" { +object CheckCommand "powershell" { command = [ PluginDir + "/check_by_powershell" ] arguments = { diff --git a/icinga2/example.conf b/icinga2/example.conf index a3fd91a..66b7091 100644 --- a/icinga2/example.conf +++ b/icinga2/example.conf @@ -2,10 +2,10 @@ object Host "windowshost" { import "generic-host" address = "192.168.172.217" - vars.winrm_port = 5985 - vars.winrm_user = "windowsuser" - vars.winrm_password = "secret!pw" - // vars.winrm_insecure = true + vars.powershell_port = 5985 + vars.powershell_user = "windowsuser" + vars.powershell_password = "secret!pw" + // vars.powershell_insecure = true vars.server_type = "windows" } @@ -14,13 +14,13 @@ template Service "powershell-template-service" { import "generic-service" vars.original_check_command = check_command - check_command = "winrm" + check_command = "powershell" - vars.by_winrm_command = {{ get_check_command(service.vars.original_check_command).command }} - vars.by_winrm_arguments = {{ get_check_command(service.vars.original_check_command).arguments }} + vars.by_powershell_command = {{ get_check_command(service.vars.original_check_command).command }} + vars.by_powershell_arguments = {{ get_check_command(service.vars.original_check_command).arguments }} } -apply Service "winrm_check_ntp" { +apply Service "powershell_check_ntp" { check_command = "powershell-checkTime-sync" import "powershell-template-service"