Customizing Ambari Agent Log + PID Directories
To modify the Ambari Agent Log and PID locations:
Steps
On each host running an Ambari Agent, stop the Ambari Agent:
ambari-agent stop
Edit the Ambari Agent properties file:
vi /etc/ambari-agent/conf/ambari-agent.ini
In the [agent] section, modify the piddir and logdir properties:
[agent]
logdir=/var/log/ambari-agent
piddir=/var/run/ambari-agent
Save the file.
Create the new directories and be sure to set the directory ownership and permissions to allow the Ambari Agent process access.
Restart the Ambari Agent.
ambari-agent start