- InfluxDB: read-only datasource, need proper v2 config - Orion-LD/FROST: simple-json plugin INCOMPATIBLE - Solutions: modify provisioning, use direct HTTP, or create adapter - Connect networks: DONE, now need datasource config
44 lines
1.8 KiB
Markdown
44 lines
1.8 KiB
Markdown
# Bilan Grafana Datasources - 05-05-2026
|
|
|
|
## Statut
|
|
- ✅ **Prometheus** : Fonctionne (plugin natif, network partagé)
|
|
- ❌ **InfluxDB** : Problèmes de config (read-only + health check fails)
|
|
- ❌ **Orion-LD / FROST / Stellio** : Plugin simple-json INCOMPATIBLE
|
|
|
|
## Solutions
|
|
|
|
### InfluxDB
|
|
1. **Problème** : Datasource "read-only" (provisioned)
|
|
2. **Solution A** : Modifier `/etc/grafana/provisioning/datasources/datasources.yaml` dans le container
|
|
3. **Solution B** : Supprimer la datasource provisioned et la recréer via API
|
|
4. **Configurer** :
|
|
- URL : `http://digital-twin-influxdb:8086`
|
|
- Version : `Flux` (v2)
|
|
- Organization : `smartcity`
|
|
- DefaultBucket : `smartcity`
|
|
- Token : (récupérer depuis container InfluxDB)
|
|
|
|
### Orion-LD / FROST / Stellio (NGSI-LD / SensorThings)
|
|
**NE PAS utiliser** `grafana-simple-json-datasource` (incompatible).
|
|
|
|
**À FAIRE** :
|
|
1. **Option 1** : Installer plugin NGSI-LD dédié (si existe)
|
|
2. **Option 2** : Créer un micro-service adaptateur (Node.js/Python) qui :
|
|
- Implémente l'API simple-json
|
|
- Traduit les requêtes vers NGSI-LD/SensorThings
|
|
- Expose sur un port (ex: 9000)
|
|
3. **Option 3** : Utiliser l'API HTTP directement dans un panel :
|
|
- Installer plugin "JSON API" dans Grafana
|
|
- Faire des requêtes GET vers les APIs
|
|
- Parser la réponse JSON pour afficher les données
|
|
|
|
## Actions immédiates
|
|
1. ✅ Connecter Grafana aux réseaux (smartcity-shared, frost_http_default, etc.)
|
|
2. ⚠️ Corriger InfluxDB (modifier provisioning ou recréer datasource)
|
|
3. ⚠️ Pour NGSI-LD : Choisir option 2 ou 3 ci-dessus
|
|
4. ⚠️ Tester avec un panel réel (pas seulement health check)
|
|
|
|
## Note
|
|
Le health check (`/api/datasources/{uid}/health`) échoue pour certains types.
|
|
La seule façon de vraiment tester est de créer un panel qui utilise la datasource.
|