AWS CloudFormation
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.
Instructions
To deploy this integrion, click the button that matches the region you wish to deploy your stack to:
Parameter | Description | Required/Default |
---|---|---|
logzioLogsToken | Replace <<SHIPPING-TOKEN>> with the token of the account you want to ship to. | Required |
logzioListener | The Logz.io listener URL for your region. For more details, see the regions page. For example - https://listener.logz.io:8053 | Required |
logzioMetricsToken | Your Logz.io metrics shipping token. | Required |
awsNamespaces | Comma-separated list of the AWS namespaces you want to monitor. See this list of namespaces. If you want to automatically add all namespaces, use value all-namespaces . | Required |
logzioMetricsDestination | Your Logz.io destination URL. | Required |
logzioLogsType | 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: logzio_cloudwatch_lambda |
logzioLogsFormat | json or text . If json , the Lambda function will attempt to parse the message field as JSON and populate the event data with the parsed fields. | Default: text |
logzioLogsCompress | Set to true to compress logs before sending them. Set to false to send uncompressed logs. | Default: true |
logzioLogsEnrich | Enrich CloudWatch events with custom properties, formatted as key1=value1;key2=value2 . | - |
shipperLambdaTimeout | The number of seconds that Lambda allows a function to run before stopping it, for the shipper function. | Default: 60 |
shipperLambdaMemory | Shipper function's allocated CPU proportional to the memory configured, in MB. | Default: 512 |
services | A comma-seperated list of services you want to collect logs from. Supported options are: apigateway , rds , cloudhsm , cloudtrail , codebuild , connect , elasticbeanstalk , ecs , eks , aws-glue , aws-iot , lambda , macie , amazon-mq . | - |
customLogGroups | A comma-seperated list of custom log groups you want to collect logs from | - |
triggerLambdaTimeout | The amount of seconds that Lambda allows a function to run before stopping it, for the trigger function. | Default: 60 |
triggerLambdaMemory | Trigger function's allocated CPU proportional to the memory configured, in MB. | Default: 512 |
triggerLambdaLogLevel | Log level for the Lambda function. Can be one of: debug , info , warn , error , fatal , panic | Default: info |
httpEndpointDestinationIntervalInSeconds | The length of time, in seconds, that Kinesis Data Firehose buffers incoming data before delivering it to the destination. | Default: 60 |
httpEndpointDestinationSizeInMBs | The size of the buffer, in MBs, that Kinesis Data Firehose uses for incoming data before delivering it to the destination. | Default: 5 |
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.