This commit is contained in:
Kekskurse 2019-12-30 18:33:08 +01:00
parent 32a065ed57
commit 99b6c4d5f0

View file

@ -11,6 +11,6 @@ class UFW:
stream = os.popen('ufw status | grep "Status: active" | wc -l') stream = os.popen('ufw status | grep "Status: active" | wc -l')
output = stream.read() output = stream.read()
self.exporter.gauge("ufw.status", int(output)) self.exporter.gauge("ufw.status", int(output))
stream = os.popen('ufw status | grep -E '^[0-9]' | wc -l') stream = os.popen("ufw status | grep -E '^[0-9]' | wc -l")
output = stream.read() output = stream.read()
self.exporter.gauge("ufw.rules", int(output)) self.exporter.gauge("ufw.rules", int(output))