From Yaniv Bronhaim <ybronhei(a)redhat.com>:
Yaniv Bronhaim has uploaded a new change for review.
Change subject: vdsm metrics: replace dots with underscore in entity names
......................................................................
vdsm metrics: replace dots with underscore in entity names
statsd recognize dots as entering to subtree. If a nic name or vol name
include dot in their name, we shell convert it to underscore to avoid
recognize it as sub metric tree
Change-Id: If097f45d9f9d65bd056371234255e91609656ae5
Bug-Url:
https://bugzilla.redhat.com/show_bug.cgi?id=1433734
Signed-off-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
---
M lib/vdsm/host/api.py
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/17/74417/1
diff --git a/lib/vdsm/host/api.py b/lib/vdsm/host/api.py
index d9ee16b..49244bb 100644
--- a/lib/vdsm/host/api.py
+++ b/lib/vdsm/host/api.py
@@ -86,7 +86,7 @@
try:
for dom in hoststats['storageDomains']:
- storage_prefix = prefix + '.storage.' + dom
+ storage_prefix = prefix + '.storage.' + dom.replace('.',
'_')
dom_info = hoststats['storageDomains'][dom]
data[storage_prefix + '.delay'] = dom_info['delay']
data[storage_prefix + '.last_check'] = dom_info['lastCheck']
@@ -122,7 +122,7 @@
if 'network' in hoststats:
for interface in hoststats['network']:
if_info = hoststats['network'][interface]
- net_prefix = prefix + '.nic.' + interface
+ net_prefix = prefix + '.nic.' + interface.replace('.',
'_')
data[net_prefix + '.speed'] = if_info['speed']
data[net_prefix + '.rx_errors'] = if_info['rxErrors']
data[net_prefix + '.tx_errors'] = if_info['txErrors']
--
To view, visit
https://gerrit.ovirt.org/74417
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If097f45d9f9d65bd056371234255e91609656ae5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei(a)redhat.com>