Loki alert rules defined by a charm included in the grafana agent and those defined in the grafana agent contain the label juju_charm, although the logs are transmitted without this label. Furthermore, the job label is not present for the logs, so the alert rules defined in the grafana-agent are incorrect.
To Reproduce
juju deploy github-runner (or any compatible machine charm)
juju integrate github-runner grafana-agent
Go to the dashboard.
Environment
reproduced on multipass and openstack cloud with grafana-agent rev 37
Apparently, we only add the job label for scrape configs that come from the snap slots, here. We should likely add that job label here as well. This should fix the issue :)
Bug Description
Loki alert rules defined by a charm included in the grafana agent and those defined in the grafana agent contain the label
juju_charm
, although the logs are transmitted without this label. Furthermore, the job label is not present for the logs, so the alert rules defined in the grafana-agent are incorrect.To Reproduce
juju deploy github-runner
(or any compatible machine charm)juju integrate github-runner grafana-agent
Go to the dashboard.
![image](https://github.com/canonical/grafana-agent-operator/assets/4182921/9b2fae24-2b2d-4828-a351-c9314573b980)
Environment
reproduced on multipass and openstack cloud with grafana-agent rev 37
Relevant log output
Additional context
No response