Telegraf- can we collect Total disconnected user sessions

Hi,

Do we have a plugin or object to collect on Total number of connected and/or disconnected user sessions on Windows server?

Thanks

You might be able to do it with win_perf_counters, if there is a performance counter for this action. Try using the perfmon application to browse through the avaiable counters.

1 Like

Thank you Daniel!!
I found there is a Count “Terminal Services” It has Active and Inactive sessions but does not Username.

image

Also for anyone interested in more reading about it
query-user

1 Like

Below is what i tested with Windows 10 Enterprise and it works

telegraf.cong

[[inputs.win_perf_counters.object]]
    ObjectName = "Terminal Services"
    Measurement = "Terminal_Service"
    Instances = ["------"]
    Counters = [
      "Active Sessions",
      "Inactive Sessions",
      "Total Sessions"
    ]

Output:

Terminal_Service,objectname=Terminal\ Services,host=Myhost Active_Sessions=1 1568022811000000000
Terminal_Service,host=Myhost,objectname=Terminal\ Services Inactive_Sessions=1 1568022811000000000
Terminal_Service,host=Myhost,objectname=Terminal\ Services Total_Sessions=2 1568022811000000000