Using Grafana with your Cosmo Router allows you to track metrics such as network traffic, cache status, and system performance, all in real-time. This enhanced visibility helps in quickly identifying anomalies, diagnosing issues, and optimizing network efficiency.
Checkout the repository
Start Grafana and Prometheus
Configure the Router Metrics
Login to Grafana and explore
./docker
directory. By default it defines scrape configs where metrics are polled from
/metrics
. This setup allows Prometheus to retrieve metrics data from specified endpoints running in Docker, leveraging the host.docker.internal
domain to access containers from the host.
We need to instruct the router to expose one of these endpoint
admin
for both the username and password.
Router Cache Metrics
Go Runtime Metrics
make infra-debug-down
: This command will stop and remove the running containers without affecting the existing Docker volumes.
make infra-debug-down-v
: Use this command if you need a clean slate by removing both the containers and the existing Docker volumes. This is particularly useful when you want to start fresh, without any pre-existing metrics in Prometheus.