Agent doest have enough permission

i have this error showing up in syslogs “open /var/log/php8.2-fpm.log: permission denied”

:wave: welcome to the :grafana: community @rudigo6

Did you get any error logs in /var/log/grafana/grafana.log ?

Try increasing the verbosity of the Grafana server logs to debug and note any errors. For printing to console, set the console logs to debug as well.

Also please include:

Grafana version and operating system:

What were you trying to achieve before you caught the error?

Your log file does not have enough permissions for grafana-agent or promtail to read it, so the tailer fails.

You need to understand what is the username your log agent is using, then you need to check that in fact it does not have access to that file, and finally you should add permissions to the file.

I am on Ubuntu 22.04. In my case, grafana agent runs as grafana-agent user in the adm group. (You can check that by running sudo -u grafana-agent groups). If you run sudo -u grafana-agent less /var/log/php8.2-fpm.log you will get a permission denied error. My file was owned by root:root and had rw------- permissions.
I set the group to be adm (chgrp adm php8.2-fpm.log) and add permissions for the group to read it (chmod g+r php8.2-fpm.log).

I restarted php-fpm just to make sure everything works, and almost immediately the file is transmitted to Grafana :slight_smile: