How to integrate with COS¶
The MediaWiki charm comes with built-in support for integration with the Canonical Observability Stack (COS). This guide describes the process of integrating with COS to monitor the MediaWiki charm.
Requirements¶
Deploy the MediaWiki charm. For steps on how to do this, see the basic deployment tutorial.
Deploy COS in an independent model. For steps on how to do this, see the deploying the observability stack tutorials.
Steps¶
Deploy the OpenTelemetry Collector charm¶
Deploy the OpenTelemetry Collector K8s charm in the same model as the MediaWiki charm.
juju deploy opentelemetry-collector-k8s --channel 2/stable
Integrate the OpenTelemetry Collector with COS¶
Next, integrate the OpenTelemetry Collector charm with COS by relating it to the offers that COS provides. The appropriate offer names differ depending on whether you are using COS or COS Lite.
The following examples assume that you deployed COS in a model named cos, with the user admin, and with the same controller that you deployed the MediaWiki charm with. If that is not the case, please adjust the commands accordingly.
juju integrate opentelemetry-collector-k8s:grafana-dashboards-provider admin/cos.grafana-dashboards
juju integrate opentelemetry-collector-k8s:send-loki-logs admin/cos.loki-logging
juju integrate opentelemetry-collector-k8s:send-remote-write admin/cos.mimir-receive-remote-write
juju integrate opentelemetry-collector-k8s:grafana-dashboards-provider admin/cos.grafana-dashboards
juju integrate opentelemetry-collector-k8s:send-loki-logs admin/cos.loki-logging
juju integrate opentelemetry-collector-k8s:send-remote-write admin/cos.prometheus-receive-remote-write
Integrate MediaWiki with the OpenTelemetry Collector¶
Finally, relate the MediaWiki charm to the OpenTelemetry Collector charm to start sending metrics and logs to COS.
juju integrate mediawiki-k8s:grafana-dashboard opentelemetry-collector-k8s:grafana-dashboards-consumer
juju integrate mediawiki-k8s:logging opentelemetry-collector-k8s:receive-loki-logs
juju integrate mediawiki-k8s:metrics-endpoint opentelemetry-collector-k8s:metrics-endpoint
You should now be able to access a Grafana dashboard named MediaWiki Operator Overview in the Grafana instance that COS provides.
See also
For detailed information about the specific metrics that the MediaWiki charm provides, refer to the metrics reference.