I have written a powershell script to send notifications to Nagios using this line of code
Code: Select all
Set-Alias nscp "C:\Program Files\NSClient++\nscp.exe" -Scope Global
nscp client --module NSCAClient address=172.22.50.9:5667 encryption=XOR command="MDI_zip_d" result=$status message="$global:statusInformation"This is what I get from the event log
[09-03-2018 17:26:12] Error: External command failed -> PROCESS_SERVICE_CHECK_RESULT;MDIARCH03;MDI_zip_d;2;teste do nagios
[09-03-2018 17:26:11] Warning: Passive check result was received for service 'MDI_zip_d' on host 'MDIARCH03', but the host could not be found!