Varnish Cache
CubeAPM provides built-in dashboards for monitoring Varnish Cache. Since OpenTelemetry collector does not provide support for Varnish yet, CubeAPM Varnish dashboards are based on metrics generated by the Prometheus Varnish Exporter.
To inetgrate Varnish with CubeAPM, we need to follow the below steps:
-
Install Prometheus Varnish Exporter, following the documentation provided in the README. This exporter will create a HTTP listener on port
9131
, which will expose metrics at/metrics
path. -
Install and configure OpenTelemetry Collector to scrape these metrics and send them to CubeAPM. The guide is available here.
Troubleshooting
Run the following command on the server running Prometheus Varnish Exporter to check if metrics are getting generated:
curl -v 'http://localhost:9131/metrics'
If metrics are getting generated but not showing up in CubeAPM, check the logs of OTel Collector.