For a much easier and more efficient way to collect and send metrics, consider using the Logz.io telemetry collector.
This CloudFormation template allows shipping AWS Logs and Metrics to logz.io.
It will deploy the following projects:
- AWS metrics to Logzio See here the function's repo.
- AWS logs to Logz.io See here the function's repo.
To deploy this integrion, click the button that matches the region you wish to deploy your Stack to:
|The Logz.io listener URL for your region. (For more details, see the regions page. For example - ||Required|
|Your Logz.io metrics shipping token.||Required|
|Comma-separated list of the AWS namespaces you want to monitor. See [this list]((https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html) of namespaces. If you want to automatically add all namespaces, use value ||Required|
|Your Logz.io destination URL.||Required|
|The log type you'll use with this Lambda. This can be a built-in log type, or a custom log type. You should create a new Lambda for each log type you use.||Default: |
|Set to ||Default: |
|Enrich CloudWatch events with custom properties, formatted as ||-|
|The number of seconds that Lambda allows a function to run before stopping it, for the shipper function.||Default: |
|Shipper function's allocated CPU proportional to the memory configured, in MB.||Default: |
|A comma-seperated list of services you want to collect logs from. Supported options are: ||-|
|A comma-seperated list of custom log groups you want to collect logs from||-|
|The amount of seconds that Lambda allows a function to run before stopping it, for the trigger function.||Default: |
|Trigger function's allocated CPU proportional to the memory configured, in MB.||Default: |
|Log level for the Lambda function. Can be one of: ||Default: |
|The length of time, in seconds, that Kinesis Data Firehose buffers incoming data before delivering it to the destination.||Default: |
|The size of the buffer, in MBs, that Kinesis Data Firehose uses for incoming data before delivering it to the destination.||Default: |
AWS limits every log group to have up to 2 subscription filters. If your chosen log group already has 2 subscription filters, the trigger function won't be able to add another one.
If you've used the
services field, you'll have to wait 6 minutes before creating new log groups for your chosen services. This is due to cold start and custom resource invocation, that can cause the cause Lambda to behave unexpectedly.
Check Logz.io for your metrics
Give your data some time to get from your system to ours, then log in to your Logz.io Metrics account, and open the Logz.io Metrics tab.