Skip to content

Commit cec137f

Browse files
author
jintao.chen
committed
[BugFix: ZSTACK-33873] ingore arm/mips cd-ram monitoring data
1 parent 671229a commit cec137f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

kvmagent/kvmagent/plugins/prometheus.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ def start_prometheus_exporter(self, req):
345345
@in_bash
346346
def start_collectd(cmd):
347347
conf_path = os.path.join(os.path.dirname(cmd.binaryPath), 'collectd.conf')
348+
ingore_block_device = "/:sd[c-e]/" if kvmagent.os_arch in ["mips64el", "aarch64"] else "//"
348349

349350
conf = '''Interval {{INTERVAL}}
350351
# version {{VERSION}}
@@ -410,6 +411,7 @@ def start_collectd(cmd):
410411
HostnameFormat name
411412
PluginInstanceFormat name
412413
BlockDevice "/:hd[a-z]/"
414+
BlockDevice "{{IGNORE}}"
413415
IgnoreSelected true
414416
ExtraStats "vcpu memory"
415417
</Plugin>
@@ -425,6 +427,7 @@ def start_collectd(cmd):
425427
'INTERVAL': cmd.interval,
426428
'INTERFACES': interfaces,
427429
'VERSION': cmd.version,
430+
'IGNORE': ingore_block_device
428431
})
429432

430433
need_restart_collectd = False

0 commit comments

Comments
 (0)