obsolete packages: move collector command first authored by lelutin's avatar lelutin
This section is a playbook so it's mean to be used when there's an alert
firing. So in that context, we're better off testing things that get a
result closer to what the alert is telling us.

The other commands are still very useful but they might catch details
that the alert is not considering.
......@@ -199,16 +199,16 @@ might be:
* apt source got removed but not packages installed from it
* patched package was installed locally
If you want to know which packages are marked as obsolete, you can use the
following two commands:
If you want to know which packages are marked as obsolete and is triggering the
alert, you can call the command that exports the metrics for the `apt_info`
collector to get more information:
apt list "?obsolete"
apt list "?narrow(?installed, ?not(?codename($(lsb_release -c -s | tail -1))))"
DEBUG=1 /usr/share/prometheus-node-exporter-collectors/apt_info.py >/dev/null
The authoritative source for the alert, however, is the `apt_info`
collector, which might differ from the above:
You can also use the following two commands to get more details on packages:
DEBUG=1 /usr/share/prometheus-node-exporter-collectors/apt_info.py >/dev/null
apt list "?obsolete"
apt list "?narrow(?installed, ?not(?codename($(lsb_release -c -s | tail -1))))"
Check the state of each package with `apt policy $package` to determine what
needs to be done with it. If most cases, the packages can just be purged, but
......
......