How to enable debug logging in Ambari Agent
search cancel

How to enable debug logging in Ambari Agent

book

Article ID: 294966

calendar_today

Updated On:

Products

Services Suite

Issue/Introduction

When troubleshooting Ambari issues, it may be necessary to enable debug logging in the Ambari Agent log /var/log/ambari-agent/.


If there is a need to enable debug on the Ambari server, seeĀ How to enable debug logging in Ambari Server


Environment


Resolution

To enable debug logging in Ambari agent, follow these steps:

1. Open the relevant configuration file in a UNIX text editor:

  • Ambari Agent: /etc/ambari-agent/conf/ambari-agent.ini
2. Locate (or add in the entry) loglevel
[root@hawq20 conf]# grep loglevel ambari-agent.ini
;loglevel=(DEBUG/INFO)
loglevel=INFO
[root@hawq20 conf]#

3. Replace "loglevel=INFO" with "loglevel=DEBUG":

[root@hawq20 conf]# grep loglevel ambari-agent.ini
;loglevel=(DEBUG/INFO)
loglevel=DEBUG
[root@hawq20 conf]#

4. Save the configuration file and close it.

5. Restart Ambari agent:

ambari-agent restart

NOTE: Ambari agent logging level will only change on one host and will not affect the other hosts in the cluster.