Auth0 Logs to Papertrail
The Auth0 Logs to Papertrail is a scheduled job that takes all of your Auth0 logs and exports them to Papertrail.
Configuring the Extension
To install and configure this extension, click on the Auth0 Logs to Papertrail box in the list of provided extensions on the Extensions page of the Management Portal. The Install Extension window pops open.
At this point, you should set the following configuration variables:
- Schedule: The frequency with which logs should be exported. The schedule can be customized even further after creation.
- BATCH_SIZE: The number of logs per batch (up to a maximum of 100). Note that logs are batched before sending, with multiple batches sent each time the extension runs.
- START_FROM: The Checkpoint ID of the log from which you want the extension to start sending.
- SLACK_INCOMING_WEBHOOK_URL: The Incoming Webhook URL used to report statistics and events to your Slack account/channel.
- SLACK_SEND_SUCCESS: If yes, enables verbose notifications to Slack. Useful for troubleshooting.
- LOG_LEVEL: The minimal log level of events that you would like sent to Papertrail.
- LOG_TYPES: The events for which logs should be exported.
- PAPERTRAIL_HOST: The destination hostname for your logs.
- PAPERTRAIL_PORT: The destination port for your logs.
- PAPERTRAIL_SYSTEM: The destination system for your logs.
Once you have provided this information, click the Install button to finish installing the extension.
When setting your BATCH_SIZE, please keep the following information in mind.
During each time frame/window (defined by your chosen Schedule), outstanding logs will be batched into groups and sent. The size of each group is determined by the BATCH_SIZE value.
In other words, during each window,
NUM_BATCHES batches of logs will be sent based on the following logic:
IF (NUM_LOGS modulo 100 == 0): NUM_BATCHES = (NUM_LOGS / BATCH_SIZE) ELSE: NUM_BATCHES = (NUM_LOGS / BATCH_SIZE) + 1
ELSE case, the last batch will have < 100 logs.
Retrieve the required information from Papertrail
To configure a new system for Auth0 logs and acquire the PAPERTRAIL_HOST and PAPERTRAIL_PORT information:
- Login to Papertrail. You'll be directed to the quick start and tour page.
- Click the Add your first system button.
You'll get redirected again, and at the top of the page, you will see a message that says something like Your logs will go to logs4.papertrailapp.com:12345 and appear in Events.. The log destination displayed is where your logs will go. The log and port information map to the PAPERTRAIL_HOST (i.e.,
logs4.papertrailapp.com) and PAPERTRAIL_PORT (i.e.,
12345) variables Auth0 asked for, respectively.
Per Papertrail, "no explicit configuration is required...just start sending logs. When Papertrail receives a message from a hostname that is not already present in your account, the system will be automatically added."
Using Your Installed Extension
To view all scheduled jobs, navigate to the Extensions page of the Management Portal, click on the Installed Extensions link, and select the Auth0 Logs to Papertrail line. There you can see the job you just created, modify its state by toggling the State switch, see when the next run is due and what was the result of the last execution.
You can view more details by clicking on the job you created. In this page, you can view details for each execution, reschedule, access realtime logs, and more.