Public Repository

Last pushed: 3 years ago
Short Description
Agent to upload logs to
Full Description

NOTE: There appears to be an issue with excessive CPU utilization when using this approach on scalyr-agent 2.0.6, Docker 1.5, and Ubuntu 14.04.


Run this container to upload logs from a target container to Scalyr.

The target container must be run with the option "-v /var/log/" to allow the log files to be loaded by the scalyr-agent container.

Run the scalyr-agent container as follows to load log files.

docker run -d --volumes-from CONTAINER_NAME -e "SCALYR_API_KEY=..." -e "SCALYR_SERVER_HOST=..." scalyr-agent /sbin/my_init

Add your API key and the server host you would like to use for the container, and replace the CONTAINER_NAME with the name of the container from which you would like to upload log files.

The image loads nginx and mysql log files by default, using the following logs section in agent.json:

 logs: [
     { path: "/var/log/nginx/*access.log", attributes: {parser:"accessLog",serverType:"nginx"} },
     { path: "/var/log/nginx/error.log", attributes: {serverType:"nginx"} },
     { path: "/var/log/mysql/*.log", attributes: {serverType:"mysql"} },

The image can easily be customized by updating the file /scalyr-agent-2/config/agent.json as desired.

Docker Pull Command