Skip to content

Instantly share code, notes, and snippets.

@tylerflint
Created September 26, 2018 20:09
Show Gist options
  • Save tylerflint/422ac2d29f6e7fffe43a463ac63c7df8 to your computer and use it in GitHub Desktop.
Save tylerflint/422ac2d29f6e7fffe43a463ac63c7df8 to your computer and use it in GitHub Desktop.
Nanobox external logdrains
# papertrail
# export LOGGER_TOKEN=(from /etc/logvac/config.json)
# export APP=app-name
# export ENDPOINT=logs7.papertrailapp.com:16810
curl -k -v -X POST -H "X-Auth-Token: $LOGGER_TOKEN" https://127.0.0.1:6361/drains -d '{"type": "papertrail", "id": "${APP}", "endpoint": "${ENDPOINT}"}'
# datadog
# export LOGGER_TOKEN=(from /etc/logvac/config.json)
# export APP=app-name
# export KEY=(from dashboard)
curl -k -v -X POST -H "X-Auth-Token: $LOGGER_TOKEN" https://127.0.0.1:6361/drains -d '{"type": "datadog", "id": "${APP}", "key": "${KEY}"}'
@laruche
Copy link

laruche commented Dec 19, 2018

how you can execute this script from you boxfile configuration ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment