<application container>:~$ journalctl -b -x -u snap.grafana-agent.grafana-agent | grep journal
Oct 25 14:39:45 juju-561bfc-15 grafana-agent.grafana-agent[272]: ts=2023-10-25T14:39:45.567668197Z caller=journaltargetmanager.go:29 level=warn component=logs logs_config=log_file_scraper msg="WARNING!!! Journal target was configured but support for reading the systemd journal is not compiled into this build of promtail!"
After some troubleshooting, I've come to the conclusion that this should be solved by including libsystemd-dev as a build package. We should verify that this is the case and update the charm accordingly.
Bug Description
Grafana Agent is not slurping logs from
journald
as expected; the Grafana Agent issues a warning that a journal target is configured, but the promtail binary has not been compiled with this option enabled. All configuration was performed according to https://charmhub.io/topics/canonical-observability-stack/tutorials/instrumenting-machine-charms.I am running a modified version of
landscape-scalable
with theCosAgentProvider
included. I've copied the relevant modifications below.To Reproduce
Assuming a microk8s cloud running COS called microk8s-cos
Verify that error message appears by restarting the application container and checking journald:
Environment
Running juju version=3.1.6-genericlinux-amd64 locally
Relevant log output
Additional context
No response