Closed Guillaumebeuzeboc closed 1 month ago
Enabling systemd in the prometheus.exporter.unix generates the following AppArmor output:
= AppArmor = Time: Jan 3 11:17:46 Log: apparmor="DENIED" operation="dbus_method_call" bus="system" path="/org/freedesktop/systemd1" interface="org.freedesktop.DBus.Properties" member="Get" mask="send" name="org.freedesktop.systemd1" pid=28996 label="snap.grafana-agent.grafana-agent" peer_pid=1 peer_label="unconfined" DBus access = AppArmor = Time: Jan 3 11:17:46 Log: apparmor="DENIED" operation="dbus_method_call" bus="system" path="/org/freedesktop/systemd1" interface="org.freedesktop.systemd1.Manager" member="ListUnits" mask="send" name="org.freedesktop.systemd1" pid=28996 label="snap.grafana-agent.grafana-agent" peer_pid=1 peer_label="unconfined" DBus access
For the exporter to work, an additional interface is necessary in order to call ListUnits on /org/freedesktop/systemd1 via Dbus.
ListUnits
/org/freedesktop/systemd1
I tried to add the following interfaces without success:
A search in the snapd code seems to show that no interface satifies the need.
This might require the creation of a new snapd interface.
The ListUnits on /org/freedesktop/systemd1 is now part of snapd 2.63 system-observe: https://github.com/canonical/snapd/commit/597501deccdc3c5f22632db9c88cb5ae3bf609ba
system-observe
Enabling systemd in the prometheus.exporter.unix generates the following AppArmor output:
For the exporter to work, an additional interface is necessary in order to call
ListUnits
on/org/freedesktop/systemd1
via Dbus.I tried to add the following interfaces without success:
A search in the snapd code seems to show that no interface satifies the need.
This might require the creation of a new snapd interface.