This commit is contained in:
Kekskurse 2019-12-30 16:24:22 +01:00
parent 3e247185e6
commit 4fb32a5c56
2 changed files with 1 additions and 12 deletions

View file

@ -1,11 +0,0 @@
import socket
import statsd
class Statsd:
def __init__(self):
self.servername = socket.gethostname()
self.c = statsd.StatsClient('grafana2.keks.cloud', 8125)
def gauge(self, name, value):
self.c.gauge("server."+self.servername+"."+name, value)
def incr(self, name, value):
self.c.incr("server."+self.servername+"."+name, value)

2
run.py
View file

@ -1,6 +1,6 @@
import time
from exporter.cli import Cli
from exporter.statsd import Statsd
from exporter.statsd-exporter import Statsd
from monitors.load import Load
from monitors.hdd import HDD
from monitors.processes import Processes