Statsd
This commit is contained in:
parent
3e247185e6
commit
4fb32a5c56
2 changed files with 1 additions and 12 deletions
|
@ -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
2
run.py
|
@ -1,6 +1,6 @@
|
||||||
import time
|
import time
|
||||||
from exporter.cli import Cli
|
from exporter.cli import Cli
|
||||||
from exporter.statsd import Statsd
|
from exporter.statsd-exporter import Statsd
|
||||||
from monitors.load import Load
|
from monitors.load import Load
|
||||||
from monitors.hdd import HDD
|
from monitors.hdd import HDD
|
||||||
from monitors.processes import Processes
|
from monitors.processes import Processes
|
||||||
|
|
Loading…
Reference in a new issue