Last active
March 21, 2019 16:30
-
-
Save capi1O/0993f016235072546d2cc68a5cbd2726 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -O https://gist.githubusercontent.com/monkeydri/0993f016235072546d2cc68a5cbd2726/raw/a6a22344d0b029731a71f04acd2d1a2a1ddc2383/td-agent-bit-template.conf | |
sudo bash -c "TIMBER_API_KEY=${TIMBER_API_KEY} TIMBER_SOURCE_ID=${TIMBER_SOURCE_ID} HOSTNAME=${HOSTNAME} envsubst < ./td-agent-bit-template.conf > /etc/td-agent-bit/td-agent-bit.conf" | |
sudo service td-agent-bit start |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget -qO - https://packages.fluentbit.io/fluentbit.key | sudo apt-key add - | |
sudo bash -c "echo 'deb https://packages.fluentbit.io/ubuntu/bionic bionic main' >> /etc/apt/sources.list" | |
sudo apt-get update && sudo apt install -y td-agent-bit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[SERVICE] | |
# Reduce the flush interval for better real-time access | |
Flush 2 | |
[OUTPUT] | |
Name http | |
# Will match all inputs, replace with your match if you want to send a subset | |
Match * | |
tls On | |
Host logs.timber.io | |
Port 443 | |
URI /sources/${TIMBER_SOURCE_ID}/frames | |
Header Authorization Bearer ${TIMBER_API_KEY} | |
Header Content-Type application/msgpack | |
Format msgpack | |
Retry_Limit 5 | |
[FILTER] | |
Name record_modifier | |
# Will match all inputs, replace with your match if you want to send a subset | |
Match * | |
Record hostname ${HOSTNAME} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment