sematext/logagent
Lightweight log shipper & parser for server & container logs. Ships logs to Elasticsearch & Sematext
5M+
Logagent is a general purpose log shipper. The Logagent Docker image is pre-configured for the log collection on container platforms. It runs as a tiny container on every Docker host and collects logs for all cluster nodes and their containers. All container logs are enriched with Kubernetes and Docker Enterprise / Docker Swarm metadata.
To run Logagent you will need a Logs App Token.
If you don't have Logs Apps yet, you can create Apps now.
The Logagent docker container can be configured through the following environment variables:
REGION: Sematext Cloud region US or EU (default: US). The receiver URL will be set to EU/US default values. When using REGION, you don't need to set LOGS_RECEIVER_URL
(see below).
LOGS_RECEIVER_URL: The URL of your Elasticsearch Endpoint (defaults to Sematext Cloud US https://logsene-receiver.sematext.com
).
https://logsene-receiver.eu.sematext.com
.https://elasticserch-server-name:9200
.LOGS_TOKEN: The index where the agent should log to (for Sematext Cloud users the logs token)
LOG_GLOB: Semicolon-separated list of file globs
/mylogs//*.log;/var/log//*.log
-v /var/log:/mylogs
LOGAGENT_ARGS: Additional command line arguments for Logagent
LOGAGENT_ARGS="-n httpd"
LOGAGENT_ARGS="-u 514"
The most basic start method is using docker run command:
docker pull sematext/logagent
docker run -d --name logagent \
-e LOGS_TOKEN=YOUR_LOGS_TOKEN \
-e LOGS_RECEIVER_URL="https://logsene-receiver.sematext.com"
-v /var/run/docker.sock:/var/run/docker.sock sematext/logagent
For further information please read the setup manual. You find in the manual all configuration options and the setup instructins for Kubernetes, OpenShift, Mesos, Docker Enterprise etc.
docker pull sematext/logagent