Skip to content

Commit

Permalink
update docs with grafana section
Browse files Browse the repository at this point in the history
  • Loading branch information
fsequeira1 committed Feb 4, 2022
1 parent b37a0ed commit 30cc35c
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion docs/spec/v1beta1/provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Notification providers:
* Generic webhook
* Opsgenie
* Alertmanager
* Grafana

Git commit status providers:

Expand Down Expand Up @@ -118,7 +119,7 @@ kubectl create secret generic webhook-url \
Note that the secret must contain an `address` field.

The provider type can be: `slack`, `msteams`, `rocket`, `discord`, `googlechat`, `webex`, `sentry`,
`telegram`, `lark`, `matrix`, `azureeventhub`, `opsgenie`, `alertmanager` or `generic`.
`telegram`, `lark`, `matrix`, `azureeventhub`, `opsgenie`, `alertmanager`, `grafana` or `generic`.

When type `generic` is specified, the notification controller will post the
incoming [event](event.md) in JSON format to the webhook address.
Expand Down Expand Up @@ -405,6 +406,35 @@ spec:
```


### Grafana

Sends notifications to [grafana annotations api](https://grafana.com/docs/grafana/latest/http_api/annotations/)
if grafana has authentication configured it is recommended to use secretRef and include the API key.
To enable the annotations on a Dashboard its needed to enable the annotations with Tag `flux` on the Dashboard settings by.
This can be be performed by doing the following steps:
* Annotations > Query > Enable Match any
* Annotations > Query > Tags (Add Tag: `flux`)


```shell
kubectl create secret generic grafana-token \
--from-literal=token=<grafana-api-key> \
--from-literal=address=https://<grafana-url>/api/annotations
```

Then reference the secret in `spec.secretRef`:

```yaml
apiVersion: notification.toolkit.fluxcd.io/v1beta1
kind: Provider
metadata:
name: grafana
namespace: default
spec:
type: grafana
secretRef:
name: grafana-token
```
### Git commit status

The GitHub, GitLab, Bitbucket, and Azure DevOps provider will write to the
Expand Down

0 comments on commit 30cc35c

Please sign in to comment.