mirror of
https://github.com/kemko/keenetic-grafana-monitoring.git
synced 2026-01-01 15:45:43 +03:00
Add more metrics
This commit is contained in:
committed by
Vitaliy Skrypnyk
parent
9f0a28896b
commit
2fcb3b1ce8
@@ -37,6 +37,7 @@ class KeeneticCollector(object):
|
||||
|
||||
roots = self._root.find(response)
|
||||
metrics = []
|
||||
start_time = time.time_ns()
|
||||
|
||||
for root in roots:
|
||||
tags = {}
|
||||
@@ -56,7 +57,9 @@ class KeeneticCollector(object):
|
||||
|
||||
metric = self.create_metric(self._command, tags, values)
|
||||
metrics.append(metric)
|
||||
print(json.dumps(metric))
|
||||
|
||||
metrics.append( self.create_metric( "collector", { "command" : self._command }, { "duration" : (time.time_ns() - start_time) } ) )
|
||||
# print(json.dumps(metrics))
|
||||
|
||||
infuxdb_writter.write_metrics(metrics)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user