Ingest CloudWatch Logs Using AWS Firehose
This feature is only available for enterprise plan and, at this stage, requires public ingress endpoint enabled.
To be able to view your CloudWatch logs in the groundcover platform's Logs section, together with all other logs, and leverage the advanced capabilities of the platform to slice and dice your data, you'll need to follow these steps:
Setup a Firehose stream
Go to Amazon Data Firehose.
Click on Create Firehose stream
Source:
Direct PUT
Destination:
HTTP Endpoint
Create a name for your stream, for example
PUT-Groundcover-logs
Destination settings:
HTTP endpoint URL: Firehose logs endpoint, fetched using these docs
Access key: groundcover API token, fetching using these docs
Content encoding:
GZIP
Parameters:
env_name
- Specify yourEnvironment
name, it will show up in this environment in the application
Backup settings:
Choose a backup bucket, or create a new one.
Click Create Firehose stream
Create an IAM role and policy
Go to Amazon IAM
Click on Roles in the side bar
Click on Create Role
Select Custom trust policy
Paste the following policy:
Click on Next twice (we'll attach permissions later)
Provide a name for the role
Click on Create Role
Go to your newly created role
In the Permissions section, click on Add permissions and then Create inline policy
Click on JSON and paste the following:
Click on Next
Give the policy a name
Click on Create Policy
Create a subscription filter
Now that we're all set up, we can add a subscription filter to the desired log group in CloudWatch. Using CLI
The following is an example of how to create a subscription filter through the AWS CLI:
Using AWS Console
Go to the specific log group in CloudWatch and click on the Subscription filters tab.
Click on Create
Select Create Amazon Data Firehose subscription filter
Select the Firehose delivery stream created in the previous steps, as well as the IAM role.
Fill Configure log format and filters as you need.
Choose a name for the subscription filter, then click Start streaming.
Last updated