Closed rob2791 closed 1 year ago
Try:
%HOSTNAME%|Services = services?service=BCIS v4 Comnetix
For example this works for me:
%HOSTNAME%|Tomcat 9 Service [P] = services?service=Tomcat 9
YES! That worked. Thank you so much. It would probably save some time if a Service example was in the documentation here:https://www.nagios.org/ncpa/help/2.2/passive.html
I was even able to poll 2 services with: %HOSTNAME%|Services = services?service=BCIS v4 Comnetix&service=ncpapassive
Closing out the issue. Thanks again!
NCPA seems to have an issue with any spaces in the name of the Windows Service when doing a NRDP service check.
Inside the nrdp.cfg file i have: HOSTNAME%|Services = services service=BCIS v4 Comnetix
I have tried every which way to get ncpa to work including putting it in quotes, adding %20 where the spaces are and even trying + sign where the spaces are.
It does work with a clean %20 manually querying the api url, so I'm fairly certain it's just whatever interprets the cfg file. Example: https://localhost:5693/api/services/?check=1&service=BCIS%20v4%20Comnetix
I was able to do a active request from Nagios by putting the name in quotes, so that is a workaround, but i'm trying to get lessen the load and do more passive requests.
I realize that no good developer would create a Windows service with a space in its name, but I never said I was working with good developers.
Debug Log: