This document is aimed at guiding charm operators for integrating their MicroCeph deployments with COS to take advantage of observability tools like Prometheus, Loki and Grafana.
Note
COS integration is available in Charm MicroCephlatest/edge
channel.
Pre-requisites
- A COS lite deployment Refer to documentation for installation instructions
- A Charm microceph deployment Refer to documentation for installation instructions
Assumptions
- Model/Controller names for COS are assumed as cos/k8scon respectively.
- Model/Controller names for MicroCeph are assumed as ceph/lxdcon respectively.
Deploy grafana-agent
Grafana-Agent is the subordinate charm responsible for collecting key observability info like metrics, logs, traces from the principal and sending it over to the observability services
like prometheus, and loki. It also collects alertrules and dashboards files for COS stack. For MicroCeph, grafana-agent can be deployed as:
juju switch lxdcon:ceph
juju deploy grafana-agent
juju integrate microceph grafana-agent
[!Note]
Thebase
value for principal and subordinate charms should be same.
Offer observability endpoints
Since the COS stack is deployed as a separate model, we need to offer
relevant integrations for them to be consumed by applications outside this model.
juju switch k8scon:cos
juju offer prometheus:receive-remote-write
juju offer grafana:grafana-dashboard
juju offer loki:logging
Consume observability integrations with grafana-agent
juju switch lxdcon:ceph
juju relate grafana-agent k8scon:cos.prometheus
juju relate grafana-agent k8scon:cos.loki
juju relate grafana-agent k8scon:cos.grafana
Verify Observability
Refer to COS Documentation for fetching a list of service endpoints. These will be front-ended by Traefik service.
Verify metrics on prometheus
In your web browser, access http://TRAEFIK_IP/cos-prometheus-0
and verify ceph_
metrics are available.
Create Grafana credentials
Use admin
as username and password as provided by the action result.
juju run -m k8scon:cos grafana/0 get-admin-password
Verify Dashboards on grafana
In your web browser, access http://TRAEFIK_IP/cos-grafana
and verify if suitable dashboards are available and populated.
Verify Logs on grafana
Grafana can also be used as the GUI for loki logs scraped from the MicroCeph cluster. In order to view them:
- In your web browser, access
http://TRAEFIK_IP/cos-grafana/explore
- Select
juju_cos_*loki*
as the data source - Click Run Query
This should already load the indexed log entries, however, you can also filter for specific logs using label filter and operations.