No description
Kumi
139a036dad
Return False instead of 0 when fetching registered users fails, and skip updating the gauge if an error occurs. Improves error handling, avoiding misleading user count updates. |
||
---|---|---|
.gitignore | ||
config.dist.yaml | ||
LICENSE | ||
prometheus_piped.py | ||
README.md | ||
requirements.txt |
Prometheus Exporter for Piped instances
This is a simple exporter for Prometheus that gets statistics from Piped instances. Currently, it only supports getting the number of registered users.
Prerequisites
- Python >= 3.8
- prometheus-client, pyyaml (pip install -r requirements.txt)
Configuration
The exporter is configured using config.yaml. The provided config.dist.yaml is a template for the configuration file.
To add a new instance, simply add its API URL to the piped
list.
Usage
To run the exporter, simply execute the prometheus_piped.py script. The exporter will listen on port 8098.
A sample output of the exporter looks like this:
# HELP registered_users Number of registered users
# TYPE registered_users gauge
registered_users{domain="api.piped.private.coffee"} 54.0
License
This project is licensed under the MIT License - see the LICENSE file.