Prometheus exporter for apk-tools
Find a file
fossdd ab9c175923
Some checks failed
/ pre-commit (push) Has been cancelled
/ run (push) Has been cancelled
/ install (push) Has been cancelled
Release 0.2.0
2025-06-16 19:34:30 +02:00
.forgejo/workflows CI: Run local runners again 2025-01-12 00:48:49 +01:00
.pre-commit-config.yaml Ignore import errors on pre-commit pylint hook 2024-09-10 15:11:27 +02:00
apk_exporter.py Rename apk_detailed_package_upgrades to apk_individual_upgradable_packages 2025-06-16 19:33:44 +02:00
pyproject.toml Release 0.2.0 2025-06-16 19:34:30 +02:00
README.md Add metadata 2024-09-10 13:52:41 +02:00
UNLICENSE Rename to UNLICENSE 2024-09-10 13:58:05 +02:00

apk-exporter

apk-exporter is a Prometheus exporter for monitoring apk-tools. It provides metrics like installed, upgradable, and orphaned packages, which can be exported to a Prometheus Pushgateway or written to a text file to be parsed by node-exporter.

Requirements

  • Python 3.8 or higher
  • prometheus_client python library
  • apk package manager

Usage

Run apk_exporter.py regulary (for example every hour).

Use --textfile to export as a text file, or use --pushgateway to push to a gateway. See --help for all options.

Import text file to node-exporter

Add the destination folder (/tmp by default) as the node_exporter arguments, like this: --collector.textfile.directory /tmp.

If you're using a node-exporter OpenRC service, you can add the arguments to /etc/conf.d/node-exporter:

ARGS="--collector.textfile.directory /tmp"