github.com/argoproj/argo-cd/v3@v3.2.1/docs/operator-manual/notifications/services/grafana.md (about) 1 # Grafana 2 3 To be able to create Grafana annotation with argocd-notifications you have to create an [API Key](https://grafana.com/docs/grafana/latest/http_api/auth/#create-api-key) inside your [Grafana](https://grafana.com). 4 5  6 7 Available parameters : 8 9 * `apiURL` - the server url, e.g. https://grafana.example.com 10 * `apiKey` - the API key for the serviceaccount 11 * `insecureSkipVerify` - optional bool, true or false 12 13 1. Login to your Grafana instance as `admin` 14 2. On the left menu, go to Configuration / API Keys 15 3. Click "Add API Key" 16 4. Fill the Key with name `ArgoCD Notification`, role `Editor` and Time to Live `10y` (for example) 17 5. Click on Add button 18 6. Store apiKey in `argocd-notifications-secret` Secret and Copy your API Key and define it in `argocd-notifications-cm` ConfigMap 19 20 ```yaml 21 apiVersion: v1 22 kind: ConfigMap 23 metadata: 24 name: argocd-notifications-cm 25 data: 26 service.grafana: | 27 apiUrl: https://grafana.example.com/api 28 apiKey: $grafana-api-key 29 ``` 30 31 ```yaml 32 apiVersion: v1 33 kind: Secret 34 metadata: 35 name: <secret-name> 36 stringData: 37 grafana-api-key: api-key 38 ``` 39 40 7. Create a template in `argo-notifications-cm` Configmap 41 This will be used to pass the (required) text of the annocation to Grafana (or re-use an existing one) 42 As there is no specific template for Grafana, you must use the generic `message`: 43 44 ```yaml 45 apiVersion: v1 46 kind: ConfigMap 47 metadata: 48 name: argocd-notifications-cm 49 data: 50 templates: 51 template.app-deployed: | 52 messsage: Application {{.app.metadata.name}} is now running new version of deployments manifests. 53 ``` 54 55 8. Create subscription for your Grafana integration 56 57 ```yaml 58 apiVersion: argoproj.io/v1alpha1 59 kind: Application 60 metadata: 61 annotations: 62 notifications.argoproj.io/subscribe.<trigger-name>.grafana: tag1|tag2 # list of tags separated with | 63 ``` 64 65 9. Change the annotations settings 66 