canonical / grafana-agent-snap

Snap of Grafana Agent, a telemetry collector for sending metrics, logs and traces to the Grafana's LGTM stack.
https://snapcraft.io/grafana-agent
Apache License 2.0
1 stars 5 forks source link

Node exporter reporting errors for wrong apparmor profile #44

Open peppepetra opened 8 months ago

peppepetra commented 8 months ago

This is happening with grafana-agent ver 0.35.4 , snap rev. 16, channel latest/stable.

Node exporter is reporting following errors on logs while collecting processes metrics:

Nov 19 10:06:18 juju-204eff-stg-bootstacktools-2 grafana-agent.grafana-agent[3845640]: ts=2023-11-19T10:06:18.644327672Z caller=collector.go:169 level=error integration=node_exporter msg="collector failed" name=systemd duration_seconds=0.013925124 err="couldn't get units: An AppArmor policy prevents this sender from sending this message to this recipient; type=\"method_call\", sender=\":1.4452\" (uid=0 pid=3845640 comm=\"/snap/grafana-agent/16/agent -config.expand-env -c\" label=\"snap.grafana-agent.grafana-agent (enforce)\") interface=\"org.freedesktop.systemd1.Manager\" member=\"ListUnits\" error name=\"(unset)\" requested_reply=\"0\" destination=\"org.freedesktop.systemd1\" (uid=0 pid=1 comm=\"/sbin/init \" label=\"unconfined\")"
Nov 19 10:06:18 juju-204eff-stg-bootstacktools-2 grafana-agent.grafana-agent[3845640]: ts=2023-11-19T10:06:18.700389079Z caller=collector.go:169 level=error integration=node_exporter msg="collector failed" name=processes duration_seconds=0.089580946 err="unable to retrieve limit number of threads: open /proc/sys/kernel/threads-max: permission denied"
peppepetra commented 8 months ago

I have updated the bug since, since I've just realized that node-exporter is actually working. It is probably just failing to collect processes metrics.

phvalguima commented 1 month ago

I've deployed grafana-agent snap version 0.35.4, rev 16, from charm rev 65, still seeing these entries on dmesg and syslog output.

dstathis commented 1 month ago

Related to canonical/grafana-agent-operator#52. We are currently making a classic confinement snap that should fix all of these issues.