Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


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

Status
colourGreen
titleLAST TESTED ON CHECKMK 2.3.0P1


Panel
borderColorblack
bgColor#f8f8f8
titleTable of Contents

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 → Edit rule: Windows Performance-Counter objects

Info

Image Removed

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.Image Added

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

Warning

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:

Code Block
languagebash
themeRDark
titleC:\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):

Code Block
languagebash
themeRDark
titleC:\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

Image Added 


Example of rule configuration:

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

Image Added

The result

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

...

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


Server side check plugin: https://checkmk.com/de/integrations/

Image Removed

Info
Tip

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

Filter by label (Content by label)
showLabelsfalse
max5
spacesKB
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ( "
perfmon
windows" , "
ts_session
windows_agent" , "performance" ) and type = "page" and space = "KB"
labels
perfmon ts_session
security

Page Properties
hiddentrue


Related issues