NagiosEnterprises / ncpa

Nagios Cross-Platform Agent
Other
176 stars 95 forks source link

Performance Counter check to monitor APP_POOL_WAS returning error #1170

Open rarafan opened 1 month ago

rarafan commented 1 month ago

Attempting to setup check to monitor the Performance Counter for APP_POOL_WAS under Microsoft IIS. It works when running in the windows power shell but not when running the check.

Base on this we can see this is a counter that can be monitored - https://techcommunity.microsoft.com/t5/iis-support-blog/performance-counters-for-monitoring-iis/ba-p/683389

These are the results when we run in in the command line -

PS C:\Users\administrator> Get-Counter '\APP_POOL_WAS(DefaultAppPool)\Current Application Pool State'

Timestamp CounterSamples


5/23/2024 10:43:38 PM \dc1\app_pool_was(defaultapppool)\current application pool state : 3

If we run it under NCPA this is what we see -

[root@xid libexec]# ./check_ncpa.py -H 10.25.200.60 -t 'nagiosprivate' -M 'windowscounters/app_pool_was(defaultapppool)/current application pool state' The specified object was not found on the computer.

This is in NCAP version 3.0.1.