Skip to content

Commit

Permalink
update docs with grafana section
Browse files Browse the repository at this point in the history
Signed-off-by: Filipe Sequeira <filipe@weave.works>
  • Loading branch information
fsequeira1 committed Feb 4, 2022
1 parent 5348854 commit 2d05ef9
Showing 1 changed file with 33 additions and 3 deletions.
36 changes: 33 additions & 3 deletions docs/spec/v1beta1/provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Notification providers:
| Discord | discord |
| Generic webhook | generic |
| Google Chat | googlechat |
| Grafana | grafana |
| Lark | lark |
| Matrix | matrix |
| Microsoft Teams | msteams |
Expand Down Expand Up @@ -122,7 +123,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 @@ -336,7 +337,6 @@ spec:
name: opsgenie-token
```


### Prometheus Alertmanager

Sends notifications to [alertmanager v2 api](https://github.com/prometheus/alertmanager/blob/main/api/v2/openapi.yaml) if alert manager has basic authentication configured it is recommended to use
Expand Down Expand Up @@ -370,7 +370,6 @@ The provider will send the following labels for the event.
| name | The name of the involved object associated with the event |
| namespace | The namespace of the involved object associated with the event |


### Slack App

It is possible to use a Slack App bot integration to send messages. To obtain a bot token, follow
Expand Down Expand Up @@ -409,6 +408,36 @@ 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 Expand Up @@ -491,6 +520,7 @@ metadata:
data:
token: <api-key>
```

### Azure Event Hub

The Azure Event Hub supports two authentication methods, [JWT](https://docs.microsoft.com/en-us/azure/event-hubs/authenticate-application)
Expand Down

0 comments on commit 2d05ef9

Please sign in to comment.