COS integration doesn't support remote_write
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ceph Monitor Charm |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
By following the charm documentation for COS integration:
> Alternatively, integration with the [COS Lite][cos-lite] observability
> stack is available via the metrics-endpoint relation.
>
> Relating to prometheus-k8s via the metrics-endpoint interface (as is
> found in the [COS Lite][cos-lite] bundle) will send metrics to
> prometheus.
It will add scrape_configs to scrape the ceph-mon endpoints from Prometheus so the behavior is different from what is stated in the documentation ("will send metrics to prometheus").
In any case, traffic in the ceph-mon -> prometheus direction is important in the COS world. Since grafana agent is leveraging prometheus remote_write so the direction is always grafana-agent -> prometheus and that makes the network design and firewall policy simpler to reduce the headache of operations.
====
$ kubectl -n cos exec -it prometheus-0 -c prometheus -- cat /etc/prometheus
...
scrape_configs:
...
- honor_labels: true
job_name: juju_ceph_
metrics_path: /metrics
relabel_configs:
- &id001
regex: (.*)
separator: _
source_labels:
- juju_model
- juju_model_uuid
- juju_application
- juju_unit
target_label: instance
static_configs:
- labels:
juju_
juju_charm: ceph-mon
juju_model: ceph
juju_
juju_unit: ceph-mon/2
targets:
- 192.168.
- honor_labels: true
job_name: juju_ceph_
metrics_path: /metrics
relabel_configs:
- *id001
static_configs:
- labels:
juju_
juju_charm: ceph-mon
juju_model: ceph
juju_
juju_unit: ceph-mon/1
targets:
- 192.168.
- honor_labels: true
job_name: juju_ceph_
metrics_path: /metrics
relabel_configs:
- *id001
static_configs:
- labels:
juju_
juju_charm: ceph-mon
juju_model: ceph
juju_
juju_unit: ceph-mon/0
targets:
- 192.168.
====
Changed in charm-ceph-mon: | |
status: | New → Triaged |
importance: | Undecided → Wishlist |
My gut feeling is that new relation with grafana-agent would be required instead of using the existing juju-info relation.
juju-info:
description: |
`juju-info` provides basic compatibility with all charms.
If all you want is /var/log logs and node_exporter metrics,
this relation will be enough.
interface: juju-info
scope: container
cos-agent:
description: |
`cos-agent` is a dedicated relation for the grafana agent machine
charm. It will allow you to set up custom scrape jobs, fetch files
from arbitrary locations, send alert rules, dashboards, etc.
interface: cos_agent
scope: container