What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

IIS Sessions/Connections with Network Monitor

Votes:

0

Your Vote:

Up

Down

Is it possible to have a sensor monitor the number of IIS sessions connected to a specific site on a shared IIS 6/7 webserver?

iis prtg sensor

Created on Feb 27, 2010 12:49:32 AM by  Mike Loughrey (0) 1

Last change on Mar 1, 2010 11:23:07 AM by  Torsten Lindner [Paessler Support]



Best Answer

Accepted Answer

Votes:

0

Your Vote:

Up

Down

This article applies to PRTG Network Monitor 13 or later

Monitoring Sessions per Specific Sites

As an alternative to the approaches described below, you can also try using this script to get the results of the IIS sessions:

$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>"

The line $users=$usersessions[0] can be edited to use other instances of your IIS server. If you use the WMI tester, run the query

SELECT name,currentanonymoususers FROM Win32_PerfRawData_W3SVC_WebService

You will see all of the IIS instances along with their current user value and can then change your array selection in the code accordingly.

For example if the WMI tester comes back with

WMI Test Result

Then you could change the line $users=$usersessions[0] to $users=$usersessions[1] for Default Site or $users=$usersessions[2] for the OpenMan site.

Created on Sep 11, 2013 2:06:28 PM by  Greg Campion [Paessler Support]

Last change on Sep 11, 2013 3:31:25 PM by  Gerald Schoch [Paessler Support]



7 Replies

Votes:

0

Your Vote:

Up

Down

You can monitor the current connections and current authenticated users with SNMP.

Simply run a detailed auto discovery on the server device.

The sessions per specific site can not be monitored.

Created on Mar 1, 2010 8:53:22 AM by  Aurelio Lombardi [Paessler Support]

Last change on Mar 1, 2010 9:10:13 AM by  Daniel Zobel [Product Manager]



Votes:

0

Your Vote:

Up

Down

This seems to work on my Windows Server 2003 servers running IIS 6. I tried to clone this and run it against another server running Windows Server 2008 R2 running IIS 7.5 and this fails.

Any ideas?

Created on Mar 2, 2010 9:01:17 AM by  Jithen Singh (0) 1



Votes:

0

Your Vote:

Up

Down

is SNMP enabled on the 2008R2 server?

the IIs sensors are SNMP sensors.

Created on Mar 2, 2010 1:26:56 PM by  Aurelio Lombardi [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hmm I dunno why I missed that! Thanks. Its working well now.

Created on Mar 4, 2010 7:01:32 PM by  Jithen Singh (0) 1



Votes:

0

Your Vote:

Up

Down

Try using OID 1.3.6.1.4.1.311.1.7.3.1.13.0

Created on Apr 8, 2010 11:28:21 PM by  Jeroen Huurman (60) 2 1



Votes:

0

Your Vote:

Up

Down

Having the same issue as mr. singh.

prtg not picking up anything but the basic sensors on server 2008 R2. I've been through SNMP configs in prtg and server/firewall. imported latest iis mib's - snmp tester not connecting

Created on May 26, 2010 8:36:35 PM by  Greg Hejl (1) 1



Accepted Answer

Votes:

0

Your Vote:

Up

Down

This article applies to PRTG Network Monitor 13 or later

Monitoring Sessions per Specific Sites

As an alternative to the approaches described below, you can also try using this script to get the results of the IIS sessions:

$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>"

The line $users=$usersessions[0] can be edited to use other instances of your IIS server. If you use the WMI tester, run the query

SELECT name,currentanonymoususers FROM Win32_PerfRawData_W3SVC_WebService

You will see all of the IIS instances along with their current user value and can then change your array selection in the code accordingly.

For example if the WMI tester comes back with

WMI Test Result

Then you could change the line $users=$usersessions[0] to $users=$usersessions[1] for Default Site or $users=$usersessions[2] for the OpenMan site.

Created on Sep 11, 2013 2:06:28 PM by  Greg Campion [Paessler Support]

Last change on Sep 11, 2013 3:31:25 PM by  Gerald Schoch [Paessler Support]



Please log in or register to enter your reply.


Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.