Windows Terminal Server

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

Moderators: Developers, Moderators

Post Reply
User avatar
poypoy
Posts: 11
Joined: Thu Jul 19, 2007 9:27 am
Location: Geneva - Switzerland

Windows Terminal Server

Post by poypoy »

Hello,

I'm trying to make a graph on how many people are connect on my TS server. The thing is, I haven't found a working solution yet.

Regarding the OID, I've found this thing :

1.3.6.1.2.1.6.13.1.1.a.b.c.d.3389

which a.b.c.d is the IP Address of the TS Server and 3389 the TS port. It will return you an established answer for each person connected with this command :

snmpwalk -Of -v2c $hostaddress -C public

How could I convert this to count the number of answers established and graph it??? Do you have any idea?

Do you have maybe other ideas?

Thanks in advance.
Kindly Regards.

David aka poypoy
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

you're going to have to use some regex magic. I believe the interfaces.xml template that comes with Cacti does exactly this. Take a look. As for creating your own template, look in the document site on how-to.
User avatar
poypoy
Posts: 11
Joined: Thu Jul 19, 2007 9:27 am
Location: Geneva - Switzerland

Post by poypoy »

Thanks for the reply... Im a little bit newbie in this system, can u give me more instructions about your regex magic function please?

Many thanks in advance.

PoY
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

As previously stated, look at the cacti\resource\snmp_queries\interface.xml for an example.

Code: Select all

		<ifIP>
			<name>IP Address</name>
			<method>walk</method>
			<source>OID/REGEXP:.*\.([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})$</source>
			<direction>input</direction>
			<oid>.1.3.6.1.2.1.4.20.1.2</oid>
		</ifIP>
From an snmpwalk, you can see how it works:

Code: Select all

C:\>snmpwalk -v 1 -c public -On 127.0.0.1 .1.3.6.1.2.1.4.20.1.2
.1.3.6.1.2.1.4.20.1.2.127.0.0.1 = INTEGER: 1
.1.3.6.1.2.1.4.20.1.2.192.168.0.4 = INTEGER: 65539
You'll need to do something similar for your xml template. There are also some other posts in the script forum, which deal with this exact issue. Search is your friend ;-).
tonzy0907
Posts: 19
Joined: Wed May 30, 2007 6:16 am

Post by tonzy0907 »

hello

any updates w/ this topic. badly needed also graph of connected users in terminal server..
thanks in advance
oakfan52
Posts: 28
Joined: Mon Jan 02, 2006 9:26 pm
Location: Sacramento, CA

Post by oakfan52 »

You guys running cacti on windows ? If so this should be an easy wmi query.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

WMI queries have a huge performance impact compared to SNMP.
oakfan52
Posts: 28
Joined: Mon Jan 02, 2006 9:26 pm
Location: Sacramento, CA

Post by oakfan52 »

BSOD2600 wrote:WMI queries have a huge performance impact compared to SNMP.
You mean on the cacti server right ?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

That too.

Measure the time it takes to execute a WMI script against a remote Windows computer vs a SNMP query. Big difference. Then multiply that how many devices you plan on running that on with Cacti. For large installations, it's unacceptable and goes longer than 300 seconds.
oakfan52
Posts: 28
Joined: Mon Jan 02, 2006 9:26 pm
Location: Sacramento, CA

Post by oakfan52 »

BSOD2600 wrote:That too.

Measure the time it takes to execute a WMI script against a remote Windows computer vs a SNMP query. Big difference. Then multiply that how many devices you plan on running that on with Cacti. For large installations, it's unacceptable and goes longer than 300 seconds.
I know there is a pretty good delya in opening the wmi connection, but once it established all of the wmi quries for that host shouldn't take that long.

wmi queries are just so easy for me to create..... do you have any guides on how top find the data using snmp ?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Doing an snmpwalk of a Windows device will give you an idea what is currently available. Otherwise, Microsoft has some docs on what data snmp provides. Additionally, sites like snmp informant, provide more data via snmp.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests