Skip to content

Instantly share code, notes, and snippets.

@tylerflint
Created September 26, 2018 20:09
Show Gist options
  • Select an option

  • Save tylerflint/422ac2d29f6e7fffe43a463ac63c7df8 to your computer and use it in GitHub Desktop.

Select an option

Save tylerflint/422ac2d29f6e7fffe43a463ac63c7df8 to your computer and use it in GitHub Desktop.

Revisions

  1. tylerflint created this gist Sep 26, 2018.
    11 changes: 11 additions & 0 deletions drains.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    # 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}"}'