Support API Grafana Annotations
... / Support API Grafana Annot...
BMPCreated with Sketch.BMPZIPCreated with Sketch.ZIPXLSCreated with Sketch.XLSTXTCreated with Sketch.TXTPPTCreated with Sketch.PPTPNGCreated with Sketch.PNGPDFCreated with Sketch.PDFJPGCreated with Sketch.JPGGIFCreated with Sketch.GIFDOCCreated with Sketch.DOC Error Created with Sketch.
question

Support API Grafana Annotations

Par
ChrisN
Créé le 2018-03-08 10:49:50 (edited on 2024-09-04 12:53:36) dans Erreur connexion SSL

Bonjour,

puis je ajouter des annotations grafana par API ?

http://docs.grafana.org/http_api/annotations/


Belle journée,
Chris.


2 réponses ( Latest reply on 2018-04-18 13:28:01 Par
)

Bonjour @ChrisN,

L'API de Grafana n'est pas bloquée, vous le pouvez.
http://docs.grafana.org/http_api/annotations/#create-annotation

Cordialement,

```text Merci ca marche du tonnerre !

petit tuto memo pour moi et pour les autres
1/ créer dans l'interface grafana un access api : APi Key

2/ notez le token que vous retourne l'exemple un truc du genre
curl -H "Authorization: Bearer eyJrIjdodslkfdslkdlmJDKFJKFSJk dsfjkdjsfk jdskljfdkdfsTZ9"

3/ noter le id du dashboard dans lequel vous voulez poser une annotation dans mon cas 508

4/ exemple d'envoi d'annotation avec curl
curl -XPOST "https://grafana.metrics.ovh.net/api/annotations" -H "Authorization: Bearer eyJrIjdodslkfdslkdlmJDKFJKFSJk dsfjkdjsfk jdskljfdkdfsTZ9" -H 'Content-Type: application/json' -d'
{
"dashboardId":508,
"text":"example de message"
}
'

et voila normalement l'annotation s'affiche sur votre dashboard !!!!

\o/ Houba \o/ ```

Les réponses sont actuellement désactivées pour cette question.