Track connection time for vpn clients using Grafana and Influxdb

Hello guys,

I’m looking for hints and ideas. Using api I can get the list of vpn connected users. Can I use this data to create graphs with the most active users based on how often I’m seeing them online ?
Also, can I get approximate metrics with online time for each and every user ?