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
This commit is contained in:
23
import_docker_dashboard.py
Normal file
23
import_docker_dashboard.py
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/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}")
|
||||
Reference in New Issue
Block a user