I'm trying to monitor some IIS Application Pools that one of our server has. I used this guide but for some reason it is not working: https://outsideit.net/monitoring-iis-application-pools/:
Here is the input for the command Get-IISAppPool on the Windows Server I need to monitor:
Here is the nagios core's nsclient.ini:
Code: Select all
# If you want to fill this file with all available options run the following command:
# nscp settings --generate --add-defaults --load-all
# If you want to activate a module and bring in all its options use:
# nscp settings --activate-module <MODULE NAME> --add-defaults
# For details run: nscp settings --help
# IIS application poolin monitoring:
check_ms_iis_application_pool=cmd /c echo scripts/powershell/check_ms_iis_application_pool.ps1 $ARG1$; exit $LastExitCode | powershell.exe /noprofile -command -
; in flight - TODO
[/settings/default]
; Undocumented key
password = 1234
; Undocumented key
allowed hosts = 192.168.1.10
; in flight - TODO
[/settings/NRPE/server]
; Undocumented key
verify mode = none
; Undocumented key
insecure = true
; in flight - TODO
[/modules]
; Undocumented key
CheckExternalScripts = enabled
; Undocumented key
CheckHelpers = enabled
; Undocumented key
CheckNSCP = enabled
; Undocumented key
CheckDisk = enabled
; Undocumented key
WEBServer = enabled
; Undocumented key
CheckSystem = enabled
; Undocumented key
NSClientServer = enabled
; Undocumented key
CheckEventLog = enabled
; Undocumented key
NSCAClient = enabled
; Undocumented key
NRPEServer = enabled
Code: Select all
# 'check_ms_iis_application_pool' command definition
define command{
command_name check_ms_iis_application_pool
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -t 60 -c check_ms_iis_application_pool "$ARG1$"
Code: Select all
define service{
use generic-service
host_name IIS-Server
service_description XXXPool
check_command check_nrpe!check_ms_iis_application_pool -a '-A <IIS-Server>'
}
I suspected that there might be something wrong with windows.cfg, so I tried editing the line:
Code: Select all
check_command check_nrpe!check_ms_iis_application_pool! -a '-A <XXXPool>'
check_command check_nrpe!check_ms_iis_application_pool! -a '-A XXXPool'
check_command check_nrpe!check_ms_iis_application_pool! -a -A XXXPool