Trying to configure IIS plugin
Posted: Thu Dec 13, 2018 11:33 am
I'm having an issue getting a IIS and application pool plugin to work.
This one in specific: https://exchange.nagios.org/directory/P ... ol/details
I'm getting the error in nagios: (Return code of 127 is out of bounds. Check if plugin exists) which means I've not configured it correctly on the source machine.
I could use some assistance.
I edited nsclient.ini and added these lines to the bottom:
;TEST PowerShell Script for IIS
[/settings/external scripts/scripts]
check_ms_iis_application_pool=cmd /c echo scripts/powershell/check_ms_iis_application_pool.ps1 $ARG1$; exit $LastExitCode | powershell.exe /noprofile -command -
I created a "Powershell" folder under \NSClient++\scripts\ and placed the "check_ms_iis_application_pool.ps1" script into it. I then restared the nsclient service.
Under Nagios XI I created a new command "check_ms_iis_application_pool => $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -t 60 -c check_ms_iis_application_pool $ARG1$"
I added the service to the machine I'm testing and set ARG1 to: -a '-A <testorderentry>'
"testorderentry" is the name of an application pool. I also tested -a '-A testorderentry', -A <testorderentry>, testorderentry and everything is giving the same error.
Error: " (Return code of 127 is out of bounds. Check if plugin exists) " I believe this means the plugin isn't even responding to requests so is configured incorrectly.
Thank you for any assistance!
This one in specific: https://exchange.nagios.org/directory/P ... ol/details
I'm getting the error in nagios: (Return code of 127 is out of bounds. Check if plugin exists) which means I've not configured it correctly on the source machine.
I could use some assistance.
I edited nsclient.ini and added these lines to the bottom:
;TEST PowerShell Script for IIS
[/settings/external scripts/scripts]
check_ms_iis_application_pool=cmd /c echo scripts/powershell/check_ms_iis_application_pool.ps1 $ARG1$; exit $LastExitCode | powershell.exe /noprofile -command -
I created a "Powershell" folder under \NSClient++\scripts\ and placed the "check_ms_iis_application_pool.ps1" script into it. I then restared the nsclient service.
Under Nagios XI I created a new command "check_ms_iis_application_pool => $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -t 60 -c check_ms_iis_application_pool $ARG1$"
I added the service to the machine I'm testing and set ARG1 to: -a '-A <testorderentry>'
"testorderentry" is the name of an application pool. I also tested -a '-A testorderentry', -A <testorderentry>, testorderentry and everything is giving the same error.
Error: " (Return code of 127 is out of bounds. Check if plugin exists) " I believe this means the plugin isn't even responding to requests so is configured incorrectly.
Thank you for any assistance!