How to log Incus to loki?

Hi,

I want to export Incus logs to a loki server running on an instance. In Incus settings I changed the following values:

  • logging.NAME.target.address with my server address (no TLS at the moment)
  • logging.NAME.target.instanceusing the same instance name as the prom job name
  • logging.NAME.target.typeset to loki

My loki server is working fine as it’s logging all other instances, and digging into its data I can’t find anything related to Incus in case it would not have a correct label.

Is there anything extra to configure?

Update, from this ticket Configurable syslog targets · Issue #1420 · lxc/incus · GitHub , it seems I was doing it wrong (the NAME in the keys gave me a clue that I was certainly doing it wrong, but I wasn’t able to figure what was wrong exactly). Now I have this, but still not sending anything :thinking:

  logging.loki01.target.address: http://10.10.100.58:3100/
  logging.loki01.target.instance: incus
  logging.loki01.target.type: loki
  logging.loki01.types: lifecycle,logging,network-acl

I fixed it by removing the trailing slash in the target address.

And finally, the setup was documented in Server configuration - Incus documentation although I was always hitting this when searching API extensions - Incus documentation but it’s deprecated