86 lines
2.9 KiB
YAML
86 lines
2.9 KiB
YAML
---
|
|
# Source: grafana/templates/configmap.yaml
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: grafana
|
|
namespace: default
|
|
labels:
|
|
helm.sh/chart: grafana-6.29.2
|
|
app.kubernetes.io/name: grafana
|
|
app.kubernetes.io/instance: grafana
|
|
app.kubernetes.io/version: "8.5.0"
|
|
app.kubernetes.io/managed-by: Helm
|
|
data:
|
|
grafana.ini: |
|
|
[analytics]
|
|
check_for_updates = true
|
|
[grafana_net]
|
|
url = https://grafana.net
|
|
[log]
|
|
mode = console
|
|
[paths]
|
|
data = /var/lib/grafana/
|
|
logs = /var/log/grafana
|
|
plugins = /var/lib/grafana/plugins
|
|
provisioning = /etc/grafana/provisioning
|
|
|
|
datasources.yaml: |
|
|
apiVersion: 1
|
|
datasources:
|
|
- isDefault: true
|
|
name: Prometheus
|
|
type: prometheus
|
|
url: http://prometheus-server
|
|
dashboardproviders.yaml: |
|
|
apiVersion: 1
|
|
providers:
|
|
- disableDeletion: false
|
|
editable: true
|
|
folder: ""
|
|
name: default
|
|
options:
|
|
path: /var/lib/grafana/dashboards/default
|
|
orgId: 1
|
|
type: file
|
|
download_dashboards.sh: |
|
|
#!/usr/bin/env sh
|
|
set -euf
|
|
mkdir -p /var/lib/grafana/dashboards/default
|
|
|
|
curl -skf \
|
|
--connect-timeout 60 \
|
|
--max-time 60 \
|
|
-H "Accept: application/json" \
|
|
-H "Content-Type: application/json;charset=UTF-8" \
|
|
"https://grafana.com/api/dashboards/13192/revisions/1/download" | sed '/-- .* --/! s/"datasource":.*,/"datasource": "Prometheus",/g'\
|
|
> "/var/lib/grafana/dashboards/default/gitea.json"
|
|
curl -skf \
|
|
--connect-timeout 60 \
|
|
--max-time 60 \
|
|
-H "Accept: application/json" \
|
|
-H "Content-Type: application/json;charset=UTF-8" \
|
|
"https://grafana.com/api/dashboards/12006/revisions/1/download" | sed '/-- .* --/! s/"datasource":.*,/"datasource": "Prometheus",/g'\
|
|
> "/var/lib/grafana/dashboards/default/kubernetes-apiserver.json"
|
|
curl -skf \
|
|
--connect-timeout 60 \
|
|
--max-time 60 \
|
|
-H "Accept: application/json" \
|
|
-H "Content-Type: application/json;charset=UTF-8" \
|
|
"https://grafana.com/api/dashboards/9614/revisions/1/download" | sed '/-- .* --/! s/"datasource":.*,/"datasource": "Prometheus",/g'\
|
|
> "/var/lib/grafana/dashboards/default/nginx-ingress.json"
|
|
curl -skf \
|
|
--connect-timeout 60 \
|
|
--max-time 60 \
|
|
-H "Accept: application/json" \
|
|
-H "Content-Type: application/json;charset=UTF-8" \
|
|
"https://grafana.com/api/dashboards/1860/revisions/26/download" | sed '/-- .* --/! s/"datasource":.*,/"datasource": "Prometheus",/g'\
|
|
> "/var/lib/grafana/dashboards/default/node.json"
|
|
curl -skf \
|
|
--connect-timeout 60 \
|
|
--max-time 60 \
|
|
-H "Accept: application/json" \
|
|
-H "Content-Type: application/json;charset=UTF-8" \
|
|
"https://grafana.com/api/dashboards/9628/revisions/7/download" | sed '/-- .* --/! s/"datasource":.*,/"datasource": "Prometheus",/g'\
|
|
> "/var/lib/grafana/dashboards/default/postgresql.json"
|