content-cache docs: How to enable COS

How to enable COS

The charm utilizes Nginx as a static web content cache. Various metrics on the requests to the cache are logged. The logs can be ingested into Canonical Observability Stack (COS) or COS Lite by integrating the charm with a charm that provides cos-agent integration.

The Grafana Agent charm provides cos-agent integration to machine charms. If you are new to COS or the Grafana Agent charm it is recommended to first follow this guide to understand the concepts of COS and how the charms work together.

With a working Content Cache charm deployment name cache, the following will add COS support to it:

juju deploy grafana-agent cos-agent
juju integrate cos-agent cache

Then the Grafana Agent charm should be integrated with your COS instance. Once integrated a Grafana dashboard named “Content Cache” should be imported. The metrics of content cache should appear in the dashboard.