Page 2 of 3

Re: Check_ms_iis_application_pool: "Cannot bind argument to.

Posted: Fri Nov 11, 2016 2:58 pm
by ssax
Did you set $DebugPreference = 'Continue' as well?

Re: Check_ms_iis_application_pool: "Cannot bind argument to.

Posted: Mon Nov 14, 2016 8:28 am
by jsharris
Yes.

Re: Check_ms_iis_application_pool: "Cannot bind argument to.

Posted: Mon Nov 14, 2016 4:01 pm
by ssax
Please edit the powershell script and add this code:

Code: Select all

Set-PSDebug -Trace 2 -Debug
Right below the $VerbosePreference = 'SilentlyContinue' code.

Then re-run it directly on the server from an administrator powershell console and send us the full output.


Thank you

Re: Check_ms_iis_application_pool: "Cannot bind argument to.

Posted: Tue Nov 15, 2016 6:36 am
by jsharris
I have attached the new log. I have also found that if the application pool is started but has no currently running process it returns Ok like this:

Code: Select all

OUTPUT: OK:  Application Pool Started but no process is assigned yet "Compliance" with 0 Applications. {CPU: 0%}{Memory: 0MB} |'app_count'=0 'pool_cpu'=0%, 'pool_memory'=0MB

Re: Check_ms_iis_application_pool: "Cannot bind argument to.

Posted: Tue Nov 15, 2016 4:40 pm
by tmcdonald
Can you double-check your post? It seems the log did not get attached.

Re: Check_ms_iis_application_pool: "Cannot bind argument to.

Posted: Wed Nov 16, 2016 6:24 am
by jsharris
Try this.

Re: Check_ms_iis_application_pool: "Cannot bind argument to.

Posted: Wed Nov 16, 2016 4:12 pm
by ssax
Please edit the script and around line 49 change this code:

Code: Select all

$LocalScriptName = split-path $MyInvocation.PSCommandPath -Leaf
To this:

Code: Select all

$LocalScriptName = "check_ms_iis_application_pool"
Then run it again with and without the debug and send us the results.

Thank you

Re: Check_ms_iis_application_pool: "Cannot bind argument to.

Posted: Tue Nov 22, 2016 6:07 am
by jsharris
It looks like that change fixed it. I am not getting back # of applications, CPU usage, and memory usage from each monitored app pool:

Code: Select all

OK: Application Pool "AlvaMustShip" with 2 Applications. {CPU: 0 %}{Memory: 199.07 MB}
Thank you for your help, everyone!

Re: Check_ms_iis_application_pool: "Cannot bind argument to.

Posted: Tue Nov 22, 2016 10:28 am
by ssax
From looking at the code, here are the options:

Code: Select all

-A|--ApplicationPool
-WM|--WarningMemory
-CM|--CriticalMemory
-WC|--WarningCpu
-CC|--CriticalCpu
-APOD|--AppPoolOnDemand

Re: Check_ms_iis_application_pool: "Cannot bind argument to.

Posted: Tue Nov 22, 2016 10:41 am
by jsharris
I meant to type "...noW getting back..." instead of "...noT getting back..." but the additional information you provided because of my typo is even better as the last I saw on the check the developer had not included warning/critical options yet!

Where would I put those options in the check to allow for alerting and what should the syntax be?