mirror of
https://github.com/kemko/keenetic-grafana-monitoring.git
synced 2026-01-01 15:45:43 +03:00
Refactor code
This commit is contained in:
committed by
Vitaliy Skrypnyk
parent
9435104f14
commit
4ef76e8792
@@ -4,7 +4,6 @@ import logging
|
||||
import os
|
||||
import time
|
||||
from typing import Dict, List
|
||||
from influxdb_client.client.write.point import Point
|
||||
|
||||
from jsonpath_rw import parse
|
||||
|
||||
@@ -81,12 +80,12 @@ class KeeneticCollector(object):
|
||||
|
||||
@staticmethod
|
||||
def create_metric(measurement, tags, values):
|
||||
return Point.from_dict({
|
||||
return {
|
||||
"measurement": measurement,
|
||||
"tags": tags,
|
||||
"time": time.time_ns(),
|
||||
"fields": values
|
||||
})
|
||||
}
|
||||
|
||||
@staticmethod
|
||||
def get_first_value(array):
|
||||
|
||||
Reference in New Issue
Block a user