prometheus-community / node-exporter-textfile-collector-scripts

Scripts for node-exporter's textfile collector
Apache License 2.0
512 stars 191 forks source link

apt_info.py - pending_upgrades always empty #193

Closed RomainMou closed 6 months ago

RomainMou commented 11 months ago

Hi,

Since https://github.com/prometheus-community/node-exporter-textfile-collector-scripts/pull/181/, the script apt_info.py never returns any apt_upgrades_pending. Instead, all the packages are counted in the apt_upgrades_held.

I think this is because the cache.upgrade(True) call marks the packages that could be upgraded, and without it, no package has the marked_upgrade boolean set to true.