Exposes metrics for Artifactory from its REST API to Prometheus endpoint.
This project is heavily inspired by https://github.com/m4h/prometheus.
This exporter needs following environment variables to run correctly:
ARTIFACTORY_URL
- URL of Artifactory instance e.g.https://acme.jfrog.io/acme
.ARTIFACTORY_USER
- Artifactory user.ARTIFACTORY_PASSWORD
- Artifactory password.
APP_PORT
- the port on which exporter listens, defaults ot 9600.APP_INTERVAL
- interval in seconds for getting metrics from Artifactory REST API.APP_LOG_LEVEL
- log level.
Run from Docker Hub:
docker run -p 9600:9600 -e ARTIFACTORY_URL=http://artifactory -e ARTIFACTORY_USER=admin -e ARTIFACTORY_PASSWORD=admin petrjurasek/artifactory-prometheus-exporter
Build and run docker image:
docker build -t <image-name> .
docker run -p 9600:9600 -e ARTIFACTORY_URL=http://artifactory -e ARTIFACTORY_USER=admin -e ARTIFACTORY_PASSWORD=admin <image-name>
Metrics are then available on listening port and examples can be found in METRICS page.
- python 3.5 is required.
- pipenv to be installed (
pip install pipenv
). - run
pipenv shell
to switch to virtual env, then runpipenv install
.
Install dev dependcies pipenv install --dev
and run yapf
formatter - yapf -r . --in-place
.