Metadata-Version: 2.4
Name: apk_exporter
Version: 0.2.0
Summary: Prometheus exporter for apk-tools
Author-email: fossdd <fossdd@pwned.life>
Maintainer-email: fossdd <fossdd@pwned.life>
License: This is free and unencumbered software released into the public domain.
        
        Anyone is free to copy, modify, publish, use, compile, sell, or
        distribute this software, either in source code form or as a compiled
        binary, for any purpose, commercial or non-commercial, and by any
        means.
        
        In jurisdictions that recognize copyright laws, the author or authors
        of this software dedicate any and all copyright interest in the
        software to the public domain. We make this dedication for the benefit
        of the public at large and to the detriment of our heirs and
        successors. We intend this dedication to be an overt act of
        relinquishment in perpetuity of all present and future rights to this
        software under copyright law.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
        EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
        MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
        IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
        OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
        ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
        OTHER DEALINGS IN THE SOFTWARE.
        
        For more information, please refer to <http://unlicense.org/>
        
Project-URL: Repository, https://codeberg.org/fossdd/apk-exporter
Project-URL: Issues, https://codeberg.org/fossdd/apk-exporter/issues
Project-URL: Changelog, https://codeberg.org/fossdd/apk-exporter/releases
Classifier: Development Status :: 3 - Alpha
Classifier: Topic :: System :: Monitoring
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: The Unlicense (Unlicense)
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: prometheus_client

# `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"
```
