Re: how/where to configure access to libvirt-sock-ro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Sun, Oct 03, 2021 at 10:05:10PM +0000, Marc wrote:
> I wanted to create a monitoring user that can do some reporting like this:
> runuser -u xxxxx  -- prometheus-libvirt-exporter -libvirt.uri /var/run/libvirt/libvirt-sock-ro

I assume you're using prometheus-libvirt-exporter from


If so, I don't think you need to pass the (poorly named) libvirt.uri
option explicitly, as /var/run/libvirt/libvirt-sock-ro is already the
default value.

> But I am getting the
> failed to connect: authentication required

What do the following commands return?

  $ runuser -u xxx -- virsh -c qemu:///system -r list --all
  $ runuser -u xxx -- virsh -c
qemu:///system?socket=/var/run/libvirt/libvirt-sock-ro list --all

What are the permissions on the socket? Is SELinux possibly getting
in the way?

Access to the read-only socket is usually not very restrictive, since
a read-only connection can only be used to collect data anyway.

Andrea Bolognani / Red Hat / Virtualization

[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux