MQTT Integration
This knowledge article provides instructions on configuring MQTT on the Cloud platform to receive real-time streaming statistics data from the cloud.
Prerequisites:
- A configured MQTT server with TLS enabled.
- Access to the Cloud portal with administrator level permissions.
Steps to follow:
- Enable the MQTT with below steps:
- From the main menu, select Admin → Integrations page.
- To configure MQTT, enable the toggle button.
- Configure the MQTT broker with the following details:
- Broker host: The host name or IP of your MQTT server
- Broker TLS port: The secure port number used by your MQTT server.
- Topic prefix: The prefix to be used for MQTT topics (default - “/shasta/stats”)
- Username: The username for accessing MQTT broker.
- Password: The password for accessing MQTT broker.
- Test the MQTT connection (optional):
Click on the test button to verify if MQTT brokers are able to connect and receive sample data. - Click on Save button to save the MQTT configuration.
Data frequency:
Once the MQTT integration is enabled and configured, user will receive client aggregation information and infrastructure aggregation information metrics every 5 minutes. These updates will be sent to the specified MQTT topics
<configured prefix>/venue/<venueId>/clients and
<configured prefix>/venue/<venueId>/infrastructure respectively.
Data format:
The data sent over MQTT will be encoded using Protocol Buffers (Protobuf).
Following are the proto files for client stats and infrastructure stats data payloads:
Protobuf definitions:
1. Infrastructure aggregation definitionField Number | Type | Name | Description |
1 | int64 | ts | Epoch timestamp of the data |
2 | int32 | org_id | Organization ID |
3 | int32 | venue_id | Venue ID |
4 | int32 | infra_id | Infrastructure ID |
5 | int64 | boot_time | Boot time of the infrastructure |
6 | int32 | uptime | Uptime of the infrastructure |
7 | double | cpu_load | CPU load |
8 | double | load_1m | 1-minute load average |
9 | double | load_5m | 5-minute load average |
10 | double | load_15m | 15-minute load average |
11 | int64 | mem_total | Total memory |
12 | int64 | mem_buffered | Buffered memory |
13 | int64 | mem_cached | Cached memory |
14 | int64 | mem_free | Free memory |
15 | double | temperature | Temperature |
16 | string | last_state | Last state of the infrastructure |
17 | int32 | num_connects | Total number of reconnects |
18 | bool | is_connected | Whether the infrastructure is currently connected |
19 | int32 | num_radios | Number of radios |
20 | int32 | num_interfaces | Number of interfaces |
21 | int32 | num_ssids | Number of SSIDs |
22 | int32 | num_wireless_connected_clients | Number of wireless connected clients |
23 | int32 | num_wired_connected_clients | Number of wired connected clients |
24 | int64 | last_connected_ts | Epoch timestamp of the last connection |
25 | int64 | last_disconnected_ts | Epoch timestamp of the last disconnection |
26 | string | mac_address | MAC address of the infrastructure |
2. Client aggregation definition
Field Number | Type | Name | Description |
1 | int64 | ts | Epoch timestamp of the data |
2 | int32 | org_id | Organization ID |
3 | string | mac | MAC address of the client |
4 | string | last_state | Last state of the client |
5 | int64 | last_connected_ts | Epoch timestamp of the last connection |
6 | int32 | last_venue_id | ID of the last venue the client connected to |
7 | int32 | last_infra_id | ID of the last infrastructure the client connected to |
8 | int32 | last_network_id | ID of the last network the client connected to |
9 | string | band | WiFi band |
10 | int32 | rssi_min | Minimum received signal strength indicator (RSSI) |
11 | int32 | rssi_max | Maximum RSSI |
12 | double | rssi_avg | Average RSSI |
13 | int32 | ack_rssi_min | Minimum acknowledgment RSSI |
14 | int32 | ack_rssi_max | Maximum acknowledgment RSSI |
15 | double | ack_rssi_avg | Average acknowledgment RSSI |
16 | int32 | rx_phyrate_min | Minimum received PHY rate |
17 | int32 | rx_phyrate_max | Maximum received PHY rate |
18 | double | rx_phyrate_avg | Average received PHY rate |
19 | int32 | rx_chwidth_min | Minimum received channel width |
20 | int32 | rx_chwidth_max | Maximum received channel width |
21 | int32 | rx_chwidth_avg | Average received channel width |
22 | int32 | tx_phyrate_min | Minimum transmitted PHY rate |
23 | int32 | tx_phyrate_max | Maximum transmitted PHY rate |
24 | double | tx_phyrate_avg | Average transmitted PHY rate |
25 | int32 | tx_chwidth_min | Minimum transmitted channel width |
26 | int32 | tx_chwidth_max | Maximum transmitted channel width |
27 | int32 | tx_chwidth_avg | Average transmitted channel width |
28 | int64 | num_rx_packets | Number of received packets |
29 | int64 | num_rx_bytes | Number of received bytes |
30 | int64 | num_tx_packets | Number of transmitted packets |
31 | int64 | num_tx_bytes | Number of transmitted bytes |
32 | int64 | num_tx_failed | Number of failed transmissions |
33 | int64 | num_tx_retries | Number of transmission retries |
34 | int32 | tx_duration | Total transmission duration |
35 | int32 | rx_duration | Total reception duration |
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article