monitoring.py/monitors/load.py

13 lines
339 B
Python
Raw Normal View History

2019-12-30 15:18:42 +00:00
import os
class Load:
interval = 10;
loopCount = 0
def __init__(self, exporter):
self.exporter = exporter
def run(self):
load1, load5, load15 = os.getloadavg()
self.exporter.gauge("load.1min", load1)
self.exporter.gauge("load.5min", load5)
2019-12-30 15:37:48 +00:00
self.exporter.gauge("load.15min", load15)