Model topology for COS Lite¶
COS Lite consists of a number of charms connected by Juju relations.
The graph is so dense and interconnected that displaying it in its entirety isn’t very informative. Instead, for clarity and readability, we depict the bundle topology using several separate diagrams, each one presenting a view of a specific data flow or functionality group. Each line indicates a separate juju relation.
Ingress view¶
The workloads that make up COS Lite are servers that need to be reachable from outside the model they are deployed in. Refer to How to configure granular ingress in COS for configuration steps.
Grafana (“ingress-to-leader”) is the main UI, amalgamating telemetry from all datasources into dashboards.
Prometheus and Loki (both “ingress-per-unit”), ingest telemetry pushed from opentelemetry collector from another model.
OpenTelemetry Collector (“traefik-route”) is the ingestion entrypoint for telemetry pushed in over OTLP and the other receiver protocols, which need arbitrary ports opened on the Traefik host.
Alertmanager (“ingress per app”), has a UI for acknowledging or silencing alerts.
graph LR
subgraph cos_lite["COS Lite"]
alrt[Alertmanager]
click alrt "https://github.com/canonical/alertmanager-k8s-operator"
graf[Grafana]
click graf "https://github.com/canonical/grafana-k8s-operator"
prom[Prometheus]
click prom "https://github.com/canonical/prometheus-k8s-operator"
loki[Loki]
click loki "https://github.com/canonical/loki-k8s-operator"
otelcol[Otel Collector]
click otelcol "https://github.com/canonical/opentelemetry-collector-k8s-operator"
trfk[Traefik]
click trfk "https://github.com/canonical/traefik-k8s-operator"
ctlg[Catalogue]
click ctlg "https://github.com/canonical/catalogue-k8s-operator"
trfk --- |<a href='https://charmhub.io/traefik-k8s/libraries/ingress_per_unit'>ipu</a>| loki
trfk --- |ipu| prom
trfk --- |<a href='https://charmhub.io/traefik-route-k8s/libraries/traefik_route'>route</a>| graf
trfk --- |route| otelcol
trfk --- |<a href='https://charmhub.io/traefik-k8s/libraries/ingress'>ipa</a>| alrt
prom --- |<a href='https://charmhub.io/catalogue-k8s/libraries/catalogue'>catalogue</a>| ctlg
alrt --- |catalogue| ctlg
graf --- |catalogue| ctlg
end
Datasource view¶
Many of the COS workloads are (API frontends to) data storages that can query each other:
Grafana queries loki, prometheus for telemetry and alertmanager for alerts.
Prometheus and loki evaluate alert rules and post alerts to alertmanager.
graph LR
subgraph cos_lite["COS Lite"]
alrt[Alertmanager]
click alrt "https://github.com/canonical/alertmanager-k8s-operator"
graf[Grafana]
click graf "https://github.com/canonical/grafana-k8s-operator"
prom[Prometheus]
click prom "https://github.com/canonical/prometheus-k8s-operator"
loki[Loki]
click loki "https://github.com/canonical/loki-k8s-operator"
prom --- |alerting| alrt
loki --- |alerting| alrt
graf --- |source| prom
graf --- |source| alrt
graf --- |source| loki
end
Self-monitoring view¶
The observability solution monitors itself to ensure correct functioning. The self-monitoring relations together with cos-alerter guard against outages of the observability stack itself.
OpenTelemetry Collector is the single fan-in point for telemetry generated by COS Lite components: it scrapes every component’s metrics endpoint and remote-writes them into Prometheus, and it receives every component’s logs and forwards them to Loki. Routing self-monitoring through the collector rather than relating each component straight to a backend means processing, relabeling and topology injection apply uniformly, and it matches how COS is wired.
Components in COS Lite send their dashboards to OpenTelemetry Collector. OpenTelemetry Collector then forwards all the collected dashboards to Grafana.
graph TD
subgraph cos_lite["COS Lite"]
alrt[Alertmanager]
click alrt "https://github.com/canonical/alertmanager-k8s-operator"
graf[Grafana]
click graf "https://github.com/canonical/grafana-k8s-operator"
prom[Prometheus]
click prom "https://github.com/canonical/prometheus-k8s-operator"
loki[Loki]
click loki "https://github.com/canonical/loki-k8s-operator"
otelcol[Otel Collector]
click otelcol "https://github.com/canonical/opentelemetry-collector-k8s-operator"
trfk[Traefik]
click trfk "https://github.com/canonical/traefik-k8s-operator"
trfk --- |metrics| otelcol
alrt --- |metrics| otelcol
loki --- |metrics| otelcol
graf --- |metrics| otelcol
prom --- |metrics| otelcol
alrt --- |logs| otelcol
graf --- |logs| otelcol
prom --- |logs| otelcol
otelcol --- |remote write| prom
otelcol --- |logs| loki
graf --- |dashboard| loki
graf --- |dashboard| prom
graf --- |dashboard| alrt
graf --- |dashboard| otelcol
end