Version bump for influx based backend
This commit is contained in:
parent
fcd36d8b40
commit
50d6a0a6ad
|
@ -1,8 +1,9 @@
|
||||||
__version__ = "0.3.0"
|
__version__ = "0.4.0"
|
||||||
from itertools import chain
|
from itertools import chain
|
||||||
import logging
|
import logging
|
||||||
from pymonitor.builtins import sysinfo
|
from pymonitor.builtins import sysinfo
|
||||||
|
|
||||||
|
|
||||||
class Backend(object):
|
class Backend(object):
|
||||||
"""
|
"""
|
||||||
Base class for data storage backends
|
Base class for data storage backends
|
||||||
|
@ -27,7 +28,6 @@ class Backend(object):
|
||||||
"""
|
"""
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
|
|
||||||
def add_data(self, metric):
|
def add_data(self, metric):
|
||||||
"""
|
"""
|
||||||
Accept a Metric() object and send it off to the backend
|
Accept a Metric() object and send it off to the backend
|
||||||
|
@ -47,16 +47,6 @@ class Metric(object):
|
||||||
self.values = values
|
self.values = values
|
||||||
self.tags = tags or {}
|
self.tags = tags or {}
|
||||||
|
|
||||||
# def as_dict(self):
|
|
||||||
# """
|
|
||||||
# Represent the metric as a basic dictionary. Tags are added
|
|
||||||
# """
|
|
||||||
# # TODO return the classic elasticsearch format
|
|
||||||
|
|
||||||
# import pdb
|
|
||||||
# pdb.set_trace()
|
|
||||||
# pass
|
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
fields = []
|
fields = []
|
||||||
for k, v in chain(self.values.items(), self.tags.items()):
|
for k, v in chain(self.values.items(), self.tags.items()):
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
certifi==2018.8.13
|
certifi==2018.8.24
|
||||||
chardet==3.0.4
|
chardet==3.0.4
|
||||||
elasticsearch==6.3.1
|
elasticsearch==6.3.1
|
||||||
idna==2.7
|
idna==2.7
|
||||||
|
|
Loading…
Reference in New Issue