Even though cAdvisor provides network metrics for each container it can’t easily distinguish container to container traffic from internet traffic, so the Traefik metrics are useful for that. Traefik is what I use for SSL termination and as a reverse proxy for any internet facing services, so it provides Prometheus with network metrics for those services. cAdvisor provides a ton of metrics to the point that I limited the amount that actually get stored in order to prevent the database from getting bloated.
![prometheus blackbox exporter prometheus blackbox exporter](https://docs.stackhero.io/documentations/prometheus/030_blackbox/blackboxDashboard7587.png)
I wound up using cAdvisor to gather Docker container metrics. Docker ContainersĮxample Grafana Dashboard for Docker Containersĭocker natively supports Prometheus and Prometheus can also get metrics directly from the Docker daemon, however the metrics they provide are a bit limited. Currently I’m using Prometheus to gather metrics from Docker containers, Traefik, CrowdSec, and to do some status monitoring. As one of the most popular ways of collecting metrics a lot of programs natively support supplying Prometheus with metrics and there are ton of exporters to gather other metrics.
PROMETHEUS BLACKBOX EXPORTER SERIES
Prometheus pulls metrics from services/exporters and stores that information in a time series database. I’m using a standalone VPS for monitoring so I can actually get alerts if any of the other servers go down, it’s also in a separate location from the other servers in case there is an issue with that location. Prometheus gathers and stores metrics such as CPU, RAM, and HDD utilization while Loki gathers and stores logs from various programs. Information can be visualized in Grafana using custom dashboards or you can manually search for something that is stored in Prometheus or Loki.
![prometheus blackbox exporter prometheus blackbox exporter](https://kamaok.org.ua/wp-content/uploads/2019/08/blackbox-exporter-icmp-1024x201.png)
Information is gathered from a variety of sources into Prometheus and Loki which then can be viewed in Grafana. As usual the services for the monitoring server and agents are deployed using Docker Swarm. This is to make it easier to see the status of various devices and services and get alerts for when things go wrong, as well as viewing logs and correlating various events with their relevant metrics. I finally got around to setting up a centralized solution for gathering and viewing metrics, status info, and logs from my servers.