Commit c3c52c3c by Bach Dániel

vm: rename node.cpu.percent

parent 753691c4
...@@ -259,7 +259,7 @@ class Node(OperatedMixin, TimeStampedModel): ...@@ -259,7 +259,7 @@ class Node(OperatedMixin, TimeStampedModel):
@node_available @node_available
@method_cache(10) @method_cache(10)
def monitor_info(self): def monitor_info(self):
metrics = ('cpu.usage', 'memory.usage') metrics = ('cpu.percent', 'memory.usage')
prefix = 'circle.%s.' % self.host.hostname prefix = 'circle.%s.' % self.host.hostname
params = [('target', '%s%s' % (prefix, metric)) params = [('target', '%s%s' % (prefix, metric))
for metric in metrics] for metric in metrics]
...@@ -295,7 +295,7 @@ class Node(OperatedMixin, TimeStampedModel): ...@@ -295,7 +295,7 @@ class Node(OperatedMixin, TimeStampedModel):
@property @property
@node_available @node_available
def cpu_usage(self): def cpu_usage(self):
return self.monitor_info.get('cpu.usage') / 100 return self.monitor_info.get('cpu.percent') / 100
@property @property
@node_available @node_available
......
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