Commit 0a10962e by Bach Dániel

random fixes

parent 14997630
...@@ -198,9 +198,9 @@ class Client: ...@@ -198,9 +198,9 @@ class Client:
)) ))
interfaces_list = psutil.network_io_counters( interfaces_list = psutil.network_io_counters(
pernic=True) pernic=True)
interfaces_list_enum = enumerate(interfaces_list)
if ((self.beat % self.kvmNet) is 0) and vm_proc.is_running(): if ((self.beat % self.kvmNet) is 0) and vm_proc.is_running():
for vm in running_vms: for vm in running_vms:
interfaces_list_enum = enumerate(interfaces_list)
for iname_index, iname in interfaces_list_enum: for iname_index, iname in interfaces_list_enum:
if vm[0] in iname: if vm[0] in iname:
metrics.append(("vm." + metrics.append(("vm." +
...@@ -225,10 +225,10 @@ class Client: ...@@ -225,10 +225,10 @@ class Client:
+ " %d" % (time.time()) + " %d" % (time.time())
)) ))
metrics.append(("vm." + metrics.append(("vm." +
vm[0] + vm[0] + "." + "network"
+ "network.bytes_recv" + ".bytes_recv" +
" %d" % " %d" % interfaces_list[
(interfaces_list[iname].bytes_recv) iname].bytes_recv
+ " %d" % (time.time()) + " %d" % (time.time())
)) ))
return metrics return metrics
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment