2019-12-30 17:02:31 +00:00
|
|
|
|
|
|
|
import os
|
|
|
|
import psutil
|
|
|
|
class APT:
|
|
|
|
interval = 60;
|
|
|
|
loopCount = 100
|
|
|
|
def __init__(self, exporter):
|
|
|
|
self.exporter = exporter
|
|
|
|
|
|
|
|
def run(self):
|
|
|
|
stream = os.popen('apt list --upgradable 2>/dev/null | wc -l')
|
|
|
|
output = stream.read()
|
2019-12-30 17:51:57 +00:00
|
|
|
self.exporter.gauge("apt.upgradable", int(output) - 1)
|