Skip to content

User Sessions ​

Butler SOS can poll Qlik Sense servers to retrieve a snapshot of currently active user sessions.

This is different from User Events, which provides real-time notifications when sessions start and stop.

Polling vs Events

User Sessions = Periodic snapshots of who is connected right now
User Events = Real-time stream of session start/stop activity

For background on what sessions are and how they work, see Sessions & Connections.

What data is collected? ​

For each virtual proxy configured for monitoring, Butler SOS tracks:

  • Total session count
  • Per-user session information (optional)
  • Session details including user directory and user ID

Configuration ​

User session monitoring is configured in two places in the config file:

1. General settings ​

yaml
Butler-SOS:
  userSessions:
    enableSessionExtract: true # Query unique user IDs with open sessions
    pollingInterval: 30000 # How often (ms) to poll session data
    excludeUser: # Optional blacklist of users to ignore
      - directory: LAB
        userId: testuser1

2. Per-server settings ​

For each monitored server, specify which virtual proxies to monitor:

yaml
Butler-SOS:
  serversToMonitor:
    servers:
      - host: sense1.company.com
        userSessions:
          enable: true
          host: sense1.company.com:4243
          virtualProxies:
            - virtualProxy: /
            - virtualProxy: /sales

Important

You need to configure both the general userSessions section AND the per-server userSessions settings to get user session data.

Use cases ​

Session data is valuable for:

  • Capacity planning - Understanding peak usage times and user load
  • License management - Tracking concurrent users
  • Troubleshooting - Identifying which users had active sessions when issues occurred
  • Server maintenance - Knowing which users will be affected by a server restart

Server tags on InfluxDB v2 ​

Changed in 15.4.0

From version 15.0.0 up to 15.4.0, the user session data Butler SOS wrote to InfluxDB v2 was missing its server tags.

This applies when Butler SOS writes to InfluxDB v2, and collects user sessions (Butler-SOS.userSessions.enableSessionExtract: true).

From version 15.0.0, the user session data Butler SOS wrote to InfluxDB v2 was missing its server tags. Three measurements were affected:

  • user_session_summary
  • user_session_list
  • user_session_details

These tags were missing from them:

  • host
  • server_name
  • server_description
  • every custom tag set for the server under Butler-SOS.serversToMonitor.servers[].serverTags

The data itself was written, with the tags user_session_virtual_proxy and user_session_host, and on user_session_details the user and session tags.

InfluxDB v1 and v3 were not affected. Neither were the other kinds of data on InfluxDB v2, such as health metrics.

Dashboards that filter or group user sessions by server, for example a Grafana panel with server_name in its query or a variable built on it, showed no session data on InfluxDB v2. With several Qlik Sense servers, their sessions could no longer be told apart.

Since 15.4.0 the three measurements carry the server tags again on InfluxDB v2, the same tags as on InfluxDB v1 and v3:

user_session_summary,env=prod,host=sense1.example.com,server_description=Central,server_name=central,user_session_host=sense1.example.com,user_session_virtual_proxy=/ session_count=1u,session_user_id_list="CORP\\anna"

A server tag with no value is left out, as before.

Nothing needs doing for new data: your dashboards show it again from the upgrade onwards.

Session data written by versions 15.0.0 up to this fix has no server tags. Tags can't be added to data already in InfluxDB, so a dashboard that filters on a server tag shows a gap for that period.

Released under the MIT License.