Not for production use. Only for testing and development.
- Prometheus - collecting the metrics
- Grafana - visualisation of the metrics
- node-exporter - provides host und some container metrics
- cAdvisor - provides container metrics
- pushgateway - for things witch can't provide metrics themselves
- prometheus-docker-sd - automated service discovery for prometheus
git clone git@github.com:stuckyhm/prometheus-grafana-stack.git
cd prometheus-grafana-stack
docker network create monitoring_ext
docker-compose up
Add the following labels to your containers.
label | mandatory | default | description |
---|---|---|---|
prometheus-scrape.enabled | yes | Must set to "true" for enabled. | |
prometheus-scrape.job_name | no | Content for the prometheus label "job". | |
prometheus-scrape.hostname | no | Hostname, if it differs from the container name or for access via the public interface. | |
prometheus-scrape.ip_as_hostname | no | false | Use the container ip instead of the container name. |
prometheus-scrape.port | no | 9090 | Port of the metrics endpoint. |
prometheus-scrape.scheme | no | http | Scheme http or https |
prometheus-scrape.metrics_path | no | /metrics | Path to the metrics endpoint. |
Important: The Container has to be in the same network that prometheus. At the moment, the stack is connected to default network docker0 (bridge).
Connect to your Instance: http://127.0.0.1:9091
Push a simple metric:
echo "some_metric 3.14" | curl --data-binary @- http://127.0.0.1:9091/metrics/job/some_job
More Samples at https://github.com/prometheus/pushgateway
Important: The Container has to be in the same network that prometheus. At the moment, the stack is connected to default network docker0 (bridge).
Connect to your Gradana instance: http://127.0.0.1:3000
Default-User/Passwort: admin/password
More Infos: https://github.com/grafana/grafana
Connect to your instance: http://127.0.0.1:9090
More Infos: https://github.com/prometheus/prometheus