https://github.com/yaacov/demo-exporter
Demo Prometheus exporter
https://github.com/yaacov/demo-exporter
demo prometheus prometheus-exporter
Last synced: 7 months ago
JSON representation
Demo Prometheus exporter
- Host: GitHub
- URL: https://github.com/yaacov/demo-exporter
- Owner: yaacov
- License: apache-2.0
- Created: 2018-02-18T07:48:41.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-27T15:33:20.000Z (over 7 years ago)
- Last Synced: 2025-01-23T10:11:24.890Z (9 months ago)
- Topics: demo, prometheus, prometheus-exporter
- Language: Python
- Size: 68.4 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
Demo Exporter
=============Demo Prometheus exporter, simulates a Prometheus exporter with command line arguments, config file and secrets. The `openshift-templates `_ direcotry includes templates and instructions
for deployinng the exporter in an openshift cluster.Running
=======
``./demo-exporter/app.py --config openshift-templates/config.yml````curl http://localhost:8080/metrics``
Options
=======::
./demo-exporter/app.py --help
usage: app.py [-h] [--config CONFIG] [--port PORT] [--scraper SCRAPER]Prometheus Exporter.
optional arguments:
-h, --help show this help message and exit
--config CONFIG config file
--port PORT server port
--scraper SCRAPER scraper backend [demo or aws]Running as a Container
======================::
docker build -t yaacov/demo-exporter .
docker tag yaacov/demo-exporter docker.io/yaacov/demo-exporter:latest
docker push docker.io/yaacov/demo-exporter::
docker run -it --rm --name demo-exporter \
-e EXPORTER_BACKEND=demo \
-v $(readlink -f ~/.aws):/root/.aws:Z \
-v $(readlink -f ./openshift-templates):/config:Z \
yaacov/demo-exporterGetting the container ip:
::
docker inspect demo-exporter | grep IPAddress\" | head -n1 | egrep -o '[0-9.]+'