Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,9 @@ remote-install-monitor: remote-install-root-aws-credentials
U=$$(cat ${CLOUD_USER_FILE});\
cat ${TOOLS_PATH}/fluent-bit/plugins.conf | ssh ${SSHOPTS} $$U@$$H "sudo tee /tmp/plugins.conf > /dev/null";\
cat ${TOOLS_PATH}/fluent-bit/fluent-bit.conf | sed "s/<NEW_RELIC_INGEST_KEY>/${NEW_RELIC_INGEST_KEY}/;s|<HTTPS_PROXY>|${remote_http_proxy}|;s|<MONITOR_BUCKET>|${MONITOR_BUCKET}|;s|<MONITOR_DIR>|${MONITOR_DIR}|" | ssh ${SSHOPTS} $$U@$$H "sudo tee /tmp/fluent-bit.conf > /dev/null";\
ssh ${SSHOPTS} $$U@$$H "(sudo systemctl stop unattended-upgrades;sleep 30;curl -Ls https://download.newrelic.com/install/newrelic-cli/scripts/install.sh | bash && sudo HTTPS_PROXY=${remote_http_proxy} NEW_RELIC_API_KEY=${NEW_RELIC_API_KEY} NEW_RELIC_ACCOUNT_ID=${NEW_RELIC_ACCOUNT_ID} NEW_RELIC_REGION=EU /usr/local/bin/newrelic install -y && echo New Relic Installed && curl -s https://raw.githubusercontent.com/fluent/fluent-bit/master/install.sh | sh && sudo mv /tmp/fluent-bit.conf /tmp/plugins.conf /etc/fluent-bit/ && sudo systemctl restart fluent-bit && echo Fluent-bit installed && sudo systemctl start unattended-upgrades) > .install-monitor.log 2>&1 &";\
ssh ${SSHOPTS} $$U@$$H "(sudo systemctl stop unattended-upgrades;sleep 30;curl -Ls https://download.newrelic.com/install/newrelic-cli/scripts/install.sh | bash && sudo HTTPS_PROXY=${remote_http_proxy} NEW_RELIC_API_KEY=${NEW_RELIC_API_KEY} NEW_RELIC_ACCOUNT_ID=${NEW_RELIC_ACCOUNT_ID} NEW_RELIC_REGION=EU /usr/local/bin/newrelic install -y && echo New Relic Installed) > .install-newrelic.log 2>&1 &";\
ssh ${SSHOPTS} $$U@$$H "(sudo systemctl stop unattended-upgrades;sleep 30;curl -s https://raw.githubusercontent.com/fluent/fluent-bit/master/install.sh | sh; sudo mv /tmp/fluent-bit.conf /etc/fluent-bit/ && echo 'HOME=/root' | sudo tee /etc/default/fluent-bit && sudo systemctl daemon-reload && sudo systemctl restart fluent-bit && echo Fluent-bit installed) > .install-fluentbit.log 2>&1 &";\
ssh ${SSHOPTS} $$U@$$H "(sleep 3600;sudo systemctl start unattended-upgrades) > .install-reactivate-upgrades.log 2>&1 &";\
fi

cdn-cache-purge:
Expand Down
51 changes: 19 additions & 32 deletions fluent-bit/fluent-bit.conf
Original file line number Diff line number Diff line change
Expand Up @@ -103,37 +103,24 @@
# add the server's hostname to all logs generated
Record hostname ${HOSTNAME}

[OUTPUT]
Name newrelic
Match *
licenseKey <NEW_RELIC_INGEST_KEY>
proxy <HTTPS_PROXY>
endpoint https://log-api.eu.newrelic.com/log/v1
# maxBufferSize 256000
# maxRecords 1024

# [OUTPUT]
# Name s3
# Match *
# bucket <MONITOR_BUCKET>
# region fr-par
# endpoint s3.fr-par.scw.cloud
# total_file_size 50M
# compression gzip
# upload_timeout 60m
# workers 1
# use_put_object On
# s3_key_format /<MONITOR_DIR>/%Y%m%d/%Y%m%d-%H%M_$UUID.jsonl
# Name newrelic
# Match *
# licenseKey <NEW_RELIC_INGEST_KEY>
# proxy <HTTPS_PROXY>
# endpoint https://log-api.eu.newrelic.com/log/v1
# # maxBufferSize 256000
# # maxRecords 1024

# [OUTPUT]
# Name s3
# Match *
# bucket <MONITOR_BUCKET>
# region fr-par
# endpoint s3.fr-par.scw.cloud
# total_file_size 50M
# compression gzip
# upload_timeout 1m
# workers 1
# use_put_object On
# s3_key_format /<MONITOR_DIR>/today/%H%M.jsonl
[OUTPUT]
Name s3
Match *
bucket <MONITOR_BUCKET>
region fr-par
endpoint s3.fr-par.scw.cloud
total_file_size 50M
compression gzip
upload_timeout 1m
workers 1
use_put_object On
s3_key_format /<MONITOR_DIR>/%Y%m%d/%Y%m%d-%H%M_$UUID.jsonl
Loading