[solved] Terminal services active sessions SNMP

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
noshybabs
Posts: 29
Joined: Wed Sep 02, 2009 8:38 am

[solved] Terminal services active sessions SNMP

Post by noshybabs »

Is there a way of plotting active terminal services sessions using SNMP? i tried the host MIB one but its brings back incorrent results.

Operating System: Windows 2003 R2
Webserver: IIS
Cacti: Version 0.8.7e
Last edited by noshybabs on Fri Sep 04, 2009 2:01 am, edited 1 time in total.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

How was it incorrect? What OID did you use?
noshybabs
Posts: 29
Joined: Wed Sep 02, 2009 8:38 am

Post by noshybabs »

Its returning a figure of over 200, when in actuallity it should read something like 9.

Im not intirley sure what a OID is but i assume its a key relating to data returned vis SNMP? If so im not sure, im just using the graph template that comes bundled with the latest version of the windows installer.

I am very much a noob so please be kind.
Attachments
tsusers.JPG
tsusers.JPG (25.58 KiB) Viewed 7370 times
Cacti Version 0.8.7e
Cacti OS win32
SNMP Version NET-SNMP version: 5.4.2.1
RRDTool Version RRDTool 1.2.x
PHP Version 5.2.9
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

The template you've got shows "Logged in users" - it's not really showing physically logged in session. If a user connects to your file server via a share on a mapped drive, then this is classed as a logged in user.
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
noshybabs
Posts: 29
Joined: Wed Sep 02, 2009 8:38 am

Post by noshybabs »

Arr ok i get it

Is there a way of showing just the logged in users as opposed to this? preferebly something that doesnt need me to install anything new on the terminal servers?
Cacti Version 0.8.7e
Cacti OS win32
SNMP Version NET-SNMP version: 5.4.2.1
RRDTool Version RRDTool 1.2.x
PHP Version 5.2.9
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

I seem to recall this one working (don't use Windows anymore for Cacti)

http://forums.cacti.net/viewtopic.php?t ... nal+server
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
noshybabs
Posts: 29
Joined: Wed Sep 02, 2009 8:38 am

Post by noshybabs »

Thanks im just trying it now.
Cacti Version 0.8.7e
Cacti OS win32
SNMP Version NET-SNMP version: 5.4.2.1
RRDTool Version RRDTool 1.2.x
PHP Version 5.2.9
noshybabs
Posts: 29
Joined: Wed Sep 02, 2009 8:38 am

Post by noshybabs »

cant seem to get the data collector script to work, i get this in the log file

09/04/2009 02:51:04 PM - SPINE: Poller[0] Host[11] ERROR: Empty result [Leeds-ts01]: 'perl C:/Inetpub/wwwroot/cacti\scripts\w32_query_TerminalService.pl 192.9.200.52 get ActiveSessions,TotalSessions'
Cacti Version 0.8.7e
Cacti OS win32
SNMP Version NET-SNMP version: 5.4.2.1
RRDTool Version RRDTool 1.2.x
PHP Version 5.2.9
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

1) specify the full path to perl.
2) manually run that scripting command and see if it works. You'll likely have to open up WMI security: http://bsod2600.home.comcast.net/~bsod2 ... s.html#FAQ
noshybabs
Posts: 29
Joined: Wed Sep 02, 2009 8:38 am

Post by noshybabs »

Thanks for the tips,

I've given pearl the full path... Im not entirly sure how to run the sciprt manually so lets how the path thing works!

Edit:
Looks like it must be the pearl, ive given eveyone remote access to WMI and im still getting this error

09/07/2009 08:32:03 AM - SPINE: Poller[0] Host[11] ERROR: Empty result [Leeds-ts01]: 'perl C:\Inetpub\wwwroot\cacti\scripts\w32_query_TerminalService.pl 192.9.200.52 get ActiveSessions,TotalSessions'

Has anyone had any success getting this working?
Cacti Version 0.8.7e
Cacti OS win32
SNMP Version NET-SNMP version: 5.4.2.1
RRDTool Version RRDTool 1.2.x
PHP Version 5.2.9
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

You need to clear the poller cache in between poller runs before the full path to Perl is correctly specified.
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

noshybabs wrote:Im not entirly sure how to run the sciprt manually so lets how the path thing works!

09/07/2009 08:32:03 AM - SPINE: Poller[0] Host[11] ERROR: Empty result [Leeds-ts01]: 'perl C:\Inetpub\wwwroot\cacti\scripts\w32_query_TerminalService.pl 192.9.200.52 get ActiveSessions,TotalSessions'
By running the command cacti is trying to use... so you'd run the following at the command line yourself:

Code: Select all

perl C:\Inetpub\wwwroot\cacti\scripts\w32_query_TerminalService.pl 192.9.200.52 get ActiveSessions,TotalSessions
noshybabs
Posts: 29
Joined: Wed Sep 02, 2009 8:38 am

Post by noshybabs »

this may sound like a daft question, but does perl come with the windows installer or do i need to instrall it manually?
Cacti Version 0.8.7e
Cacti OS win32
SNMP Version NET-SNMP version: 5.4.2.1
RRDTool Version RRDTool 1.2.x
PHP Version 5.2.9
noshybabs
Posts: 29
Joined: Wed Sep 02, 2009 8:38 am

Post by noshybabs »

To answer my own daft question.... No it doesnt. Its all working now, thanks everyone for your help.
Cacti Version 0.8.7e
Cacti OS win32
SNMP Version NET-SNMP version: 5.4.2.1
RRDTool Version RRDTool 1.2.x
PHP Version 5.2.9
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests