Page 5 of 5

Re: IIS App Pool monitoring

Posted: Mon Jan 13, 2020 12:59 pm
by rferebee
I apologize for my late reply, I was out all last week with the flu, please see the results below from running the script without the quotes:

Code: Select all

PS C:\Program Files\NSClient++\scripts> .\check_ms_iis_application_pool.ps1 -A CASH
Get-WmiObject : Provider load failure
At C:\Program Files\NSClient++\scripts\check_ms_iis_application_pool.ps1:317 char:40
+ ... ProcessId = Get-WmiObject -NameSpace 'root\WebAdministration' -class  ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Get-WmiObject], ManagementException
    + FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

OK:  Application Pool Started but no process is assigned yet "CASH" with 0 Applications. {CPU: 0%}{Memory: 0MB} | 'pool_
cpu'=0%;;;0;100 'pool_memory'=0MB;;;0; 'app_count'=0
PS C:\Program Files\NSClient++\scripts> .\check_ms_iis_application_pool.ps1 -A Prepaid
Get-WmiObject : Provider load failure
At C:\Program Files\NSClient++\scripts\check_ms_iis_application_pool.ps1:317 char:40
+ ... ProcessId = Get-WmiObject -NameSpace 'root\WebAdministration' -class  ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Get-WmiObject], ManagementException
    + FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

OK:  Application Pool Started but no process is assigned yet "Prepaid" with 0 Applications. {CPU: 0%}{Memory: 0MB} | 'po
ol_cpu'=0%;;;0;100 'pool_memory'=0MB;;;0; 'app_count'=0
PS C:\Program Files\NSClient++\scripts>
I PM'd you a copy of the INI file.

Re: IIS App Pool monitoring

Posted: Mon Jan 13, 2020 4:13 pm
by mbellerue
So this seems to be working now. Or at least, we're getting an OK result back. The question is, should we be getting an OK result?

Can you run these commands in Powershell?

Code: Select all

import-module -name WebAdministration
Get-WmiObject -NameSpace 'root\WebAdministration' -class 'WorkerProcess'
Let's just see what we get.

Re: IIS App Pool monitoring

Posted: Mon Jan 13, 2020 4:33 pm
by rferebee
Well, something I think changed or reverted while I was out of the office because we weren't getting the "Get-WmiObject : Provider load failure" before. It's showing green, but it's not loading the info for the App Pool.

Here's what I get when I run those commands you wanted in PowerShell:

Code: Select all

PS C:\WINDOWS\system32> cd \
PS C:\> import-module -name WebAdministration
PS C:\> Get-WmiObject -NameSpace 'root\WebAdministration' -class 'WorkerProcess'
Get-WmiObject : Provider load failure
At line:1 char:1
+ Get-WmiObject -NameSpace 'root\WebAdministration' -class 'WorkerProce ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Get-WmiObject], ManagementException
    + FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

PS C:\>

Re: IIS App Pool monitoring

Posted: Mon Jan 13, 2020 4:44 pm
by mbellerue
Agree, something is different. Did we have to run the Powershell console with elevated privileges in order to get everything to work before? Can we try that?

Re: IIS App Pool monitoring

Posted: Mon Jan 13, 2020 4:52 pm
by rferebee
I have been running the PowerShell console as administrator.

Re: IIS App Pool monitoring

Posted: Tue Jan 14, 2020 10:53 am
by mbellerue
Alright, I think we're getting in to the deep end of the pool. I'd like to move this to a ticket. If you wouldn't mind opening a ticket, I will grab it and we can pick this up there.

Re: IIS App Pool monitoring

Posted: Tue Jan 14, 2020 5:12 pm
by rferebee
Ok, I'll create a ticket for this.

FYI, the check return changed again. CASH stopped reporting as OK and Prepaid is no longer throwing the PowerShell error.

Re: IIS App Pool monitoring

Posted: Wed Jan 15, 2020 7:40 am
by scottwilkerson
rferebee wrote:Ok, I'll create a ticket for this.

FYI, the check return changed again. CASH stopped reporting as OK and Prepaid is no longer throwing the PowerShell error.
Locking thread