Version Affected: RADIUS Agent
Overview
Debugging the RADIUS Agent container via a console connection using Docker commands can be difficult, especially when the RADIUS Agent is busy -- a command like docker logs radius-agent can fill the console buffer with more output than you can scroll through, and even filtering with grep/egrep can still leave a large amount of text to work through.
Copy the Log File Out of the Container Instead
Copying the actual log file out of the radius-agent container to another location, where it can be worked on with tools like grep, egrep, tr, sed, or awk, makes debugging much easier for a Linux admin.
- Find the name of the current log file by inspecting the container:
This returns the full Docker configuration for the container -- look for the log entry.docker inspect radius-agent - Use the following command to return the actual path of the log file:
docker inspect radius-agent | grep ^.*-json\.log.*$ | gawk '{ print $2 }' | tr -d "\"" | tr -d "," - Once you know the location, copy the file elsewhere to work on it -- for example, to copy it to the logged-in user's home folder:
cp $(docker inspect radius-agent | grep ^.*-json\.log.*$ | gawk '{ print $2 }' | tr -d "\"" | tr -d ",") ~ - Now that the file is no longer being updated in the copied location, you can use any available utility to search and work on it without interruption.
Special Considerations
Make sure the file is copied, not forcefully moved, out of the container folder.
SecureAuth Knowledge Base Articles provide information based on specific use cases and may not apply to all appliances or configurations. Be advised that these instructions could cause harm to the environment if not followed correctly or if they do not apply to the current use case.
Customers are responsible for their own due diligence prior to utilizing this information and agree that SecureAuth is not liable for any issues caused by misconfiguration directly or indirectly related to SecureAuth products.
Comments
Please sign in to leave a comment.