You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dashboards/network-usage/cluster-total.libsonnet
+20-20Lines changed: 20 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,7 @@ local var = g.dashboard.variable;
67
67
+ tsPanel.queryOptions.withTargets([
68
68
prometheus.new(
69
69
'${datasource}',
70
-
'sum by (namespace) (rate(container_network_receive_bytes_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]))' % $._config
70
+
'sum by (namespace) (rate(container_network_receive_bytes_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]) * on (%(clusterLabel)s,namespace,pod) kube_pod_info{host_network="false"})' % $._config
71
71
)
72
72
+ prometheus.withLegendFormat('__auto'),
73
73
]),
@@ -77,43 +77,43 @@ local var = g.dashboard.variable;
77
77
+ tsPanel.queryOptions.withTargets([
78
78
prometheus.new(
79
79
'${datasource}',
80
-
'sum by (namespace) (rate(container_network_transmit_bytes_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]))' % $._config
80
+
'sum by (namespace) (rate(container_network_transmit_bytes_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]) * on (%(clusterLabel)s,namespace,pod) kube_pod_info{host_network="false"})' % $._config
81
81
)
82
82
+ prometheus.withLegendFormat('__auto'),
83
83
]),
84
84
85
85
table.new('Current Status')
86
86
+ table.gridPos.withW(24)
87
87
+ table.queryOptions.withTargets([
88
-
prometheus.new('${datasource}', 'sum by (namespace) (rate(container_network_receive_bytes_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]))' % $._config)
88
+
prometheus.new('${datasource}', 'sum by (namespace) (rate(container_network_receive_bytes_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]) * on (%(clusterLabel)s,namespace,pod) kube_pod_info{host_network="false"})' % $._config)
89
89
+ prometheus.withInstant(true)
90
90
+ prometheus.withFormat('table'),
91
91
92
-
prometheus.new('${datasource}', 'sum by (namespace) (rate(container_network_transmit_bytes_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]))' % $._config)
92
+
prometheus.new('${datasource}', 'sum by (namespace) (rate(container_network_transmit_bytes_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]) * on (%(clusterLabel)s,namespace,pod) kube_pod_info{host_network="false"})' % $._config)
93
93
+ prometheus.withInstant(true)
94
94
+ prometheus.withFormat('table'),
95
95
96
-
prometheus.new('${datasource}', 'avg by (namespace) (rate(container_network_receive_bytes_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]))' % $._config)
96
+
prometheus.new('${datasource}', 'avg by (namespace) (rate(container_network_receive_bytes_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]) * on (%(clusterLabel)s,namespace,pod) kube_pod_info{host_network="false"})' % $._config)
97
97
+ prometheus.withInstant(true)
98
98
+ prometheus.withFormat('table'),
99
99
100
-
prometheus.new('${datasource}', 'avg by (namespace) (rate(container_network_transmit_bytes_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]))' % $._config)
100
+
prometheus.new('${datasource}', 'avg by (namespace) (rate(container_network_transmit_bytes_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]) * on (%(clusterLabel)s,namespace,pod) kube_pod_info{host_network="false"})' % $._config)
101
101
+ prometheus.withInstant(true)
102
102
+ prometheus.withFormat('table'),
103
103
104
-
prometheus.new('${datasource}', 'sum by (namespace) (rate(container_network_receive_packets_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]))' % $._config)
104
+
prometheus.new('${datasource}', 'sum by (namespace) (rate(container_network_receive_packets_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]) * on (%(clusterLabel)s,namespace,pod) kube_pod_info{host_network="false"})' % $._config)
105
105
+ prometheus.withInstant(true)
106
106
+ prometheus.withFormat('table'),
107
107
108
-
prometheus.new('${datasource}', 'sum by (namespace) (rate(container_network_transmit_packets_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]))' % $._config)
108
+
prometheus.new('${datasource}', 'sum by (namespace) (rate(container_network_transmit_packets_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]) * on (%(clusterLabel)s,namespace,pod) kube_pod_info{host_network="false"})' % $._config)
109
109
+ prometheus.withInstant(true)
110
110
+ prometheus.withFormat('table'),
111
111
112
-
prometheus.new('${datasource}', 'sum by (namespace) (rate(container_network_receive_packets_dropped_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]))' % $._config)
112
+
prometheus.new('${datasource}', 'sum by (namespace) (rate(container_network_receive_packets_dropped_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]) * on (%(clusterLabel)s,namespace,pod) kube_pod_info{host_network="false"})' % $._config)
113
113
+ prometheus.withInstant(true)
114
114
+ prometheus.withFormat('table'),
115
115
116
-
prometheus.new('${datasource}', 'sum by (namespace) (rate(container_network_transmit_packets_dropped_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]))' % $._config)
116
+
prometheus.new('${datasource}', 'sum by (namespace) (rate(container_network_transmit_packets_dropped_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]) * on (%(clusterLabel)s,namespace,pod) kube_pod_info{host_network="false"})' % $._config)
117
117
+ prometheus.withInstant(true)
118
118
+ prometheus.withFormat('table'),
119
119
])
@@ -214,7 +214,7 @@ local var = g.dashboard.variable;
214
214
+ tsPanel.queryOptions.withTargets([
215
215
prometheus.new(
216
216
'${datasource}',
217
-
'avg by (namespace) (rate(container_network_receive_bytes_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]))' % $._config
217
+
'avg by (namespace) (rate(container_network_receive_bytes_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]) * on (%(clusterLabel)s,namespace,pod) kube_pod_info{host_network="false"})' % $._config
218
218
)
219
219
+ prometheus.withLegendFormat('__auto'),
220
220
]),
@@ -224,7 +224,7 @@ local var = g.dashboard.variable;
224
224
+ tsPanel.queryOptions.withTargets([
225
225
prometheus.new(
226
226
'${datasource}',
227
-
'avg by (namespace) (rate(container_network_transmit_bytes_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]))' % $._config
227
+
'avg by (namespace) (rate(container_network_transmit_bytes_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]) * on (%(clusterLabel)s,namespace,pod) kube_pod_info{host_network="false"})' % $._config
228
228
)
229
229
+ prometheus.withLegendFormat('__auto'),
230
230
]),
@@ -234,7 +234,7 @@ local var = g.dashboard.variable;
234
234
+ tsPanel.queryOptions.withTargets([
235
235
prometheus.new(
236
236
'${datasource}',
237
-
'sum by (namespace) (rate(container_network_receive_bytes_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]))' % $._config
237
+
'sum by (namespace) (rate(container_network_receive_bytes_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]) * on (%(clusterLabel)s,namespace,pod) kube_pod_info{host_network="false"})' % $._config
238
238
)
239
239
+ prometheus.withLegendFormat('__auto'),
240
240
]),
@@ -244,50 +244,50 @@ local var = g.dashboard.variable;
244
244
+ tsPanel.queryOptions.withTargets([
245
245
prometheus.new(
246
246
'${datasource}',
247
-
'sum by (namespace) (rate(container_network_transmit_bytes_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]))' % $._config
247
+
'sum by (namespace) (rate(container_network_transmit_bytes_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]) * on (%(clusterLabel)s,namespace,pod) kube_pod_info{host_network="false"})' % $._config
248
248
)
249
249
+ prometheus.withLegendFormat('__auto'),
250
250
]),
251
251
252
252
tsPanel.new('Rate of Received Packets')
253
253
+ tsPanel.standardOptions.withUnit('pps')
254
254
+ tsPanel.queryOptions.withTargets([
255
-
prometheus.new('${datasource}', 'sum by (namespace) (rate(container_network_receive_packets_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]))' % $._config)
255
+
prometheus.new('${datasource}', 'sum by (namespace) (rate(container_network_receive_packets_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]) * on (%(clusterLabel)s,namespace,pod) kube_pod_info{host_network="false"})' % $._config)
256
256
+ prometheus.withLegendFormat('__auto'),
257
257
]),
258
258
259
259
tsPanel.new('Rate of Transmitted Packets')
260
260
+ tsPanel.standardOptions.withUnit('pps')
261
261
+ tsPanel.queryOptions.withTargets([
262
-
prometheus.new('${datasource}', 'sum by (namespace) (rate(container_network_transmit_packets_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]))' % $._config)
262
+
prometheus.new('${datasource}', 'sum by (namespace) (rate(container_network_transmit_packets_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]) * on (%(clusterLabel)s,namespace,pod) kube_pod_info{host_network="false"})' % $._config)
263
263
+ prometheus.withLegendFormat('__auto'),
264
264
]),
265
265
266
266
tsPanel.new('Rate of Received Packets Dropped')
267
267
+ tsPanel.standardOptions.withUnit('pps')
268
268
+ tsPanel.queryOptions.withTargets([
269
-
prometheus.new('${datasource}', 'sum by (namespace) (rate(container_network_receive_packets_dropped_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]))' % $._config)
269
+
prometheus.new('${datasource}', 'sum by (namespace) (rate(container_network_receive_packets_dropped_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]) * on (%(clusterLabel)s,namespace,pod) kube_pod_info{host_network="false"})' % $._config)
270
270
+ prometheus.withLegendFormat('__auto'),
271
271
]),
272
272
273
273
tsPanel.new('Rate of Transmitted Packets Dropped')
274
274
+ tsPanel.standardOptions.withUnit('pps')
275
275
+ tsPanel.queryOptions.withTargets([
276
-
prometheus.new('${datasource}', 'sum by (namespace) (rate(container_network_transmit_packets_dropped_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]))' % $._config)
276
+
prometheus.new('${datasource}', 'sum by (namespace) (rate(container_network_transmit_packets_dropped_total{%(clusterLabel)s="$cluster",namespace!=""}[%(grafanaIntervalVar)s]) * on (%(clusterLabel)s,namespace,pod) kube_pod_info{host_network="false"})' % $._config)
277
277
+ prometheus.withLegendFormat('__auto'),
278
278
]),
279
279
280
280
tsPanel.new('Rate of TCP Retransmits out of all sent segments')
281
281
+ tsPanel.standardOptions.withUnit('percentunit')
282
282
+ tsPanel.queryOptions.withTargets([
283
-
prometheus.new('${datasource}', 'sum by (instance) (rate(node_netstat_Tcp_RetransSegs{%(clusterLabel)s="$cluster"}[%(grafanaIntervalVar)s]) / rate(node_netstat_Tcp_OutSegs{%(clusterLabel)s="$cluster"}[%(grafanaIntervalVar)s]))' % $._config)
283
+
prometheus.new('${datasource}', 'sum by (instance) (rate(node_netstat_Tcp_RetransSegs{%(clusterLabel)s="$cluster"}[%(grafanaIntervalVar)s]) / rate(node_netstat_Tcp_OutSegs{%(clusterLabel)s="$cluster"}[%(grafanaIntervalVar)s]) * on (%(clusterLabel)s,namespace,pod) kube_pod_info{host_network="false"})' % $._config)
284
284
+ prometheus.withLegendFormat('__auto'),
285
285
]),
286
286
287
287
tsPanel.new('Rate of TCP SYN Retransmits out of all retransmits')
288
288
+ tsPanel.standardOptions.withUnit('percentunit')
289
289
+ tsPanel.queryOptions.withTargets([
290
-
prometheus.new('${datasource}', 'sum by (instance) (rate(node_netstat_TcpExt_TCPSynRetrans{%(clusterLabel)s="$cluster"}[%(grafanaIntervalVar)s]) / rate(node_netstat_Tcp_RetransSegs{%(clusterLabel)s="$cluster"}[%(grafanaIntervalVar)s]))' % $._config)
290
+
prometheus.new('${datasource}', 'sum by (instance) (rate(node_netstat_TcpExt_TCPSynRetrans{%(clusterLabel)s="$cluster"}[%(grafanaIntervalVar)s]) / rate(node_netstat_Tcp_RetransSegs{%(clusterLabel)s="$cluster"}[%(grafanaIntervalVar)s]) * on (%(clusterLabel)s,namespace,pod) kube_pod_info{host_network="false"})' % $._config)
0 commit comments