Check_ms_iis_application_pool: "Cannot bind argument to..."

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Check_ms_iis_application_pool: "Cannot bind argument to.

Post by ssax »

Did you set $DebugPreference = 'Continue' as well?
jsharris
Posts: 123
Joined: Wed Jul 03, 2013 7:00 am

Re: Check_ms_iis_application_pool: "Cannot bind argument to.

Post by jsharris »

Yes.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Check_ms_iis_application_pool: "Cannot bind argument to.

Post 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
jsharris
Posts: 123
Joined: Wed Jul 03, 2013 7:00 am

Re: Check_ms_iis_application_pool: "Cannot bind argument to.

Post 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
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Check_ms_iis_application_pool: "Cannot bind argument to.

Post by tmcdonald »

Can you double-check your post? It seems the log did not get attached.
Former Nagios employee
jsharris
Posts: 123
Joined: Wed Jul 03, 2013 7:00 am

Re: Check_ms_iis_application_pool: "Cannot bind argument to.

Post by jsharris »

Try this.
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Check_ms_iis_application_pool: "Cannot bind argument to.

Post 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
jsharris
Posts: 123
Joined: Wed Jul 03, 2013 7:00 am

Re: Check_ms_iis_application_pool: "Cannot bind argument to.

Post 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!
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Check_ms_iis_application_pool: "Cannot bind argument to.

Post 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
jsharris
Posts: 123
Joined: Wed Jul 03, 2013 7:00 am

Re: Check_ms_iis_application_pool: "Cannot bind argument to.

Post 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?
Locked