Commit 79ddd6fb by Kálmán Viktor

dashboard: fix node monitor

parent c994d2c1
...@@ -2813,7 +2813,7 @@ class NodeGraphView(SuperuserRequiredMixin, GraphViewBase): ...@@ -2813,7 +2813,7 @@ class NodeGraphView(SuperuserRequiredMixin, GraphViewBase):
model = Node model = Node
def get_prefix(self, instance): def get_prefix(self, instance):
return 'circle.%s' % instance.name return 'circle.%s' % instance.host.hostname
def get_title(self, instance, metric): def get_title(self, instance, metric):
return '%s - %s' % (instance.name, metric) return '%s - %s' % (instance.name, metric)
......
...@@ -257,7 +257,7 @@ class Node(OperatedMixin, TimeStampedModel): ...@@ -257,7 +257,7 @@ class Node(OperatedMixin, TimeStampedModel):
@method_cache(10) @method_cache(10)
def monitor_info(self): def monitor_info(self):
metrics = ('cpu.usage', 'memory.usage') metrics = ('cpu.usage', 'memory.usage')
prefix = 'circle.%s.' % self.name 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]
params.append(('from', '-5min')) params.append(('from', '-5min'))
......
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