Prometheus metrics are used to monitor components running. For development purposes both Prometheus and Grafana containers are included in docker-compose setup. When adding new metric, ensure it is exposed correctly using dev setup.
After running docker-compose up --build
, you can access Prometheus and Grafana web interfaces:
- Prometheus: http://localhost:9091
- Grafana: http://localhost:3001, login: admin:passwd
- Include new metric into the code (Counter, Gauge, Histogram etc.).
- Visualize metric in dev Grafana board (add new chart).
- Export new board version to json and save to
monitoring/grafana/provisioning/dashboards/vulnerability-dashboard.json
. - When new metric is in production, use dashboard import and copy new json to production Grafana.