New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
apt info should report cache age #180
Comments
@julian-klode what would be the canonical way to check when thanks, and sorry for the ping if that's inappropriate... |
We use the `pkgcache.bin` modification time as a heuristic, but there might be a better way to do this. We also silently ignore errors when pulling that file to avoid broken systems from breaking the other metrics. I believe this will lead to a null metric which is probably what we want anyway. A possible improvement to this would be to individually inspect the `InRelease` files and report the mirror's timestamps as well, but that's more involved. It's also not a priority compared to this fix, because we want the update timestamp if we remove the `apt update` run (in prometheus-community#181). Closes: prometheus-community#180 Signed-off-by: Antoine Beaupré <anarcat@debian.org>
i picked only |
|
yeah, in #181 i actually document how that works too, or at least an example of it. |
We use the `pkgcache.bin` modification time as a heuristic, but there might be a better way to do this. We also silently ignore errors when pulling that file to avoid broken systems from breaking the other metrics. I believe this will lead to a null metric which is probably what we want anyway. A possible improvement to this would be to individually inspect the `InRelease` files and report the mirror's timestamps as well, but that's more involved. It's also not a priority compared to this fix, because we want the update timestamp if we remove the `apt update` run (in prometheus-community#181). Closes: prometheus-community#180 Signed-off-by: Antoine Beaupré <anarcat@debian.org> Co-authored-by: Ben Kochie <superq@gmail.com>
We cannot alert on stale apt caches. Combined with #179, we can quickly end up in a situation where critical security upgrades are delayed or never installed.
We should have a timestamp metric showing when the last apt update was ran. Optionnally, we could have that metric per mirror as well.
The text was updated successfully, but these errors were encountered: