...
Setup AWS Kinesis Firehose
...
In the account that emits the metrics, in the Kinesis Firehose AWS console
...
, create a new delivery stream.
Note |
---|
You should not use the same Firehose for logs and metrics. |
Select
Direct PUT
as the sourceSelect
HTTP Endpoint
as the destinationIn the destination settings, use the external facing endpoint of the Kfuse cluster and provide the following URL.
https://<external facing endpoint of Kfuse cluster>/ingester/kinesis/metrics
Optionally use the “access token key” if needed.
In the Content encoding section, select
GZIP
Provide an existing S3 bucket or create a new one for storing Kinesis records as a backup. The default of only backing up failed data should suffice.
Change the name of the stream if necessary.
Setup AWS CloudWatch Metrics Stream
...
In the account that emits the metrics, in the Cloudwatch AWS console
...
, in the Metrics section on the left side of the console, select Streams
and create a metric stream
Select the metric namespaces to send to the stream (default is all metrics)
In the configuration section,
Select an existing Firehose owned by your account
and select the previously created Kinesis Firehose.Under
Change Output Format
Make sure to selectJSON
for the output format. Kfuse currently only supports JSON format.Change the name of the stream if necessary.
Enable AutoScaling Group Metrics
In the account that emits the metrics,
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/, and choose Auto Scaling Groups from the navigation pane.
Select the check box next to your Auto Scaling group.
A split pane opens up at the bottom of the page.
On the Monitoring tab, select the Auto Scaling group metrics collection, Enable the check box located at the top of the page under Auto Scaling.
Enable Collection of Request Metrics in S3
...
In the account where you installed Klouduse to capture the metrics, follow the instructions to enable the collection of request metrics for S3:
...
https://docs.aws.amazon.com/AmazonS3/latest/userguide/configure-request-metrics-bucket.html
Enable Enrichment of AWS Metrics
In the account where you installed Klouduse to capture the metrics, perform these steps.
The metrics sent by AWS CloudWatch to the Kinesis Firehose only include minimal labels. Kloudfuse supports attaching more labels (and also user-defined custom tags from the AWS console) to the ingested metrics. This is done by scraping AWS.
...
Setup AWS Kinesis Firehose
Note that a different Firehose is needed In the account that emits the logs, in the Kinesis Firehose AWS console, create another Firehose delivery stream for logs.
...
Note |
---|
You should not use the same Firehose for logs and metrics. |
Select
Direct PUT
as the sourceSelect
HTTP Endpoint
as the destinationIn the destination settings, use the external facing endpoint of the Kfuse cluster and provide the following URL.
https://<external facing endpoint of Kfuse cluster>/ingester/kinesis/logs
Optionally use the “access token key” if needed
In the Content encoding section, select
GZIP
Provide an existing S3 bucket or create a new one for storing Kinesis records as a backup. The default of only backing up failed data should suffice.
Create IAM Role to allow CloudWatch Logs to write to Kinesis Firehose
...
In the account that emits the logs, in the IAM AWS Console
...
, under Roles
, select Create Role
Select
Custom Trust Policy
and Add the following (replace the region and AWS account accordingly):Code Block { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "logs.<region>.amazonaws.com" }, "Action": "sts:AssumeRole", "Condition": { "StringLike": { "aws:SourceArn": "arn:aws:logs:<region>:<aws account number>:*" } } } ] }
Click
Next
to go toAdd Permissions page
and selectCreate Policy
(This will open a new window).Select
JSON
and add the following (Note the following allows all firehose in the same account. Adjust accordingly if only adding permission to a specific firehose):Code Block { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "firehose:*" ], "Resource": [ "arn:aws:firehose:<region>:<aws account number>:*" ] } ] }
Go back to the roles page and select the created permissions policy. Click “Create Role”.
Name and create the new role.
Setup CloudWatch logs subscriptions
...
In the account that emits the logs, in the Cloudwatch AWS console
...
, perform these steps:
Navigate to the Logs section on the left side of the console, and select
Log Groups
.Go to the Log group that will be sent to the Kinesis Firehose.
Go to
Actions
→Subscription Filters
→Create Kinesis Firehose subscription filter
In the
Kinesis Firehose delivery stream
section, select the previously created Kinesis Firehose for Logs.In the
Grant Permission
section, select the previously created role.Provide a
Subscription filter pattern
(or leave it blank if streaming everything)Provide
Subscription filter name
(required step, can be anything)Select
Start Streaming
Enable Enrichment of AWS Logs
In the account where you installed Klouduse to capture the logs, perform these steps.
Similar to CloudWatch metrics, CloudWatch logs sent to the Kinesis Firehose only include minimal labels. Kloudfuse supports attaching user-defined custom tags of log groups to the ingested logs. This is done by scraping AWS.
...