Customizing Ambari agent log and pid directories
To modify the Ambari agent log and pid locations:
-
Using a command line editor 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 ambari-agent.inifile.
- 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