kube-prometheus icon indicating copy to clipboard operation
kube-prometheus copied to clipboard

etcd-grafana dashboard from etcd-io-mixin no longer included

Open wjentner opened this issue 3 years ago • 3 comments

What happened?

In previous versions of kube-prometheus, a grafana-dashboard for etcd has been added automatically.

The dashboard is defined here: https://github.com/etcd-io/etcd/blob/master/contrib/mixin/mixin.libsonnet#L236 It is however not included in the compiled YAML.

How to reproduce it (as minimally and precisely as possible):

static-etcd example.

wjentner avatar Feb 12 '21 17:02 wjentner

@wjentner as a workaround I currently add it manually

Dashboard:

local kp = (import 'kube-prometheus/main.libsonnet') +
           (import 'kube-prometheus/addons/anti-affinity.libsonnet') +
           (import 'kube-prometheus/platforms/kubeadm.libsonnet') +
           (import 'kube-prometheus/addons/all-namespaces.libsonnet') +
           (import 'kube-prometheus/addons/static-etcd.libsonnet') {

             values+:: {
               // ...
               grafana+:: {
                 config: {},
                 rawDashboards+:: {},
                 dashboards+:: (import 'github.com/etcd-io/etcd/contrib/mixin/mixin.libsonnet').grafanaDashboards,
               },

PrometheusRule:

local kp = (import 'kube-prometheus/main.libsonnet') +
           (import 'kube-prometheus/addons/anti-affinity.libsonnet') +
           (import 'kube-prometheus/platforms/kubeadm.libsonnet') +
           (import 'kube-prometheus/addons/all-namespaces.libsonnet') +
           (import 'kube-prometheus/addons/static-etcd.libsonnet') {

             values+:: {},
             // ...
             etcd: {
               prometheusRule: {
                 apiVersion: 'monitoring.coreos.com/v1',
                 kind: 'PrometheusRule',
                 metadata: {
                   labels: {
                     prometheus: 'k8s',
                     role: 'alert-rules',
                   },
                   name: 'etcd-rules',
                   namespace: $.values.common.namespace,
                 },
                 spec+: (import 'github.com/etcd-io/etcd/contrib/mixin/mixin.libsonnet').prometheusAlerts,
               },
             },
             // ...
{ ['etcd-' + name]: kp.etcd[name] for name in std.objectFields(kp.etcd) } +
// ...

pschulten avatar May 20 '21 13:05 pschulten

This should be partially fixed when https://github.com/prometheus-operator/kube-prometheus/pull/1107 is merged. After that, we can fix part when it is automatically added with etcd addon.

paulfantom avatar May 21 '21 08:05 paulfantom

I'll confess interest in this.

jcpunk avatar Apr 28 '23 19:04 jcpunk