14 lines
323 B
Python
14 lines
323 B
Python
|
|
||
|
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()
|
||
|
self.exporter.gauge("apt.upgradable", int(output))
|