mirror of
https://github.com/prometheus-operator/prometheus-operator.git
synced 2025-04-21 03:38:43 +00:00
Add instructions for new dashboards in the Grafana helm chart README (#1408)
* Add example for adding grafana dashboards in README
This commit is contained in:
parent
f67b87ff1f
commit
1d3c462fd5
4 changed files with 48 additions and 3 deletions
helm
|
@ -8,4 +8,4 @@ maintainers:
|
|||
name: grafana
|
||||
sources:
|
||||
- https://github.com/coreos/prometheus-operator
|
||||
version: 0.0.33
|
||||
version: 0.0.34
|
||||
|
|
|
@ -74,3 +74,48 @@ $ helm install coreos/grafana --name my-release -f values.yaml
|
|||
> **Tip**: You can use the default [values.yaml](values.yaml)
|
||||
|
||||
> **Tip**: On GCE If you want to use `Ingress.enabled=true`, you must put `service.type=NodePort`
|
||||
|
||||
## Adding Grafana Dashboards
|
||||
|
||||
You can either add new dashboards via `serverDashboardConfigmaps` in `values.yaml`. These can then be
|
||||
picked up by Grafana Watcher.
|
||||
|
||||
```yaml
|
||||
serverDashboardConfigmaps:
|
||||
- example-dashboards
|
||||
```
|
||||
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: example-dashboards
|
||||
data:
|
||||
{{ (.Files.Glob "custom-dashboards/*.json").AsConfig | indent 2 }}
|
||||
|
||||
# Or
|
||||
#
|
||||
# data:
|
||||
# custom-dashboard.json: |-
|
||||
# {{ (.Files.Get "custom.json") | indent 4 }}
|
||||
#
|
||||
# The filename (and consequently the key under data) must be in the format `xxx-dashboard.json` or `xxx-datasource.json`
|
||||
# for them to be picked up.
|
||||
```
|
||||
|
||||
Another way is to add them through `serverDashboardFiles` directly in `values.yaml`. These are then combined
|
||||
into the same ConfigMap for the rest of the default dashboards.
|
||||
|
||||
```yaml
|
||||
serverDashboardFiles:
|
||||
example-dashboard.json: |-
|
||||
{
|
||||
"dashboard": {
|
||||
"annotations:[]
|
||||
...
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
In both cases, if you're exporting the jsons directly from Grafana, you'll want to wrap it in `{"dashboard": {}}`
|
||||
as stated in [Grafana Watcher's README](https://github.com/coreos/prometheus-operator/tree/master/contrib/grafana-watcher).
|
||||
|
|
|
@ -7,4 +7,4 @@ maintainers:
|
|||
name: kube-prometheus
|
||||
sources:
|
||||
- https://github.com/coreos/prometheus-operator
|
||||
version: 0.0.78
|
||||
version: 0.0.79
|
||||
|
|
|
@ -59,7 +59,7 @@ dependencies:
|
|||
condition: deployExporterNode
|
||||
|
||||
- name: grafana
|
||||
version: 0.0.33
|
||||
version: 0.0.34
|
||||
#e2e-repository: file://../grafana
|
||||
repository: https://s3-eu-west-1.amazonaws.com/coreos-charts/stable/
|
||||
condition: deployGrafana
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue