@@ -30,7 +30,7 @@ local singlestat = grafana.singlestat;
3030 legend_alignAsTable=true ,
3131 legend_rightSide=true ,
3232 )
33- .addTarget(prometheus.target('sum(rate(workqueue_adds_total{%(clusterLabel)s="$cluster", %(kubeControllerManagerSelector)s, instance=~"$instance"}[5m ])) by (%(clusterLabel)s, instance, name)' % $._config, legendFormat='{{%(clusterLabel)s}} {{instance}} {{name}}' % $._config));
33+ .addTarget(prometheus.target('sum(rate(workqueue_adds_total{%(clusterLabel)s="$cluster", %(kubeControllerManagerSelector)s, instance=~"$instance"}[%(grafanaIntervalVar)s ])) by (%(clusterLabel)s, instance, name)' % $._config, legendFormat='{{%(clusterLabel)s}} {{instance}} {{name}}' % $._config));
3434
3535 local workQueueDepth =
3636 graphPanel.new(
@@ -45,7 +45,7 @@ local singlestat = grafana.singlestat;
4545 legend_alignAsTable=true ,
4646 legend_rightSide=true ,
4747 )
48- .addTarget(prometheus.target('sum(rate(workqueue_depth{%(clusterLabel)s="$cluster", %(kubeControllerManagerSelector)s, instance=~"$instance"}[5m ])) by (%(clusterLabel)s, instance, name)' % $._config, legendFormat='{{%(clusterLabel)s}} {{instance}} {{name}}' % $._config));
48+ .addTarget(prometheus.target('sum(rate(workqueue_depth{%(clusterLabel)s="$cluster", %(kubeControllerManagerSelector)s, instance=~"$instance"}[%(grafanaIntervalVar)s ])) by (%(clusterLabel)s, instance, name)' % $._config, legendFormat='{{%(clusterLabel)s}} {{instance}} {{name}}' % $._config));
4949
5050 local workQueueLatency =
5151 graphPanel.new(
@@ -59,7 +59,7 @@ local singlestat = grafana.singlestat;
5959 legend_alignAsTable=true ,
6060 legend_rightSide=true ,
6161 )
62- .addTarget(prometheus.target('histogram_quantile(0.99, sum(rate(workqueue_queue_duration_seconds_bucket{%(clusterLabel)s="$cluster", %(kubeControllerManagerSelector)s, instance=~"$instance"}[5m ])) by (%(clusterLabel)s, instance, name, le))' % $._config, legendFormat='{{%(clusterLabel)s}} {{instance}} {{name}}' % $._config));
62+ .addTarget(prometheus.target('histogram_quantile(0.99, sum(rate(workqueue_queue_duration_seconds_bucket{%(clusterLabel)s="$cluster", %(kubeControllerManagerSelector)s, instance=~"$instance"}[%(grafanaIntervalVar)s ])) by (%(clusterLabel)s, instance, name, le))' % $._config, legendFormat='{{%(clusterLabel)s}} {{instance}} {{name}}' % $._config));
6363
6464 local rpcRate =
6565 graphPanel.new(
@@ -68,10 +68,10 @@ local singlestat = grafana.singlestat;
6868 span=4 ,
6969 format='ops' ,
7070 )
71- .addTarget(prometheus.target('sum(rate(rest_client_requests_total{%(kubeControllerManagerSelector)s, instance=~"$instance",code=~"2.."}[5m ]))' % $._config, legendFormat='2xx' ))
72- .addTarget(prometheus.target('sum(rate(rest_client_requests_total{%(kubeControllerManagerSelector)s, instance=~"$instance",code=~"3.."}[5m ]))' % $._config, legendFormat='3xx' ))
73- .addTarget(prometheus.target('sum(rate(rest_client_requests_total{%(kubeControllerManagerSelector)s, instance=~"$instance",code=~"4.."}[5m ]))' % $._config, legendFormat='4xx' ))
74- .addTarget(prometheus.target('sum(rate(rest_client_requests_total{%(kubeControllerManagerSelector)s, instance=~"$instance",code=~"5.."}[5m ]))' % $._config, legendFormat='5xx' ));
71+ .addTarget(prometheus.target('sum(rate(rest_client_requests_total{%(kubeControllerManagerSelector)s, instance=~"$instance",code=~"2.."}[%(grafanaIntervalVar)s ]))' % $._config, legendFormat='2xx' ))
72+ .addTarget(prometheus.target('sum(rate(rest_client_requests_total{%(kubeControllerManagerSelector)s, instance=~"$instance",code=~"3.."}[%(grafanaIntervalVar)s ]))' % $._config, legendFormat='3xx' ))
73+ .addTarget(prometheus.target('sum(rate(rest_client_requests_total{%(kubeControllerManagerSelector)s, instance=~"$instance",code=~"4.."}[%(grafanaIntervalVar)s ]))' % $._config, legendFormat='4xx' ))
74+ .addTarget(prometheus.target('sum(rate(rest_client_requests_total{%(kubeControllerManagerSelector)s, instance=~"$instance",code=~"5.."}[%(grafanaIntervalVar)s ]))' % $._config, legendFormat='5xx' ));
7575
7676 local postRequestLatency =
7777 graphPanel.new(
@@ -81,7 +81,7 @@ local singlestat = grafana.singlestat;
8181 format='s' ,
8282 min=0 ,
8383 )
84- .addTarget(prometheus.target('histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{%(clusterLabel)s="$cluster", %(kubeControllerManagerSelector)s, instance=~"$instance", verb="POST"}[5m ])) by (verb, url, le))' % $._config, legendFormat='{{verb}} {{url}}' ));
84+ .addTarget(prometheus.target('histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{%(clusterLabel)s="$cluster", %(kubeControllerManagerSelector)s, instance=~"$instance", verb="POST"}[%(grafanaIntervalVar)s ])) by (verb, url, le))' % $._config, legendFormat='{{verb}} {{url}}' ));
8585
8686 local getRequestLatency =
8787 graphPanel.new(
@@ -96,7 +96,7 @@ local singlestat = grafana.singlestat;
9696 legend_alignAsTable=true ,
9797 legend_rightSide=true ,
9898 )
99- .addTarget(prometheus.target('histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{%(clusterLabel)s="$cluster", %(kubeControllerManagerSelector)s, instance=~"$instance", verb="GET"}[5m ])) by (verb, url, le))' % $._config, legendFormat='{{verb}} {{url}}' ));
99+ .addTarget(prometheus.target('histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{%(clusterLabel)s="$cluster", %(kubeControllerManagerSelector)s, instance=~"$instance", verb="GET"}[%(grafanaIntervalVar)s ])) by (verb, url, le))' % $._config, legendFormat='{{verb}} {{url}}' ));
100100
101101 local memory =
102102 graphPanel.new(
@@ -115,7 +115,7 @@ local singlestat = grafana.singlestat;
115115 format='short' ,
116116 min=0 ,
117117 )
118- .addTarget(prometheus.target('rate(process_cpu_seconds_total{%(clusterLabel)s="$cluster", %(kubeControllerManagerSelector)s,instance=~"$instance"}[5m ])' % $._config, legendFormat='{{instance}}' ));
118+ .addTarget(prometheus.target('rate(process_cpu_seconds_total{%(clusterLabel)s="$cluster", %(kubeControllerManagerSelector)s,instance=~"$instance"}[%(grafanaIntervalVar)s ])' % $._config, legendFormat='{{instance}}' ));
119119
120120 local goroutines =
121121 graphPanel.new(
0 commit comments