Generic Exporter
| Channel | Revision | Published | Runs on |
|---|---|---|---|
| dev/edge | 50 | 27 Feb 2026 | |
| dev/edge | 49 | 27 Feb 2026 | |
| dev/edge | 48 | 27 Feb 2026 | |
| dev/edge | 47 | 27 Feb 2026 | |
| dev/edge | 46 | 27 Feb 2026 | |
| dev/edge | 45 | 27 Feb 2026 | |
| dev/edge | 44 | 27 Feb 2026 | |
| dev/edge | 43 | 27 Feb 2026 |
juju deploy generic-exporter-operator --channel dev/edge
Deploy universal operators easily with Juju, the Universal Operator Lifecycle Manager.
Platform:
Integrate with COS
This guide explains how to integrate the Generic Exporter operator with the Canonical Observability Stack (COS), using the Grafana Agent machine charm as a telemetry collector.
Requirements
- A Juju controller managing:
- A machine model where your principal application, Generic Exporter operator, and Grafana Agent machine charm will run.
- A Kubernetes model where COS Lite (Prometheus, Loki, Grafana, etc.) is deployed.
- COS Lite up and running according to the COS documentation.
- Your principal application and the Generic Exporter operator are already deployed and related (as in the tutorial).
Deploy COS Lite
Follow the official COS Lite documentation to deploy COS on a Kubernetes cluster (for example, MicroK8s):
- Install MicroK8s and deploy COS Lite
- Ensure you use the offers overlay to enable cross-model relations, as described in the COS documentation.
This will give you a model (for example, cos) containing prometheus-k8s, loki-k8s, grafana-k8s, and grafana-agent-k8s.
Deploy Grafana Agent (machine)
In your machine model, deploy the Grafana Agent machine charm:
juju switch applications
juju deploy grafana-agent --channel=2/stable
Relate Grafana Agent to your principal application (if appropriate) so that it can collect host-level metrics and logs. For a simple ubuntu principal:
juju integrate grafana-agent ubuntu
Grafana Agent will run as a subordinate on the same machines as your principal units.
Relate Generic Exporter to Grafana Agent
The Generic Exporter operator uses the metrics-endpoint relation and the cos_agent library to forward metrics and alert rules to Grafana Agent.
Relate the applications:
juju integrate generic-exporter-operator grafana-agent
This informs Grafana Agent about:
- The scrape job (target address, port, path) for the exporter
- The on-disk directory where alert rule files are written (for example,
/run/node-exporter-0/alerts.yaml)
Grafana Agent, in turn, forwards metrics and alerts to COS Lite via prometheus_remote_write and loki_push_api relations, according to the COS integration tutorial.
Relate Grafana Agent to COS
From the Kubernetes model running COS Lite, expose Grafana Agent’s remote write and logging interfaces as offers, or follow the standard “instrument machine charms” tutorial to connect Grafana Agent to COS Lite:
For example:
# In the COS model
juju switch cos
juju offer prometheus-k8s:receive-remote-write prom-remote-write
juju offer loki-k8s:logging loki-logging
# In the machine model
juju switch applications
juju consume <controller>/cos.prom-remote-write
juju consume <controller>/cos.loki-logging
juju integrate grafana-agent prom-remote-write
juju integrate grafana-agent loki-logging
Refer to the latest COS Lite and Grafana Agent machine documentation for the exact relation names and topology.
Verify metrics and alerts in COS
Once all relations are established:
- Confirm that all units are
active:juju status - In the COS Grafana dashboard:
- Search for a Prometheus job corresponding to the app name you chose (for example,
node-exporter). - Confirm that the alert rules you attached (see next how-to) appear under Alerting → Rules, with topology labels derived from the exporter and principal charms.
- Search for a Prometheus job corresponding to the app name you chose (for example,
If metrics or alerts do not appear, check:
- The Generic Exporter unit status (it may be
Blockedif the metrics endpoint is not reachable). - Grafana Agent relations to COS Lite (
juju status grafana-agent).