Breaking News from AWS re:Invent
Coralogix receives AWS Rising Star award!
Coralogix provides a simple and seamless Gelf integration driver for your Docker logs. Ship your logs directly from your containers without having to install any SDK or agent, and get started in minutes.
This document includes cluster dependent URL’s. Each URL has a variable part (in Italic). Please match this part with a row entry within the following table. Copy the table row entry located under the column that matches the top level domain of your Coralogix account (.com, .in etc.). Replace the variable part of the URL with this entry.
Cluster | API Endpoint |
---|---|
.coralogix.com | syslogserver.coralogix.com |
.app.coralogix.us | syslogserver.coralogix.us |
.app.coralogix.in | syslogserver.app.coralogix.in |
.app.eu2.coralogix.com | syslogserver.eu2.coralogix.com |
.app.coralogixsg.com | syslogserver.coralogixsg.com |
Provide the following four variables:
If you run your containers manually:
$ docker run -dit \
-e PRIVATE_KEY="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" \
-e COMPANY_ID=XXXX \
-e APP_NAME="simple-application" \
-e SUB_NAME="backend" \
--log-driver=gelf \
--log-opt gelf-address=udp://syslogserver.Cluster URL:20001 \
--log-opt env=PRIVATE_KEY,APP_NAME,SUB_NAME,COMPANY_ID \
alpine echo "Hello world!"
You can also use it with docker-compose.yml:
version: "3"
services:
web:
restart: always
build: app
container_name: flask-app
# Setup required parameters for Coralogix integration
environment:
- PRIVATE_KEY=${PRIVATE_KEY}
- APP_NAME=${APP_NAME:-flask-app}
- SUB_NAME=${SUB_NAME:-backend}
- COMPANY_ID=${COMPANY_ID}
# Setup logging driver
logging:
driver: gelf
options:
# Address of Coralogix syslog server
gelf-address: "udp://syslogserver.coralogix.com:20001"
# Required parameters for request
env: "PRIVATE_KEY,APP_NAME,SUB_NAME,COMPANY_ID"
ports:
- "5000:5000"
Before using this integration, make sure you create a .env file with configurations or write them directly to the docker-compose.yml file.
Now you should have your docker logs streaming to Coalogix. Not seeing your logs in our LiveTail? Use our in-app chat for support.
You can try to deploy our example application: Source code.