CloudSignal Docs
GuidesMonitoring

Session history

Review past MQTT connections and analyze connection patterns.

Session history shows past connections to your MQTT broker. Use it to analyze patterns, debug intermittent disconnects, and audit connection activity.

Accessing session history

  1. Log into the CloudSignal dashboard
  2. Click Sessions in the sidebar
  3. Select History tab

Understanding history records

Each history entry shows:

FieldDescription
Client IDThe MQTT client identifier
UsernameThe authenticated user
Connected AtWhen the connection was established
Disconnected AtWhen the connection ended
DurationHow long the session lasted
Disconnect reasonWhy the connection ended

Disconnect reasons

ReasonDescription
NormalClient disconnected gracefully
Keep-alive timeoutClient stopped responding to pings
Client disconnectClient sent DISCONNECT packet
Server disconnectBroker closed the connection
TakeoverNew connection with same client ID
Auth failureAuthentication rejected
Protocol errorInvalid MQTT packets

Filtering history

By time range

Select a time period:

  • Last hour
  • Last 24 hours
  • Last 7 days
  • Custom range

By client

Search for specific clients:

Search: agent-001
-> Shows all historical sessions for agent-001

By disconnect reason

Filter to see only certain types of disconnections:

  • All disconnects
  • Normal only
  • Errors only
  • Timeouts only

Analyzing patterns

Connection frequency

Review how often clients connect and disconnect:

agent-001 history (last 24h):
  Connected: 08:00 -> Disconnected: 20:00 (12h)
  Connected: 08:00 -> Disconnected: 20:00 (12h)

Pattern: client connects during working hours only

Short-lived connections

Identify unstable connections:

mobile-app history (last hour):
  Connected: 10:00:00 -> 10:00:05 (5s)
  Connected: 10:00:10 -> 10:00:15 (5s)
  Connected: 10:00:20 -> 10:00:25 (5s)

Problem: client is in a reconnection loop

Keep-alive timeouts

Clients that stop responding:

gateway-001 history:
  Disconnect reason: Keep-alive timeout
  Duration: 45 minutes

Possible causes:
  - Network dropped without clean disconnect
  - Client process crashed
  - Firewall closed connection

Common investigations

"Why did my client disconnect?"

  1. Find the session in history
  2. Check the Disconnect reason
  3. Review the Duration (was it expected?)
  4. Look for patterns (same time each day?)

"Is my client reliably connected?"

  1. Filter history for the specific client
  2. Count disconnections in a time period
  3. Check if disconnects are normal or errors
Last 7 days for agent-001:
  Total sessions: 7
  Normal disconnects: 7
  Error disconnects: 0
  Average duration: 24h

Status: Healthy - one clean reconnect per day

"What happened at 3am?"

  1. Set time filter to the period in question
  2. Review all disconnections
  3. Look for mass disconnects (server issue) vs individual (client issue)
2024-01-15 03:00-03:05:
  50 clients disconnected
  Reason: Server restart (planned maintenance)

Session timeline view

Click on a client to see a visual timeline (rendered in the dashboard, not as text). The dashboard shows per-day connection bars across the selected time range so you can spot gaps and short reconnects at a glance.

Exporting history

Export session history for external analysis:

  1. Set your filters
  2. Click Export
  3. Choose format (CSV, JSON)
  4. Download
Use caseWhy export helps
Compliance auditsRecord connection activity for review
Capacity planningLong-range trends beyond dashboard view
Custom analyticsCombine with your own data sources

Retention period

Session history is retained based on your plan:

  • Free: 7 days
  • Pro: 30 days
  • Enterprise: Custom retention

Best practices

Regular review

Weekly checks:

  • Look for unexpected disconnect patterns
  • Identify clients with frequent reconnections
  • Review any error disconnects

Alerting

Set up alerts for:

  • Disconnect rate exceeding threshold
  • Specific clients disconnecting unexpectedly
  • Mass disconnection events

Correlation

Compare session history with:

  • Your deployment schedules
  • Network maintenance windows
  • Application log timestamps

Next steps

On this page