Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
/build/
check_by_*
.env*
.idea/*
2 changes: 1 addition & 1 deletion icinga2/command.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
object CheckCommand "winrm" {
object CheckCommand "powershell" {
command = [ PluginDir + "/check_by_powershell" ]

arguments = {
Expand Down
16 changes: 8 additions & 8 deletions icinga2/example.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand All @@ -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"
Expand Down