Public Repository

Last pushed: 2 years ago
Short Description
Ship a log to your Logz.io account
Full Description

#Logz.io Log Shipper
This Docker image ships a log file to your Logz.io account, internally using rsyslog for shipping, without you having to worry about configuration.

#Usage

##Environment Variables
In order to start collection you need to specify the following information. Variables in bold denote a mandatory variable:

  • LOGZ_TOKEN: Your Logz.io App Token.
  • TYPE: The log type that is being sent. This enables better parsing of your log data. It is hi
  • HOSTNAME: The hostname you with to associate with performance data sent by this container. This string will be provided in the syslog5424_host field of each entry.
  • INSTANCE: The IP address that will be provided in the instance field of each entry.

##Host file mapping
In order to ship a log file, it has to be mapped to the running container. This is performed with the -v option:

-v <log file to ship>:/host/file:ro

Example

docker run -d \
  -v /var/log/nginx/access.log:/host/file
  -e LOGZ_TOKEN="QWERTYQWERTYQWERTYQ" \
  -e TYPE=nginx \
  -e HOSTNAME=`hostname` \
  -e INSTANCE="10.1.2.3" \
  --restart=always \
  logzio/logzio-logshipper
  • In the above example the log file that is shipped is /var/log/nginx/access.log, the hostname that will be passed to the container is generated by the hostname command, and nginx is useful tag for nginx access log.

#About Logz.io
Logz.io combines open source log analytics and behavioural learning intelligence to pinpoint what’s actually important

Docker Pull Command
Owner
logzio

Comments (0)