Files
smart-city-digital-twin-mar…/import_docker_dashboard.py
Eric FELIXINE 918c03dffa fix: Simulateur MQTT 3/4 + OpenRemote master + Mapsettings
- MQTT OK: 3/4 (EMQX, Mosquitto, BunkerM)
- OpenRemote: utilise realm master (token fonctionnel)
- Realm smartcity recréé dans Keycloak
- Assets IOTSensor créés dans master (30) et smartcity (30)
- Mapsettings: layers iot-sensors + labels pour master et smartcity
- INTERVAL=5s, réseau openremote_default ajouté
- Dockerfile: --no-cache rebuild
2026-05-11 14:19:53 -04:00

24 lines
586 B
Python

#!/usr/bin/env python3
import json
import requests
# Read the Docker Metrics dashboard
with open('/home/eric/smart-city-digital-twin-martinique/grafana-dashboard-docker-metrics.json', 'r') as f:
dashboard = json.load(f)
# Import to Grafana
url = "https://grafana.digitribe.fr/api/dashboards/db"
auth = ('admin', 'Digitribe972')
payload = {
"dashboard": dashboard,
"overwrite": True
}
try:
resp = requests.post(url, json=payload, auth=auth, verify=False)
print(f"Status: {resp.status_code}")
print(resp.json())
except Exception as e:
print(f"Error: {e}")