-
Notifications
You must be signed in to change notification settings - Fork 1
/
kubernetes-grafana.jsonnet
34 lines (29 loc) · 1.13 KB
/
kubernetes-grafana.jsonnet
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
local dashboards = ((import 'kubernetes-mixin/mixin.libsonnet'){
_config+:: {
// Selectors are inserted between {} in Prometheus queries.
cadvisorSelector: 'job="cadvisor"',
kubeletSelector: 'job="kubelet"',
kubeStateMetricsSelector: 'instance="kube-state-metrics.kube-system.svc:8080"',
nodeExporterSelector: 'job="node"',
kubeSchedulerSelector: 'job="kube-scheduler"',
kubeControllerManagerSelector: 'job="kube-controller-manager"',
kubeApiserverSelector: 'job="kube-api"',
kubeProxySelector: 'job="kube-proxy"',
podLabel: 'pod',
hostNetworkInterfaceSelector: 'device!~"veth.+"',
hostMountpointSelector: 'mountpoint="/"',
wmiExporterSelector: 'job="wmi-exporter"',
// Config for the Grafana dashboards in the Kubernetes Mixin
grafanaK8s: {
dashboardNamePrefix: 'Kubernetes / ',
dashboardTags: ['kubernetes-mixin'],
// For links between grafana dashboards, you need to tell us if your grafana
// servers under some non-root path.
linkPrefix: '.',
},
},
}).grafanaDashboards;
{
[name]: dashboards[name]
for name in std.objectFields(dashboards)
}