VerneMQ Tracing
VerneMQ Tracing
1. Run VerneMQ.
docker-compose.yaml
:
version: '3.3'
services:
vernemq:
image: vernemq/vernemq
ports:
- '1883:1883'
environment:
DOCKER_VERNEMQ_ALLOW_ANONYMOUS: 'on'
DOCKER_VERNEMQ_ACCEPT_EULA: 'yes'
docker run -p 1883:1883 -e "DOCKER_VERNEMQ_ACCEPT_EULA=yes" --name vernemq1 -d vernemq/vernemq
2. Connect to container console
docker exec -it <container name or id>
docker ps
to check container name or id.
3. Check active sessions
vmq-admin session show
+--------------------+-----------+------------+------------+-----------+-------------+
| client_id | is_online | mountpoint | peer_host | peer_port | user |
+--------------------+-----------+------------+------------+-----------+-------------+
| test-client_pub | true | | 172.26.0.1 | 45864 | test-client |
+--------------------+-----------+------------+------------+-----------+-------------+
| test-client_sub | true | | 172.26.0.1 | 45448 | test-client |
+--------------------+-----------+------------+------------+-----------+-------------+
| test-client_health | true | | 172.26.0.1 | 45436 | test-client |
+--------------------+-----------+------------+------------+-----------+-------------+
4. Trace
vmq-admin trace client client-id=test-client_pub
Sources: Inspecting sessions Tracing