How to connect your cluster’s workload manager to COS

This how-to guide shows you how to connect your cluster’s workload manager to the Canonical Observability Stack to observe the workload manager’s logs, metrics, and a alerts.

Prerequisites

To successfully connect your cluster’s workload manager to COS, you must have:

Deploy an agent

First, in the model hosting your Charmed HPC cluster’s workload manager, deploy a Grafana agent:

juju deploy grafana-agent

Connect the workload manager to the agent

After deploying the Grafana agent, connect the agent to the workload manager controller:

juju integrate slurmctld:cos-agent grafana-agent:cos-agent

Make COS available to the workload manager

With the agent connected to the workload manager controller, make COS available to the model hosting the cluster’s workload manager:

Important

For the instructions below to succeed, you must have deployed the offers overlay as part of your COS cloud deployment.

juju consume microk8s:admin/cos.prometheus-receive-remote-write
juju consume microk8s:admin/cos.loki-logging
juju consume microk8s:admin/cos.grafana-dashboards

Connect the workload manager to COS

Now connect the Grafana agent connected to the workload manager controller to COS:

juju relate grafana-agent prometheus-receive-remote-write
juju relate grafana-agent loki-logging
juju relate grafana-agent grafana-dashboards