Debug mode - Linux, Mac, FreeBSD
By default the agent will log warnings and errors but if you are having problems with the agent not reporting certain metrics or with your plugins, you can enable debug mode which will log every action the agent takes.
1. Browse to the sd-agent directory
cd /usr/bin/sd-agent/
2. Edit the agent file
Open agent.py in a text editor such as nano:
nano -w agent.py
On line 15 you will see this:
agentConfig['logging'] = logging.INFO
Change it to:
agentConfig['logging'] = logging.DEBUG
Save and exit (Ctrl + X then press Y).
3. Start the agent
This will depend on how you installed the agent
Linux packages
sudo /etc/init.d/sd-agent restart
Mac, FreeBSD or manual install
python agent.py restart
4. Locate debug log
A debug log file will be created. The location depends on how you installed the agent:
Linux packages
/var/log/sd-agent/sd-agent.log
Mac, FreeBSD or manual install
/tmp/sd-agent.log
Config file
If you are doing this across multiple servers or want to use the config file instead, you can add a logging_level config option.