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

11 lines
280 B
Python

import os
class Processes:
interval = 10;
loopCount = 0
def __init__(self, exporter):
self.exporter = exporter
def run(self):
stream = os.popen('ps fax | wc -l')
output = stream.read()
self.exporter.gauge("processes", int(output))