feat: activate BunkerM MQTT broker + fix Telegraf

- BunkerM: recreated with port 1883 (external) -> 1900 (internal)
- BunkerM: disabled dynsec plugin, using password_file auth (bunker/bunker)
- Simulator: ENABLE_BUNKER=1, BUNKERM_PORT=1900
- Telegraf: reactivated BunkerM consumer on port 1900
- Telegraf: recreated container (3 MQTT consumers connected)
- Grafana: dashboard v4 with corrected Flux queries
- Grafana: datasource fixed (bucket=smartcity, token=my-super-token)

Verified:
- Simulator publishes to EMQX , Mosquitto , BunkerM 
- Telegraf receives from all 3 brokers 
- InfluxDB has data from all brokers 
- Grafana dashboard displays data 
This commit is contained in:
Eric FELIXINE
2026-05-25 20:03:55 -04:00
parent 5bbd5a6e5d
commit 943836f8fb
8 changed files with 140 additions and 30 deletions

14
scripts/bunkerm-init.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/bash
# BunkerM init script - create MQTT user and start services
set -e
# Create MQTT user if password file is empty or doesn't exist
if [ ! -s /etc/mosquitto/mosquitto_passwd ]; then
echo "Creating bunker MQTT user..."
mosquitto_passwd -b /etc/mosquitto/mosquitto_passwd bunker bunker 2>/dev/null || true
chown root:root /etc/mosquitto/mosquitto_passwd 2>/dev/null || true
chmod 0700 /etc/mosquitto/mosquitto_passwd 2>/dev/null || true
fi
# Execute the original entrypoint
exec /bin/sh -c '/docker-entrypoint.sh'