The meshtastic-metrics-exporter is a tool designed to collect and store comprehensive data from Meshtastic MQTT servers into TimescaleDB, with pre-configured Grafana dashboards for visualization and analysis.
- Ingests nearly all packet types from Meshtastic MQTT servers
- Stores time-series metrics in TimescaleDB hypertables for efficient querying
- Tracks node details, telemetry, and network topology in PostgreSQL tables
- Comes with pre-configured Grafana dashboards for immediate visualization
- Automatic data retention policies and continuous aggregations
- Configuration via
.envfile
Running this exporter for your local mesh community? We'd love to hear about it.
If you have a public dashboard or an interesting deployment, open a discussion or submit a PR to add your instance to the list below. Share what you're monitoring, how you've customized things, or what features you wish existed — it all helps shape where this project goes next.
| Community | Dashboard | Maintainer | Notes |
|---|---|---|---|
| Canadaverse | dash.mt.gt (guest/guest) | @tb0hdan | Production deployment |
| Your community here | — | — | Add yours → |
Got ideas for new metrics, dashboards, or integrations? Open an issue tagged with enhancement. Seeing what different communities actually need is the best way to prioritize development.
If this project is useful to your mesh network, share it with other communities. The more diverse the deployments, the better the project gets for everyone.
For affordable and reliable hosting, I personally use Hetzner Cloud for running this project. Their VPS offerings provide excellent performance for TimescaleDB and Grafana workloads at competitive prices.
Note: This is a referral link - using it supports the project at no extra cost to you. Plus you should get free 20$ for use
The system uses PostgreSQL with TimescaleDB extension:
- messages - Deduplication table with auto-expiry
- node_details - Node information (ID, names, hardware, location, MQTT status)
- node_neighbors - Network topology from NeighborInfo packets
- node_configurations - Module configurations and update intervals
- device_metrics - Battery, voltage, channel utilization, uptime
- environment_metrics - Temperature, humidity, pressure, air quality sensors
- air_quality_metrics - Particulate matter measurements
- power_metrics - Multi-channel voltage/current measurements
- pax_counter_metrics - WiFi and BLE device counts
- mesh_packet_metrics - Packet routing and network statistics
All hypertables have:
- Automatic 30-day retention policies
- Indexes optimized for time-series queries
- Continuous aggregation support
The project includes several pre-configured dashboards:
Shows network overview, active nodes, packet statistics, and channel utilization.
Note: Dashboard links target localhost:3000. Update panel configurations to match your Grafana server address.
Detailed view per node with telemetry, battery metrics, and configuration details.
Visualizes mesh topology from NeighborInfo packets with SNR-based coloring:
- Green nodes: Connected to MQTT
- Red nodes: Disconnected from MQTT
- Gray nodes: Unknown status (never connected)
- Line colors: Signal strength (SNR)
Recommendation: Allow 24 hours for data collection before expecting meaningful insights.
Configure the exporter using a .env file:
# TimescaleDB connection
DATABASE_URL=postgres://postgres:postgres@timescaledb:5432/meshtastic
# MQTT connection
MQTT_HOST=mqtt.meshtastic.org
MQTT_PORT=1883
MQTT_USERNAME=meshdev
MQTT_PASSWORD=large4cats
MQTT_KEEPALIVE=60
MQTT_TOPIC='msh/US/#'
MQTT_IS_TLS=false
# MQTT protocol version (MQTTv311 for public server)
# Options: MQTTv311, MQTTv31, MQTTv5
MQTT_PROTOCOL=MQTTv311
# MQTT callback API version
# Options: VERSION1, VERSION2
MQTT_CALLBACK_API_VERSION=VERSION2
# Exporter configuration
MESH_HIDE_SOURCE_DATA=false
MESH_HIDE_DESTINATION_DATA=false
MQTT_SERVER_KEY=1PG7OiApB1nwvP+rz05pAQ==
# Message types to filter (comma-separated)
# Full list: https://buf.build/meshtastic/protobufs/docs/main:meshtastic#meshtastic.PortNum
EXPORTER_MESSAGE_TYPES_TO_FILTER=TEXT_MESSAGE_APP
# Enable node configurations report
REPORT_NODE_CONFIGURATIONS=true
# Logging configuration
ENABLE_STREAM_HANDLER=true
LOG_LEVEL=INFO
LOG_FILE_MAX_SIZE=10MB
LOG_FILE_BACKUP_COUNT=5Start all services with Docker Compose:
docker compose up -dThis starts:
- Exporter: Python service processing MQTT messages
- TimescaleDB: PostgreSQL with TimescaleDB extension
- Grafana: Visualization platform (accessible at
http://localhost:3000)
MQTT Server → Exporter (Python) → TimescaleDB → Grafana
The exporter:
- Subscribes to Meshtastic MQTT topics
- Decrypts encrypted packets (if key provided)
- Parses Protocol Buffer messages
- Stores metrics in TimescaleDB hypertables
- Updates node details and topology in PostgreSQL tables
Contributions are welcome! Please open an issue or submit a pull request on GitHub.
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
