monitoring.py/monitors/load.py
2019-12-30 16:18:42 +01:00

12 lines
339 B
Python

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)
self.exporter.gauge("load.11min", load15)