Auth0 Logs to CloudWatch
The Auth0 Logs to CloudWatch extension is a scheduled job that exports your Auth0 logs to CloudWatch. Amazon CloudWatch is a monitoring and management service built for developers, system operators, site reliability engineers (SRE), and IT managers.
Configure the Extension
To install and configure this extension, click on the Auth0 Logs to CloudWatch 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 amount of logs to be read on each execution. Maximun, and default, is
|START_FROM||The checkpoint ID of the log from where you want to start.|
|SLACK_INCOMING_WEBHOOK||The Slack incoming webhook URL used to send relevant updates.|
|SLACK_SEND_SUCCESS||Toggle for sending verbose notifications to Slack.|
|LOG_LEVEL||The minimal log level of events that you would like sent to CloudWatch.|
|LOG_TYPES||The events for which logs should be exported.|
|CloudWatch log group name, created in CloudWatch.|
|CloudWatch log stream name.|
|AWS access key ID|
|AWS secret key|
|Your AWS region|
Extension requires these AWS permissions in order to send logs to CloudWatch:
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.
Use the Extension
You can monitor activity by logging into the extension. There you can find reports on most recent runs. Reports contains amount of logs processed and errors, if any.
In the event of a CloudWatch failure or service interruption you can replay the logs starting from the failed log.
To replay logs:
- Get the checkpoint ID of the failed log.
- Go to the Auth0 Logs to CloudWatch extension settings.
- Enter the checkpoint in the START_FROM field.
- Click the Save button to replay the failed logs.
The extension sends failed transaction notifications to Slack with the checkpoint code displayed in the message. You can also enable verbose notifications by turning on the