Is there are possibility to monitor the sessions / users that are currently active on a iis 7.0 webserver ?
How to monitor active sessions / users for iis 7.0 ?
Votes:
0
Best Answer
Votes:
0
This article applies to PRTG Network Monitor 13 or later
Monitoring the Number of Current IIS Users
You can use the EXE/Script Advanced Sensor with the following PowerShell script to get just the total current users from IIS:
$computer = $args $namespace = "root\CIMV2" $userSessions = Get-wmiObject -class Win32_PerfRawData_W3SVC_WebService -computername $computer -namespace $namespace | select-object -expand currentanonymoususers $users=$usersessions[0] Write-Host "<prtg>" "<result>" "<channel>Total Users connected to IIS</channel>" "<value>"+ $users +"</value>" "</result>" "<text>Total of " + $users + " users connected</text>" Write-Host "</prtg>"
- Save the script file as NumberofConnections.ps1 into the /Custom Sensors/EXEXML sub-directory of the probe system's PRTG program directory.
- Add the EXE/Script Advanced sensor to PRTG and select the created script in the sensor settings.
- In the section Parameters, define %host or the host name of the device.
- Make sure to use the Windows credentials of the parent device.
Alternatively, you can use the IISStatisticsXML Sensor from PRTG Tools Family which monitors several IIS statistics.
Created on Sep 4, 2013 11:54:04 AM by
Greg Campion [Paessler Support]
Last change on Aug 19, 2014 2:31:20 PM by
Gerald Schoch [Paessler Support]
9 Replies
Votes:
0
Votes:
0
Custom Sensor PTF.IISStatisticsXML
will give you that and more....
Votes:
0
Thank for the plugin.
But the plugin is not working for me, i get the message:
Access denied. Please check your Windows credentials. (code: PE095)
The credentials should be good, because i have configured: Use Windows credentials of parent device. And i have allready have working a few wmi sensors on this credenatials.
Votes:
0
I also use the credentials of the parent device and that works fine for me.
I do get the same error when I omit the domain name. Can you please check that you have entered the correct domain name at the parent device?
Votes:
0
Yes we put the correct computer name on the parent device. If we remove this name the wmi sensors do not work anymore, so this is correct. Als disabled the firewall.
Does anyone has a other suggestion ?
Votes:
0
You can try entering username, password and domain name (not the computer name) on the sensor level, breaking the inheritance of the device settings.
Votes:
0
I have checked this but i think this is not possible for a custum sensor. I don't have the option for "Interherit credentials for windows systems"
Votes:
0
If you send me your email address, I can send you some screenshots.
You can find my email address on the bottom left-hand corner of this page:
Use the "Send an email" link.
Votes:
0
This article applies to PRTG Network Monitor 13 or later
Monitoring the Number of Current IIS Users
You can use the EXE/Script Advanced Sensor with the following PowerShell script to get just the total current users from IIS:
$computer = $args $namespace = "root\CIMV2" $userSessions = Get-wmiObject -class Win32_PerfRawData_W3SVC_WebService -computername $computer -namespace $namespace | select-object -expand currentanonymoususers $users=$usersessions[0] Write-Host "<prtg>" "<result>" "<channel>Total Users connected to IIS</channel>" "<value>"+ $users +"</value>" "</result>" "<text>Total of " + $users + " users connected</text>" Write-Host "</prtg>"
- Save the script file as NumberofConnections.ps1 into the /Custom Sensors/EXEXML sub-directory of the probe system's PRTG program directory.
- Add the EXE/Script Advanced sensor to PRTG and select the created script in the sensor settings.
- In the section Parameters, define %host or the host name of the device.
- Make sure to use the Windows credentials of the parent device.
Alternatively, you can use the IISStatisticsXML Sensor from PRTG Tools Family which monitors several IIS statistics.
Created on Sep 4, 2013 11:54:04 AM by
Greg Campion [Paessler Support]
Last change on Aug 19, 2014 2:31:20 PM by
Gerald Schoch [Paessler Support]
Add comment