Page 1 of 1
no longer seeing service
Posted: Mon Mar 10, 2025 9:47 am
by JohnFLi
i have a service that Nagios has been seeing for awhile (few months)...over the weekend it no longer sees it as existing.
Code: Select all
/usr/local/nagios/libexec/check_ncpa.py -H <hostname> -t 'token' -P 5693 -M 'services' -q 'service=dfs,status=running'
UNKNOWN: No services found for service names: dfs
I have tried dfssvc.exe, same result.
all other services it sees are just fine
dfs.jpg
Re: no longer seeing service
Posted: Mon Mar 10, 2025 12:01 pm
by DoubleDoubleA
Hi John,
Thanks for that note. What XI version are you on?
Aaron
Re: no longer seeing service
Posted: Mon Mar 10, 2025 3:06 pm
by JohnFLi
Code: Select all
Latest Available Version: 2024R1.4.1
Installed Version: 2024R1.4.1
Last Update Check: 03/10/2025 13:08:53
Re: no longer seeing service
Posted: Mon Mar 10, 2025 4:01 pm
by DoubleDoubleA
Hi John,
Try this: re-run the NCPA Wizard against that machine and see what services come up in the XI interface for the Wizard, and if you see NFS in any way, go ahead and configure monitoring for it, and see what the actual command comes out as.
Did that machine update? Did MS change the name and nobody saw the announcement?
We're also taking a look at making sure we know how NCPA is string matching there. I see you are on 2024R1.4.1 so clearly you have updated recently but nothing in that update should have affected checks or NCPA.
Aaron
Re: no longer seeing service
Posted: Mon Mar 10, 2025 4:23 pm
by bbahn
Hello @JohnFLi,
It seems you're having a matching issue. By default, NCPA only matches services with an exact match with the service name. To troubleshoot this, you can go into the NCPA web interface (https://my_ncpa_ip:my_port_usually_5693) and go to API and then select services from the dropdown and use the Service Filter(s) section to test out different matches.
Under filter settings, you can also modify whether you want exact match (default), search match (partial matches allowed), or regex matching.
If you're wondering how to construct a Nagios check with this information, get your filters to filter as you desire and then select the "Run as a Nagios check" button. This will show a View in alternate format button on the bottom from which you can select As active check using check_ncpa.py. This will show how to construct a check_ncpa.py CLI query to get the desired result from your NCPA API.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Since you aren't passing any match= options into your check, it's looking for a strict match, so if the name of the service changes (it looks to me like that may have been what happened here. Also, it IS case sensitive when using strict matching (default)), it will no longer find it.
Re: no longer seeing service
Posted: Mon Mar 10, 2025 6:20 pm
by JohnFLi
DoubleDoubleA wrote: ↑Mon Mar 10, 2025 4:01 pm
Hi John,
Try this: re-run the NCPA Wizard against that machine and see what services come up in the XI interface for the Wizard, and if you see NFS in any way, go ahead and configure monitoring for it, and see what the actual command comes out as.
Did that machine update? Did MS change the name and nobody saw the announcement?
We're also taking a look at making sure we know how NCPA is string matching there. I see you are on 2024R1.4.1 so clearly you have updated recently but nothing in that update should have affected checks or NCPA.
Aaron
I did try that....it does not see it doing that either
Re: no longer seeing service
Posted: Mon Mar 10, 2025 6:22 pm
by JohnFLi
bbahn wrote: ↑Mon Mar 10, 2025 4:23 pm
Hello @JohnFLi,
It seems you're having a matching issue. By default, NCPA only matches services with an exact match with the service name. To troubleshoot this, you can go into the NCPA web interface (https://my_ncpa_ip:my_port_usually_5693) and go to API and then select services from the dropdown and use the Service Filter(s) section to test out different matches.
Under filter settings, you can also modify whether you want exact match (default), search match (partial matches allowed), or regex matching.
If you're wondering how to construct a Nagios check with this information, get your filters to filter as you desire and then select the "Run as a Nagios check" button. This will show a View in alternate format button on the bottom from which you can select As active check using
check_ncpa.py. This will show how to construct a check_ncpa.py CLI query to get the desired result from your NCPA API.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Since you aren't passing any match= options into your check, it's looking for a strict match, so if the name of the service changes (it looks to me like that may have been what happened here. Also, it IS case sensitive when using strict matching (default)), it will no longer find it.
Case sensitve was teh issue.
Code: Select all
-q 'service=Dfs,status=running'
OK: Dfs is running
This issue may now be closed
Re: no longer seeing service
Posted: Tue Mar 11, 2025 8:49 am
by DoubleDoubleA
Glad it is sorted, thanks for letting us know.