monitoring.py/monitors/user.py

10 lines
208 B
Python
Raw Normal View History

2019-12-30 15:18:42 +00:00
import psutil
class User:
interval = 10;
loopCount = 0
def __init__(self, exporter):
self.exporter = exporter
def run(self):
self.exporter.gauge("users", len(psutil.users()))