Terminal Server Sessions (ts_sessions)

This article describes how to enable monitoring of Windows terminal server sessions (RDP sessions), facilitating performance counters.

LAST TESTED ON CHECKMK 2.3.0P1

Table of Contents

Step-by-step guide

Using the agent bakery (preferred)

Enable transfer of performance counters through the Windows agent, as seen in the screenshot:

Setup → Agents → Windows, Linux, Solaris, AIX → Agent rules → Windows Performance-Counter objects → Add rule

Screenshot of adding a new rule for windows performance counter objects. Section name is ts_sessions. Counter object name or number is Terminal Services.

After you have created the needed rule, don't forget to bake a new agent and to install it on the Windows host. Without this, the agent rule you have configured will not work.

Manually by changing the check_mk.user.yml file

Do not do this if you followed the Agent Bakery section above!

Enable transfer of performance counters through the Windows agent by adding the following configuration snippet to your check_mk.user.yml:


Go to C:\ProgramData\checkmk\agent\check_mk.user.yml and activate the counter section by uncommenting the following section:

C:\ProgramData\checkmk\agent\check_mk.user.yml 
winperf:
  counters:
  - Terminal Services: ts_sessions
  enabled: true

Output inside the Windows agent

After you have done the configuration, a section similar to this will be added to the agent output (this might be useful for troubleshooting):

C:\ProgramData\checkmk\agent\check_mk.user.yml 
<<<winperf_ts_sessions>>>
1728393192.07 6324 10000000
2 1 rawcount
4 1 rawcount
6 2 rawcount

Optional, you can change the default behavior by using one of the below rules

 


Example of rule configuration:

Setup > Services > Service monitoring rules > Windows Terminal Server Sessions > Add rule: Windows Terminal Server Sessions

The result

After successfully following this guide, you will now discover a new service:

Screenshot of a Sessions services. Displaying as an OK state.


For more information, you can read the Check manual page of winperf_ts_sessions