Closed sed-i closed 6 months ago
When relating prom to agent, we get an obscure status message:
App Version Status Scale Charm Channel Rev Address Exposed Message agent 0.32.1 waiting 1 grafana-agent-k8s edge 41 10.152.183.253 no installing agent prom 2.44.0 active 1 prometheus-k8s edge 131 10.152.183.97 no Unit Workload Agent Address Ports Message agent/0* blocked idle 10.1.55.22 Missing incoming ('requires') relation prom/0* active idle 10.1.55.39 Relation provider Requirer Interface Type Message prom:prometheus-peers prom:prometheus-peers prometheus_peers peer prom:receive-remote-write agent:send-remote-write prometheus_remote_write regular
Need to look at the code to realize that "metrics-endpoint" is required: https://github.com/canonical/grafana-agent-k8s-operator/blob/86c6968639b764d7a0dad63b31bd70dee7024bd7/src/k8s_charm.py#L30-L43
There seem to be a few issues with the code responsible for this:
has_incoming = True
https://github.com/canonical/grafana-agent-k8s-operator/blob/86c6968639b764d7a0dad63b31bd70dee7024bd7/src/grafana_agent.py#L369-L379
Partially duplicates https://github.com/canonical/grafana-agent-k8s-operator/issues/218, it's been solved by https://github.com/canonical/grafana-agent-k8s-operator/pull/286
When relating prom to agent, we get an obscure status message:
Need to look at the code to realize that "metrics-endpoint" is required: https://github.com/canonical/grafana-agent-k8s-operator/blob/86c6968639b764d7a0dad63b31bd70dee7024bd7/src/k8s_charm.py#L30-L43
There seem to be a few issues with the code responsible for this:
has_incoming = True
will be set even when not all mandatory rels are in place.https://github.com/canonical/grafana-agent-k8s-operator/blob/86c6968639b764d7a0dad63b31bd70dee7024bd7/src/grafana_agent.py#L369-L379