11 lines
381 B
Python
11 lines
381 B
Python
import socket
|
|
import statsd
|
|
|
|
class StatsdExporter:
|
|
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)
|