IIS App Pool monitoring
Re: IIS App Pool monitoring
Ack! I bet with Server 2008 you're still on Powershell 2. Can you upgrade to Powershell 4?
https://www.microsoft.com/en-us/downloa ... x?id=40855
https://www.microsoft.com/en-us/downloa ... x?id=40855
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: IIS App Pool monitoring
Let me speak with the person responsible for this server and I'll get back to you ASAP.
Re: IIS App Pool monitoring
Sounds good, we'll keep an eye out.
Re: IIS App Pool monitoring
Ok, we got PS 4.0 installed. Now I'm seeing this:
Do you want me to resend my nsclient.ini and the check_ms_iis_application_pool.ps1 scripts?
Code: Select all
bash-4.2$ /usr/local/nagios/libexec/check_nrpe -H 10.xxx.xxx.xxx -p 5666 -t 60 -c check_ms_iis_application_pool -a '-A Prepaid'
check_ms_iis_application_pool.ps1 : The term
'check_ms_iis_application_pool.ps1' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, or
if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ check_ms_iis_application_pool.ps1 -A Prepaid
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (check_ms_iis_application_pool.p
s1:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Last edited by rferebee on Thu Jan 02, 2020 12:14 pm, edited 1 time in total.
Re: IIS App Pool monitoring
Yes, please attach them/
Try changing it to:
Then restart the nsclient++ service and try again.
Try changing it to:
Code: Select all
[/settings/external scripts/scripts]
check_ms_iis_application_pool = cmd /c echo If (-Not (Test-Path "scripts\check_ms_iis_application_pool.ps1") ) { Write-Host "UNKNOWN: Script `"check_ms_iis_application_pool.ps1`" not found."; exit(3) }; scripts\check_ms_iis_application_pool.ps1 $ARGS$; exit($lastexitcode) | powershell.exe /noprofile -command -Re: IIS App Pool monitoring
PM sent with files requested.
Not getting this response after making the change you recommended:
Not getting this response after making the change you recommended:
Code: Select all
[[email protected] ~]$ /usr/local/nagios/libexec/check_nrpe -H 10.xxx.xxx.xxx -p 5666 -t 60 -c check_ms_iis_application_pool -a '-A Prepaid'
UNKNOWN: Script "check_ms_iis_application_pool.ps1" not found.
Last edited by rferebee on Thu Jan 02, 2020 12:14 pm, edited 1 time in total.
Re: IIS App Pool monitoring
Do you have the powershell script in the C:\Program Files\NSClient++\scripts directory on the remote system?
Please replace your nsclient.ini with the one I've PM'ed you, make sure the .ps1 plugin is in the scripts directory, then restart the nsclient++ service in services.msc and test again from the XI server.
Please replace your nsclient.ini with the one I've PM'ed you, make sure the .ps1 plugin is in the scripts directory, then restart the nsclient++ service in services.msc and test again from the XI server.
Re: IIS App Pool monitoring
Ok, I made the requested changes, ran the check and received this as the return:
Code: Select all
[[email protected] ~]$ /usr/local/nagios/libexec/check_nrpe -H 10.xxx.xxx.xxx -p 5666 -t 60 -c check_ms_iis_application_pool -a '-A Prepaid'
Get-WmiObject : Invalid namespace "root\WebAdministration"
At C:\Program Files\NSClient++\scripts\check_ms_iis_application_pool.ps1:317
char:40
+ $IISStruct.ProcessId = Get-WmiObject -NameSpace
'root\WebAdminis ...
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-WmiObject], Management
Exception
+ FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.C
ommands.GetWmiObjectCommand
OK: Application Pool Started but no process is assigned yet "Prepaid" with 0 Applications. {CPU: 0%}{Memory: 0MB} |'pool_cpu'=0%;;;0;100 'pool_memory'=0MB;;;0 'app_count'=0
Last edited by rferebee on Thu Jan 02, 2020 12:14 pm, edited 1 time in total.
Re: IIS App Pool monitoring
Okay, we need to install the scripting tools.
Then try the script again. If it fails with the same invalid namespace, run this command and show us the output.
Code: Select all
install-windowsfeature -name Web-Scripting-ToolsCode: Select all
get-windowsfeatureAs 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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: IIS App Pool monitoring
Ok, so we finally got the Web Scripting Tools installed. I apologize, I was told by the system administrator that they had already been installed. Turns out they were not...
We've got the check partially working now:
Is the reason the check isn't reporting any CPU and Memory is because there are no processes assigned to it and 0 applications?
We've got the check partially working now:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H 10.xxx.xxx.xxx -p 5666 -t 60 -c check_ms_iis_application_pool -a '-A Prepaid'
OK: Application Pool Started but no process is assigned yet "Prepaid" with 0 Applications. {CPU: 0%}{Memory: 0MB} |'pool_cpu'=0%;;;0;100 'pool_memory'=0MB;;;0 'app_count'=0