On Tue, Mar 30, 2021 at 10:14 PM al carriere <alan.g.carri...@gmail.com>
wrote:

>
> The file /etc/.mysqld_exporter.cnf does in fact exist:
>
> /etc$ ls -lart | grep mysqld
> -rwxrwxrwx   1 root prometheus    54 Mar 30 15:57 .mysqld_exporter.cnf
>

Is the systemd service unit you are using doing anything to change the
mysqld_exporter's view of the filesystem? (Something like RootDirectory=
or ConfigurationDirectory=)

Do the permissions on /etc/ itself grant permission to the uid the process
is running as?

Another option you may want to consider is to pass the username and
password as env variables. This can be done by editing the [Service]
section of the service unit to have:

Environment='DATA_SOURCE_NAME=mysqld_exporter:XXXXXXXX@(localhost:3306)/'

The advantage being that you would no longer need the .mysqld_exporter.cnf
file with permissive permissions

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CAFFB%2BpRgeDnUUKpRqMneEDLRO1oPLA8Lqwmc7%3D9eYLqoN17oVg%40mail.gmail.com.

Reply via email to