Page 1 of 3
Check_ms_iis_application_pool: "Cannot bind argument to..."
Posted: Fri Nov 11, 2016 11:18 am
by jsharris
I am using the check_ms_iis_application_pool plugin created by WillemDH (
https://outsideit.net/check-ms-iis-application-pool/) but am running into the error: "Cannot bind argument to parameter 'Path' because it is null." I am trying to find a list of necessary parameters but the only one I have seen so far is the name of the application pool to monitor (-A <AppPoolName>). Running the script directly on the server results in the same message.
Does anyone know what the correct configuration here should be?
Running Nagios XI 5.2.2
Web server is Win2008R2.
Re: Check_ms_iis_application_pool: "Cannot bind argument to.
Posted: Fri Nov 11, 2016 12:43 pm
by WillemDH
I have this working for me:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H iisserver -p 5666 -t 180 -c check_ms_iis_application_pool -a '-A "SharePoint - projectenqa" '
Where "SharePoint - projectenqa" is the name of my application pool. You could try change SilentlyContinue to Continue for debug and verbose preference. and try debug if the above still doesnt work for you.
Hope it helps..
Willem
Re: Check_ms_iis_application_pool: "Cannot bind argument to.
Posted: Fri Nov 11, 2016 12:50 pm
by jsharris
Here is mine:
Code: Select all
COMMAND: /usr/local/nagios/libexec/check_nrpe -H tpwebpr1 -p 5666 -t 60 -c check_ms_iis_application_pool -a '-A Compliance'
OUTPUT: CRITICAL: Cannot bind argument to parameter 'Path' because it is null.
I tried it as you do with " around the app pool and it came back as this:
Code: Select all
COMMAND: /usr/local/nagios/libexec/check_nrpe -H tpwebpr1 -p 5666 -t 60 -c check_ms_iis_application_pool -a '-A \"Compliance\"'
OUTPUT: Exception processing request: Request command contained illegal metachars!
Are there alterations made to the script you are running which specifies a path for something which is not included in the version available for download? Maybe something I am supposed to configure in the script as opposed to in the service check? Also, where would I make the other changes you suggested (debug and SilentlyContinue)?
Re: Check_ms_iis_application_pool: "Cannot bind argument to.
Posted: Fri Nov 11, 2016 12:55 pm
by WillemDH
What is the version of your script? And what is the iis version? You should find the debug and verbose preferences at the top of the ps script..
Re: Check_ms_iis_application_pool: "Cannot bind argument to.
Posted: Fri Nov 11, 2016 1:04 pm
by jsharris
Script version: v0.05.160609
IIS version: 7.5
I saw on the info page you had only tested on Win2012R2 but came across another thread on this forum in which someone was attempting to use this to monitor a Win2003 server (presumably running IIS6). Based on the information being returned it seems the script is trying to access a file location but does not have the necessary information to do so (the 'Path' parameter).
Re: Check_ms_iis_application_pool: "Cannot bind argument to.
Posted: Fri Nov 11, 2016 1:12 pm
by jsharris
Changing the debug settings to 'Continue' results in display of all of the cmdlets, functions, and aliases being imported followed by the same "CRITICAL: Cannot bind argument to parameter 'Path' because it is null." error.
Re: Check_ms_iis_application_pool: "Cannot bind argument to.
Posted: Fri Nov 11, 2016 1:14 pm
by WillemDH
You will have to use breaks in PowerGUI or Powershell ISE to debug this and know where things go wrong. What Windows version are you using this?
Re: Check_ms_iis_application_pool: "Cannot bind argument to.
Posted: Fri Nov 11, 2016 1:31 pm
by jsharris
Windows 2008 R2.
I am thinking I may just be SOL on this one. I tried running it on another server and, while I got an entirely different error there, it did return information about the app pool there.
Re: Check_ms_iis_application_pool: "Cannot bind argument to.
Posted: Fri Nov 11, 2016 1:33 pm
by ssax
In addition to WillemDH's post, [;ease change the debug settings to Continue, open up the powershell console as an admin, and run these commands:
Code: Select all
cd "c:\program files\nsclient++\scripts"
.\check_ms_iis_application_pool.ps1 -A Compliance
Send the entire output so we can see where in the code it's failing.
Thank you
Re: Check_ms_iis_application_pool: "Cannot bind argument to.
Posted: Fri Nov 11, 2016 1:42 pm
by jsharris
Output is attached.