June 2022
Intermediate to advanced
742 pages
16h 25m
German
Powershell-Skripte lassen sich ebenfalls mittels Icinga-Agenten ausführen, sie müssen lediglich wie alle Plugins die Plugin-Richtlinien erfüllen. Ein Problem, das auftritt, falls man noch die 32-Bit-Version des Icinga Binary auf Windows mit 64-Bit einsetzt, ist, dass ein 32-Bit-Programm auch immer eine 32-Bit-Powershell aufruft. Soll aber unbedingt ein Aufruf einer 64-Bit-Powershell erfolgen, muss in vars.ps_path system32 durch sysnative ersetzt werden.
template CheckCommand "my/ps-local" {
command = [
"$ps_command$",
"-command",
"& '$ps_script_path$\\$ps_script$'"
]
arguments = {
"-args" = {
value = "$ps_arguments$"
repeat_key = true
skip_key = true
}
";exit" = {
order = 99
value = "$$LASTEXITCODE" ...
Read now
Unlock full access