-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apt_info.py: use docstring for module documentation (#211)
Signed-off-by: Frank Sachsenheim <[email protected]>
- Loading branch information
1 parent
1cb6223
commit 4ed063f
Showing
1 changed file
with
22 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,26 @@ | ||
#!/usr/bin/env python3 | ||
# | ||
# Description: Expose metrics from apt. This is inspired by and | ||
# intended to be a replacement for the original apt.sh. | ||
# | ||
# This script deliberately does *not* update the apt cache. You need | ||
# something else to run `apt update` regularly for the metrics to be | ||
# up to date. This can be done in numerous ways, but the canonical way | ||
# is to use the normal `APT::Periodic::Update-Package-Lists` | ||
# setting. | ||
# | ||
# This, for example, will enable a nightly job that runs `apt update`: | ||
# | ||
# echo 'APT::Periodic::Update-Package-Lists "1";' > /etc/apt/apt.conf.d/99_auto_apt_update.conf | ||
# | ||
# See /usr/lib/apt/apt.systemd.daily for details. | ||
# | ||
# Dependencies: python3-apt, python3-prometheus-client | ||
# | ||
# Authors: Kyle Fazzari <[email protected]> | ||
# Daniel Swarbrick <[email protected]> | ||
|
||
""" | ||
Description: Expose metrics from apt. This is inspired by and | ||
intended to be a replacement for the original apt.sh. | ||
This script deliberately does *not* update the apt cache. You need | ||
something else to run `apt update` regularly for the metrics to be | ||
up to date. This can be done in numerous ways, but the canonical way | ||
is to use the normal `APT::Periodic::Update-Package-Lists` | ||
setting. | ||
This, for example, will enable a nightly job that runs `apt update`: | ||
echo 'APT::Periodic::Update-Package-Lists "1";' > /etc/apt/apt.conf.d/99_auto_apt_update.conf | ||
See /usr/lib/apt/apt.systemd.daily for details. | ||
Dependencies: python3-apt, python3-prometheus-client | ||
Authors: Kyle Fazzari <[email protected]> | ||
Daniel Swarbrick <[email protected]> | ||
""" | ||
|
||
import apt | ||
import apt_pkg | ||
|