You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LogForwarder in loki_push_api doesn't put the alert rules to relation data.
I was trying to set some logging alert rules in vault-k8s that uses LogForwarder to forward its logs to Loki through grafana-agent. I couldn't find the alert rule in Grafana, doing some debugging I could not find the alert rules nor the path to the alert rules in the relation data.
I looked at the code and found that LogForwarder doesn't do much with the alert rules path it receives in the init function.
Only the _handle_alert_rules function puts the alert rules to relation data and LogForwarder doesn't call that function.
To Reproduce
I faced this issue during development, while I was trying to add Loki alert rules to vault-k8s that uses LogForwarder, the rule I added looked like this and I added it under the default path used in the lib, this is not published to charmhub but any trying to add log alert rules to any charm that uses LogForwarder should have the same result.
Deploy your charm that uses LogForwarder and has log alert rules, let's call
Bug Description
LogForwarder
inloki_push_api
doesn't put the alert rules to relation data.I was trying to set some logging alert rules in vault-k8s that uses
LogForwarder
to forward its logs to Loki through grafana-agent. I couldn't find the alert rule in Grafana, doing some debugging I could not find the alert rules nor the path to the alert rules in the relation data.I looked at the code and found that
LogForwarder
doesn't do much with the alert rules path it receives in the init function.Only the
_handle_alert_rules
function puts the alert rules to relation data andLogForwarder
doesn't call that function.To Reproduce
I faced this issue during development, while I was trying to add Loki alert rules to vault-k8s that uses
LogForwarder
, the rule I added looked like this and I added it under the default path used in the lib, this is not published to charmhub but any trying to add log alert rules to any charm that usesLogForwarder
should have the same result.LogForwarder
and has log alert rules, let's calljuju deploy cos-lite --trust
juju deploy grafana-agent-k8s
juju integrate <your-charm>:logging grafana-agent-k8s
juju integrate loki:logging grafana-agent-k8s:logging-consumer
juju show-unit <your-charm>/0
juju show-unit grafana-agent-k8s/0
Alert rules are not in the relation data.
Environment
LIBAPI = 1 LIBPATCH = 10
Relevant log output
Additional context
No response
The text was updated successfully, but these errors were encountered: