sender-host=ARG - Nagios

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Post Reply
CokraMehinka
Posts: 3
Joined: Wed Sep 21, 2022 7:38 am

sender-host=ARG - Nagios

Post by CokraMehinka »

I’m currently working on Windows Server 2016 with NSClient++ (x64) 0.5.0062

I have written a powershell script to send notifications to Nagios using this line of code

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"
I have set the nsclient.ini on the section [/settings/NSCA/client] a new hostname, you see… My current hostname on the server is all capitalized like this, MDIARCH03, the server on Nagios is configured in lowercase letter… Before this version of Nagios, I used to tell through the above command the server name through the line sender-host=mdiarch03 and that would work just fine. But ever since we upgraded to this new version the passive check won’t work.

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!
bbahn
Posts: 91
Joined: Thu Jan 12, 2023 5:42 pm

Re: sender-host=ARG - Nagios

Post by bbahn »

Hello CokraMehinka,

It seems that you may be encountering a case-sensitivity issue here. Have you tried matching the capitalization in the argument?

Also note that it is suggested to switch from NSClient++ to the officially supported NCPA (Nagios Cross-Platform Agent) which is maintained by Nagios.
February: Fostering a fruitful forum with fun formulations. Fear not for our fellowship of friendly fellows will fervently find fixes for flaws found on this forum. Feel free to follow-up with feedback if I fail to fulfill my function fully.
Post Reply