New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

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

 

Top Tags


View all Tags


Performance Monitor Sensors for intermittently available counters?

Votes:

0

Your Vote:

Up

Down

When using Performance Monitor sensors to graph details of RDP sessions the sensors will go into alarm when the RDP session is disconnected.

As an example the counter '\Terminal Services Session(RDP-Tcp 6)\Total Compressed Bytes' will be available when the RDP server assigns a user to session 6 and return 'No data to return. (Performance Counter error 0x800007D5)' when the user disconnects.

Short of writing a loopback to use the API to auto-acknowledge the sensor, is there any way to recognise the specific error of an and handle it gracefully? This is not actually an error, just Windows advising that there is no data available, so it should be handled as a null (or zero) value.

performance performance-counters rdp

Created on Jun 12, 2014 5:12:39 AM by  alowde (0) 1



3 Replies

Votes:

0

Your Vote:

Up

Down

The only way to resolve this issue would be to have it auto-acknowledge or you could set it up to automatically pause. Unfortunately this would apply to all errors not only to a specific error, there is no way to have notifications trigger for specific errors.

The only way that I can think of that you could set this up in PRTG is to use a script to retrieve this data and there you would be able to define what an error is or not and you could have the script return 0 value when the user is disconnected.

More information about the custom script sensors can be found under Setup->PRTG API->Custom Sensors.

Created on Jun 16, 2014 10:53:57 AM by  Greg Campion [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Thanks Greg.

A Powershell script worked well for this purpose and hasn't caused any performance issues.

For the benefit of anyone else trying to monitor RDP bandwidth I'll include the script. This is a simple example only, no proper error handling and has the machine to monitor hard-coded.

$ErrorActionPreference= 'silentlycontinue'

Try 
{

$result= (Get-Counter -counter "Terminal Services Session(RDP-Tcp $args)\Total Compressed Bytes" -ComputerName [SERVER NAME]).CounterSamples[0].CookedValue

"$result" + ":Session $args OK"

}

Catch
{
"0:Session $args Unavailable"
}

Created on Jun 18, 2014 3:19:13 AM by  alowde (0) 1

Last change on Jun 18, 2014 9:17:02 AM by  Greg Campion [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Thanks so much for the input to the community!

Created on Jun 18, 2014 9:17:13 AM by  Greg Campion [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.