CheckMK count RD Session

Hi guys…

I feel stupid… I am trying to have a return of session on my Windows RDS server…

I went in Setup > services > service Monitoring rules > Windows Terminal server sessions and create a rule with specific thresholds for alerts and warnings
I applied this rules to specific hosts… and… nothing… I have no check for those hosts.

I use CheckMK in CRE Edition, version: 2.2.0p16

Can anyone help me to understand what am I doing wrong ? Is there antything to modify on the hosts ?

Greetings,

Vincent

Hi @keneichi,
to get an idea how to solve your problem read this forum post:

You should setup your yml file.

Karl

@mschlenker, the topic of Windows performance counters should find a place in the documentation.

hi @kdeutsch
and thanks for your answer :slight_smile:
I already tried to add counters in the check_mk.yml file in winperf section…

winperf:
    enabled: yes

    # default value,  do not change it if do not know what are you douing
    exe: agent

    # no - nothing(default), yes output trace to the log/winperf.log
    trace: no

    # yes - separate process for winnperf to prevent ahndle leaking, no - locally
    fork: yes

    # changes only section name winperf_******
    prefix: winperf

    # default value,  increase for heavy loaded machine
    timeout: 10

    # Select counters to extract. The following counters
    # are needed by checks shipped with check_mk.
    # Format:
    # - id:name
    # where id is OS counter and name is part of CHECK_MK Header
    counters:
        - 234: phydisk
        - 510: if
        - 238: processor
        - 638: tcp_conn
        - 3198: ts_sessions
        - 1920: ts_sessions

without any further results

Vincent

It is very strange…
I see TCP_Connexion check… but not the TS sessions while both instructions are on the same config file.
Is it possible the counter id (3198) changes ?? I use Windows 2016, 2019 and 2022.

Please use the counter name instead of number for the terminal sessions.
In my case it looks like this.

  counters:
    - 638: tcp_conn
    - Terminal Services: ts_sessions

This is working without problems on many systems.

1 Like

Hi @andreas-doehler

I do exactly what you said on three different server. One is Windows 2022. two are on Windows 2016…
Well… It work only for servers in 2016…

Vincent

Well… I tried on more servers
5 servers on Windows 2016 and 3 on Windows 2022

1 of 3 windows 2022 is OK
4 of 5 windows 2016 are OK…

incomprehensible

You can have a look inside the agent log file what’s the problem. Also check if your modified yml is read correctly by the agent.
If you have installed the server with other languages settings than English you can also have other names for the counter.

I opened regedit and went in
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\CurrentLanguage

There i found “Counter” entrie… a very big entrie (i copied all the content into a text file… more than 8000 lines)…
I searched… and I found

3200
Sessions en cours d’utilisation

(yeah sorry… i’m french ^^)

I tried with that counter 3200… and it finally work…

image

I hope that code is not changing from a server to an another…

Thank by the way for the help and advises…

Vincent

This should be no problem :smiley: i had such naming problems also with German language installations.

The problem is that this number can be different on every machine.

this is what I see… my last machine has a counter index of more than 18000 lines… and I can’t find the right number. :sob:

I would take a look at the registry folder

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\009

Here you find the English names and the same number as in “Current Language”

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.