Skip to content
Snippets Groups Projects
Commit 62469275 authored by Sören Henning's avatar Sören Henning
Browse files

Merge branch '32-grafana-provisioning' into 'master'

Resolve "Add dashboard and data source provisioning for Grafana"

See merge request she/spesb!5
parents 299b15ed ebd95c4c
No related branches found
No related tags found
1 merge request!5Resolve "Add dashboard and data source provisioning for Grafana"
Pipeline #446 passed with warnings
...@@ -46,8 +46,19 @@ helm install grafana stable/grafana -f infrastructure/grafana/values.yaml ...@@ -46,8 +46,19 @@ helm install grafana stable/grafana -f infrastructure/grafana/values.yaml
The official [Grafana Helm Chart repository](https://github.com/helm/charts/tree/master/stable/grafana) The official [Grafana Helm Chart repository](https://github.com/helm/charts/tree/master/stable/grafana)
provides further documentation including a table of configuration options. provides further documentation including a table of configuration options.
We provide a [ready-to-use Grafana dashboard](infrastructure/grafana/scalability-benchmarking-dashbaord.json), We provide ConfigMaps for a [Grafana dashboard](infrastructure/grafana/dashboard-config-map.yaml) and a [Grafana data source](infrastructure/grafana/prometheus-datasource-config-map.yaml).
which can be imported into your Grafana instance.
Create the Configmap for the dashboard:
```sh
kubectl apply -f infrastructure/grafana/dashboard-config-map.yaml
```
Create the Configmap for the data source:
```sh
kubectl apply -f infrastructure/grafana/prometheus-datasource-config-map.yaml
```
### A Kafka cluster ### A Kafka cluster
......
This diff is collapsed.
apiVersion: v1
kind: ConfigMap
metadata:
name: prometheus
labels:
grafana_datasource: "1"
data:
datasource.yaml: |-
# config file version
apiVersion: 1
datasources:
# <string, required> name of the datasource. Required
- name: Prometheus
# <string, required> datasource type. Required
type: prometheus
# <string, required> access mode. proxy or direct (Server or Browser in the UI). Required
access: proxy
# <bool> mark as default datasource. Max one per org
isDefault: true
# <int> org id. will default to orgId 1 if not specified
orgId: 1
# <string> url
url: http://prometheus-operated:9090 #http://localhost:9090
# <map> fields that will be converted to json and stored in json_data
jsonData:
timeInterval: "15s"
version: 1
# <bool> allow users to edit datasources from the UI.
editable: true
image:
repository: grafana/grafana
tag: 6.7.3
pullPolicy: IfNotPresent
# Administrator credentials when not using an existing secret (see below)
adminUser: admin
adminPassword: admin
## Sidecars that collect the configmaps with specified label and stores the included files them into the respective folders
## Requires at least Grafana 5 to work and can't be used together with parameters dashboardProviders, datasources and dashboards
sidecar:
image: kiwigrid/k8s-sidecar:0.1.99
imagePullPolicy: IfNotPresent
dashboards:
enabled: true
SCProvider: true
# label that the configmaps with dashboards are marked with
label: grafana_dashboard
# folder in the pod that should hold the collected dashboards (unless `defaultFolderName` is set)
folder: /tmp/dashboards
# The default folder name, it will create a subfolder under the `folder` and put dashboards in there instead
defaultFolderName: null
# If specified, the sidecar will search for dashboard config-maps inside this namespace.
# Otherwise the namespace in which the sidecar is running will be used.
# It's also possible to specify ALL to search in all namespaces
searchNamespace: null
# provider configuration that lets grafana manage the dashboards
provider:
# name of the provider, should be unique
name: sidecarProvider
# orgid as configured in grafana
orgid: 1
# folder in which the dashboards should be imported in grafana
folder: ''
# type of the provider
type: file
# disableDelete to activate a import-only behaviour
disableDelete: false
# allow updating provisioned dashboards from the UI
allowUiUpdates: true
datasources:
enabled: true
# label that the configmaps with datasources are marked with
label: grafana_datasource
# If specified, the sidecar will search for datasource config-maps inside this namespace.
# Otherwise the namespace in which the sidecar is running will be used.
# It's also possible to specify ALL to search in all namespaces
searchNamespace: default
service: service:
nodePort: 31199 nodePort: 31199
type: NodePort type: NodePort
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment