Unable to change the default path of the pmm agent log

I would like to change the PMM agent default log to custom log like below. But its not working and I followed the PMM documentation.

[root@rndsan404 maxctrl_exporter]# cat /usr/lib/systemd/system/pmm-agent.service
After=time-sync.target network.target

ExecStart=/usr/sbin/pmm-agent --config-file=/usr/local/percona/pmm2/config/pmm-agent.yaml StandardError=file:/var/log/pmm-agent.log

[root@rndsan404 maxctrl_exporter]#

Hi @Naresh9999

Have you reloaded systemd manager configuration?

1 Like

Hi @Vadim_Yalovets

I followed the same steps but still I am unable to change the log file. Please find the OS and agent version details.

It looks like used systemd version is lower than 240.
So in such case you should involve rsyslog to deal with logs.

1 Like

Hi @Vadim_Yalovets

Thanks for the quick help, Its working fine.

Can I know from which systemd version it will work?