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.15min", load15)