Skip to content

Event History

Note

The Event History feature is only available for Premium Deployments. Make sure to create a valid deployment before you start.

Event History is a service provided by the EMQX Platform. It records the client or message events, providing in-depth data insights for MQTT connections. This page introduces how to use the Event History.

Benefits

The Event History service provides the following benefits.

  • Troubleshooting: Users can examine past events, events such as "Disconnected", "Session Expiry", "Message Drop" etc., enabling them to troubleshoot issues and get insights into potential causes.
  • Compliance and Regulation: In many industries, such as healthcare or manufacturing, there are regulatory requirements for maintaining a detailed record of system activities. Event history ensures compliance with these regulations by providing a comprehensive audit trail of all relevant events.
  • Device Behavior Analysis: Event history can assist in analyzing the device behavior of the IoT system. By examining timestamps and event details, developers can pinpoint the weakness for optimization or improvement.

View Events

Go to your Premium deployment. Click Diagnose -> Event History from the left navigation menu. On the Event History page, you can view client events and message events in their respective tabs. You can filter events by a specific time period and search for events by Client ID and event type.

view_event

In the Description column of the displayed event list, it shows the details about the events.

view_event_list

Event Type List

The following table lists the event types that can be recorded and when they are triggered.

EventTrigger Time
Client ConnectWhen the broker receives the connection packet from the client.
Client ConnectedWhen client authentication is completed and successfully connected to the broker.
Client DisconnectedConnection layer of the client is ready to close.
Client SubscribeAfter receiving the subscription message.
Client UnsubscribeAfter receiving the unsubscribe packet.
Client ConnackWhen the broker is ready to issue a connection response message.
Session CreatedWhen a client connected is completed and a new session is created.
Session TakenoverAfter the session was terminated due to takenover.
Session SubscribedAfter the subscription operation is completed
Session UnsubscribedAfter the unsubscription operation is completed.
Session Resumedwhen client connected is executed and the old session information is successfully resumed.
Session DiscardedAfter the session was terminated due to discarded.
Session TerminatedAfter the session was terminated due to other reasons.
Message DroppedMessage drops when the message queue becomes full or when messages expire.