IIS App Pool monitoring

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
rferebee
Posts: 733
Joined: Wed Jul 11, 2018 11:37 am

Re: IIS App Pool monitoring

Post 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.
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: IIS App Pool monitoring

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
rferebee
Posts: 733
Joined: Wed Jul 11, 2018 11:37 am

Re: IIS App Pool monitoring

Post 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:\>
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: IIS App Pool monitoring

Post 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?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
rferebee
Posts: 733
Joined: Wed Jul 11, 2018 11:37 am

Re: IIS App Pool monitoring

Post by rferebee »

I have been running the PowerShell console as administrator.
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: IIS App Pool monitoring

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
rferebee
Posts: 733
Joined: Wed Jul 11, 2018 11:37 am

Re: IIS App Pool monitoring

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: IIS App Pool monitoring

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked