Merge ~dparv/charm-prometheus-libvirt-exporter:fix_instance_names into charm-prometheus-libvirt-exporter:master

Proposed by Diko Parvanov
Status: Merged
Approved by: Diko Parvanov
Approved revision: 5eca786bbc86b600bfb86ba8d808251c23654f7d
Merged at revision: eab1cd617a2cc9f9c79768a8bb8e1b420f1b6d7d
Proposed branch: ~dparv/charm-prometheus-libvirt-exporter:fix_instance_names
Merge into: charm-prometheus-libvirt-exporter:master
Diff against target: 228 lines (+40/-40)
1 file modified
src/files/grafana-dashboards/libvirt.json (+40/-40)
Reviewer Review Type Date Requested Status
Ramesh Sattaru (community) Approve
Erhan Sunar (community) Approve
🤖 prod-jenkaas-bootstack continuous-integration Approve
Review via email: mp+434320@code.launchpad.net

Commit message

Changed {{dns_name}} to {{domain}} in dashboard

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Diko Parvanov (dparv) wrote :

Reason behind this change is that prometheus-libvirt-exporter does show the domain as instance and there is no dns_name in the exported data. This is breaking the Grafana templates for the customers and they cant see actual virsh instance data in the dashboard.

ref: https://github.com/zhangjianweibj/prometheus-libvirt-exporter/blob/master/prometheus-libvirt-exporter.go

Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Approve (continuous-integration)
Revision history for this message
Erhan Sunar (esunar) :
review: Approve
Revision history for this message
Ramesh Sattaru (rameshcan) :
review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision eab1cd617a2cc9f9c79768a8bb8e1b420f1b6d7d

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/files/grafana-dashboards/libvirt.json b/src/files/grafana-dashboards/libvirt.json
2index a4b4a19..2c6cc4f 100644
3--- a/src/files/grafana-dashboards/libvirt.json
4+++ b/src/files/grafana-dashboards/libvirt.json
5@@ -180,7 +180,7 @@
6 {
7 "expr": "libvirt_domain_info_virtual_cpus{dns_name=~\"$host\"}",
8 "interval": "",
9- "legendFormat": "{{dns_name}}: {{name}}",
10+ "legendFormat": "{{domain}}: {{name}}",
11 "refId": "A"
12 }
13 ],
14@@ -254,9 +254,9 @@
15 "steppedLine": false,
16 "targets": [
17 {
18- "expr": "sum without(domain,flavor,group,instance,job,name,project_name,uuid)(libvirt_domain_info_virtual_cpus{dns_name=~\"$host\"})",
19+ "expr": "sum without(flavor,group,instance,job,name,project_name,uuid)(libvirt_domain_info_virtual_cpus{dns_name=~\"$host\"})",
20 "interval": "",
21- "legendFormat": "{{dns_name}}",
22+ "legendFormat": "{{domain}}",
23 "refId": "A"
24 }
25 ],
26@@ -355,7 +355,7 @@
27 {
28 "expr": "rate(libvirt_domain_info_cpu_time_seconds_total{dns_name=~\"$host\"}[1m])",
29 "interval": "",
30- "legendFormat": "{{dns_name}}: {{name}}",
31+ "legendFormat": "{{domain}}: {{name}}",
32 "refId": "A"
33 }
34 ],
35@@ -466,9 +466,9 @@
36 "steppedLine": false,
37 "targets": [
38 {
39- "expr": "sum without(domain,flavor,group,instance,job,name,project_name,uuid)(libvirt_domain_info_memory_usage_bytes{dns_name=~\"$host\"})",
40+ "expr": "sum without(flavor,group,instance,job,name,project_name,uuid)(libvirt_domain_info_memory_usage_bytes{dns_name=~\"$host\"})",
41 "interval": "",
42- "legendFormat": "{{dns_name}}",
43+ "legendFormat": "{{domain}}",
44 "refId": "A"
45 }
46 ],
47@@ -567,7 +567,7 @@
48 {
49 "expr": "libvirt_domain_info_memory_usage_bytes{dns_name=~\"$host\"}",
50 "interval": "",
51- "legendFormat": "{{dns_name}}: {{name}}",
52+ "legendFormat": "{{domain}}: {{name}}",
53 "refId": "A"
54 }
55 ],
56@@ -663,7 +663,7 @@
57 "format": "time_series",
58 "instant": true,
59 "interval": "",
60- "legendFormat": "{{dns_name}}: {{name}}",
61+ "legendFormat": "{{domain}}: {{name}}",
62 "refId": "A"
63 }
64 ],
65@@ -736,15 +736,15 @@
66 "steppedLine": false,
67 "targets": [
68 {
69- "expr": "sum without(domain,flavor,group,instance,job,project_name,source_bridge,uuid,target_device)(rate(libvirt_domain_interface_stats_receive_bytes_total{dns_name=~\"$host\"}[1m]))",
70+ "expr": "sum without(flavor,group,instance,job,project_name,source_bridge,uuid,target_device)(rate(libvirt_domain_interface_stats_receive_bytes_total{dns_name=~\"$host\"}[1m]))",
71 "interval": "",
72- "legendFormat": "rx: {{dns_name}}: {{name}}",
73+ "legendFormat": "rx: {{domain}}: {{name}}",
74 "refId": "A"
75 },
76 {
77- "expr": "sum without(domain,flavor,group,instance,job,project_name,source_bridge,uuid,target_device)(rate(libvirt_domain_interface_stats_transmit_bytes_total{dns_name=~\"$host\"}[1m]))",
78+ "expr": "sum without(flavor,group,instance,job,project_name,source_bridge,uuid,target_device)(rate(libvirt_domain_interface_stats_transmit_bytes_total{dns_name=~\"$host\"}[1m]))",
79 "interval": "",
80- "legendFormat": "tx: {{dns_name}}: {{name}}",
81+ "legendFormat": "tx: {{domain}}: {{name}}",
82 "refId": "B"
83 }
84 ],
85@@ -841,15 +841,15 @@
86 "steppedLine": false,
87 "targets": [
88 {
89- "expr": "sum without(domain,flavor,group,instance,job,project_name,source_bridge,uuid,target_device)(rate(libvirt_domain_interface_stats_receive_packets_total{dns_name=~\"$host\"}[1m]))",
90+ "expr": "sum without(flavor,group,instance,job,project_name,source_bridge,uuid,target_device)(rate(libvirt_domain_interface_stats_receive_packets_total{dns_name=~\"$host\"}[1m]))",
91 "interval": "",
92- "legendFormat": "rx: {{dns_name}}: {{name}}",
93+ "legendFormat": "rx: {{domain}}: {{name}}",
94 "refId": "A"
95 },
96 {
97- "expr": "sum without(domain,flavor,group,instance,job,project_name,source_bridge,uuid,target_device)(rate(libvirt_domain_interface_stats_transmit_packets_total{dns_name=~\"$host\"}[1m]))",
98+ "expr": "sum without(flavor,group,instance,job,project_name,source_bridge,uuid,target_device)(rate(libvirt_domain_interface_stats_transmit_packets_total{dns_name=~\"$host\"}[1m]))",
99 "interval": "",
100- "legendFormat": "tx: {{dns_name}}: {{name}}",
101+ "legendFormat": "tx: {{domain}}: {{name}}",
102 "refId": "B"
103 }
104 ],
105@@ -945,15 +945,15 @@
106 "steppedLine": false,
107 "targets": [
108 {
109- "expr": "sum without(domain,flavor,group,instance,job,project_name,source_bridge,uuid,target_device, domain)(rate(libvirt_domain_interface_stats_receive_bytes_total{dns_name=~\"$host\"}[1m]))",
110+ "expr": "sum without(flavor,group,instance,job,project_name,source_bridge,uuid,target_device, domain)(rate(libvirt_domain_interface_stats_receive_bytes_total{dns_name=~\"$host\"}[1m]))",
111 "interval": "",
112- "legendFormat": "rx: {{dns_name}}",
113+ "legendFormat": "rx: {{domain}}",
114 "refId": "A"
115 },
116 {
117- "expr": "sum without(domain,flavor,group,instance,job,project_name,source_bridge,uuid,target_device)(rate(libvirt_domain_interface_stats_transmit_bytes_total{dns_name=~\"$host\"}[1m]))",
118+ "expr": "sum without(flavor,group,instance,job,project_name,source_bridge,uuid,target_device)(rate(libvirt_domain_interface_stats_transmit_bytes_total{dns_name=~\"$host\"}[1m]))",
119 "interval": "",
120- "legendFormat": "tx: {{dns_name}}",
121+ "legendFormat": "tx: {{domain}}",
122 "refId": "B"
123 }
124 ],
125@@ -1050,15 +1050,15 @@
126 "steppedLine": false,
127 "targets": [
128 {
129- "expr": "sum without(domain,flavor,group,instance,job,project_name,source_bridge,uuid,target_device,domain)(rate(libvirt_domain_interface_stats_receive_packets_total{dns_name=~\"$host\"}[1m]))",
130+ "expr": "sum without(flavor,group,instance,job,project_name,source_bridge,uuid,target_device,domain)(rate(libvirt_domain_interface_stats_receive_packets_total{dns_name=~\"$host\"}[1m]))",
131 "interval": "",
132- "legendFormat": "rx: {{dns_name}}",
133+ "legendFormat": "rx: {{domain}}",
134 "refId": "A"
135 },
136 {
137- "expr": "sum without(domain,flavor,group,instance,job,project_name,source_bridge,uuid,target_device)(rate(libvirt_domain_interface_stats_transmit_packets_total{dns_name=~\"$host\"}[1m]))",
138+ "expr": "sum without(flavor,group,instance,job,project_name,source_bridge,uuid,target_device)(rate(libvirt_domain_interface_stats_transmit_packets_total{dns_name=~\"$host\"}[1m]))",
139 "interval": "",
140- "legendFormat": "tx: {{dns_name}}",
141+ "legendFormat": "tx: {{domain}}",
142 "refId": "B"
143 }
144 ],
145@@ -1154,27 +1154,27 @@
146 "steppedLine": false,
147 "targets": [
148 {
149- "expr": "sum without(domain,flavor,group,instance,job,project_name,source_bridge,uuid,target_device)(rate(libvirt_domain_interface_stats_receive_errors_total{dns_name=~\"$host\"}[1m]))\n",
150+ "expr": "sum without(flavor,group,instance,job,project_name,source_bridge,uuid,target_device)(rate(libvirt_domain_interface_stats_receive_errors_total{dns_name=~\"$host\"}[1m]))\n",
151 "interval": "",
152- "legendFormat": "rx err: {{dns_name}}: {{name}}",
153+ "legendFormat": "rx err: {{domain}}: {{name}}",
154 "refId": "A"
155 },
156 {
157- "expr": "sum without(domain,flavor,group,instance,job,project_name,source_bridge,uuid,target_device)(rate(libvirt_domain_interface_stats_transmit_errors_total{dns_name=~\"$host\"}[1m]))\n",
158+ "expr": "sum without(flavor,group,instance,job,project_name,source_bridge,uuid,target_device)(rate(libvirt_domain_interface_stats_transmit_errors_total{dns_name=~\"$host\"}[1m]))\n",
159 "interval": "",
160- "legendFormat": "tx err: {{dns_name}}: {{name}}",
161+ "legendFormat": "tx err: {{domain}}: {{name}}",
162 "refId": "B"
163 },
164 {
165- "expr": "sum without(domain,flavor,group,instance,job,project_name,source_bridge,uuid,target_device)(rate(libvirt_domain_interface_stats_receive_drops_total{dns_name=~\"$host\"}[1m]))\n",
166+ "expr": "sum without(flavor,group,instance,job,project_name,source_bridge,uuid,target_device)(rate(libvirt_domain_interface_stats_receive_drops_total{dns_name=~\"$host\"}[1m]))\n",
167 "interval": "",
168- "legendFormat": "rx drop: {{dns_name}}: {{name}}",
169+ "legendFormat": "rx drop: {{domain}}: {{name}}",
170 "refId": "C"
171 },
172 {
173- "expr": "sum without(domain,flavor,group,instance,job,project_name,source_bridge,uuid,target_device)(rate(libvirt_domain_interface_stats_transmit_drops_total{dns_name=~\"$host\"}[1m]))\n",
174+ "expr": "sum without(flavor,group,instance,job,project_name,source_bridge,uuid,target_device)(rate(libvirt_domain_interface_stats_transmit_drops_total{dns_name=~\"$host\"}[1m]))\n",
175 "interval": "",
176- "legendFormat": "tx drop: {{dns_name}}: {{name}}",
177+ "legendFormat": "tx drop: {{domain}}: {{name}}",
178 "refId": "D"
179 }
180 ],
181@@ -1284,9 +1284,9 @@
182 "steppedLine": false,
183 "targets": [
184 {
185- "expr": "sum without(domain,flavor,group,instance,job,project_name,source_bridge,uuid,source_file)(rate(libvirt_domain_block_stats_read_requests_total{dns_name=~\"$host\"}[1m]))\n",
186+ "expr": "sum without(flavor,group,instance,job,project_name,source_bridge,uuid,source_file)(rate(libvirt_domain_block_stats_read_requests_total{dns_name=~\"$host\"}[1m]))\n",
187 "interval": "",
188- "legendFormat": "{{dns_name}}: {{name}}, {{target_device}}",
189+ "legendFormat": "{{domain}}: {{name}}, {{target_device}}",
190 "refId": "A"
191 }
192 ],
193@@ -1382,9 +1382,9 @@
194 "steppedLine": false,
195 "targets": [
196 {
197- "expr": "sum without(domain,flavor,group,instance,job,project_name,source_bridge,uuid,source_file)(rate(libvirt_domain_block_stats_write_requests_total{dns_name=~\"$host\"}[1m]))\n",
198+ "expr": "sum without(flavor,group,instance,job,project_name,source_bridge,uuid,source_file)(rate(libvirt_domain_block_stats_write_requests_total{dns_name=~\"$host\"}[1m]))\n",
199 "interval": "",
200- "legendFormat": "{{dns_name}}: {{name}}, {{target_device}}",
201+ "legendFormat": "{{domain}}: {{name}}, {{target_device}}",
202 "refId": "A"
203 }
204 ],
205@@ -1480,9 +1480,9 @@
206 "steppedLine": false,
207 "targets": [
208 {
209- "expr": "sum without(domain,flavor,group,instance,job,project_name,source_bridge,uuid,source_file)(rate(libvirt_domain_block_stats_read_bytes_total{dns_name=~\"$host\"}[1m]))\n",
210+ "expr": "sum without(flavor,group,instance,job,project_name,source_bridge,uuid,source_file)(rate(libvirt_domain_block_stats_read_bytes_total{dns_name=~\"$host\"}[1m]))\n",
211 "interval": "",
212- "legendFormat": "{{dns_name}}: {{name}}, {{target_device}}",
213+ "legendFormat": "{{domain}}: {{name}}, {{target_device}}",
214 "refId": "A"
215 }
216 ],
217@@ -1578,9 +1578,9 @@
218 "steppedLine": false,
219 "targets": [
220 {
221- "expr": "sum without(domain,flavor,group,instance,job,project_name,source_bridge,uuid,source_file)(rate(libvirt_domain_block_stats_write_bytes_total{dns_name=~\"$host\"}[1m]))\n",
222+ "expr": "sum without(flavor,group,instance,job,project_name,source_bridge,uuid,source_file)(rate(libvirt_domain_block_stats_write_bytes_total{dns_name=~\"$host\"}[1m]))\n",
223 "interval": "",
224- "legendFormat": "{{dns_name}}: {{name}}, {{target_device}}",
225+ "legendFormat": "{{domain}}: {{name}}, {{target_device}}",
226 "refId": "A"
227 }
228 ],

Subscribers

People subscribed via source and target branches

to all changes: