Skip to content
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

updated apt hooks #16

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions docs/00-pve-exporter

This file was deleted.

9 changes: 9 additions & 0 deletions docs/90-pkg-exporter
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Apt hooks recommended for pkg-exporter

# These hooks create files pre and post update, to compare the time difference inside the script
APT::Update::Pre-Invoke {"touch /tmp/pkg-exporter-apt-update-pre"; };
APT::Update::Post-Invoke {"touch /tmp/pkg-exporter-apt-update-post"; };

# These hooks ensure the metrics are automatically updated when apt is run
APT::Update::Post-Invoke-Success {"/usr/local/bin/pkg-exporter"};
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Until we provide a debian package, also those shall be a commented suggestion, as we do not yet have a single way of installation.
In my optionion starting a systemd unit (if present) would be better than calling the binary directly, however that needs some work on the systemd side.

DPkg::Post-Invoke {"/usr/local/bin/pkg-exporter"};