Configure Kinesis Agent for Windows – Configuration

In my previous post I was talking about Kinesis Agent for Windows, and why it is kind of better than CloudWatch Agent.
I explained how to get the Agent installed on Windows OS.

Now we came to a second part, and that is the configuration. I have mentioned that Kinesis Agent for Windows OS has appsettings.json file, and that in this file you can configure custom metrics, and also filter out which logs you want to send to CloudWatch Log Group.

appsettings.json file consists of four sections:
– Sources
– Sinks
– Pipes
– Plugins

Under Sources you define which Event IDs you want to look for in Event Viewer, and also custom metrics.

Under Sinks, you define the Sink Type, the name of the group in CloudWatch Log Groups, Region, name of the stream, and format:

Under Pipes, you define the source and sink reference:

Under Plugins, you define the update interval, and the S3 bucket where you will keep the appsettings.json file:

When you install Kinesis Agent for Windows OS for the first time, you will have to manually copy the appsettings.json file into the following repo:
C:\Program Files\Amazon\AWSKinesisTap

Once you do that, you need to restart the AWS Kinesis Tap Agent service. It will take some time until the Agent starts picking up the metrics and logs. So be patient.

You can monitor the AWS Kinesis Log file, which is located in:

Best way is just to open Powershell and monitor there by running the following command:

If you go to CloudWatch Log Group, you should see the Log group created:

Instance should be in the Log Group, specified as a stream.
Under Metrics, you should see the metrics if you search by specifying instance ID:

All this works as expected if you have configured VPC Interface Endpoint for Kinesis and CloudWatch. If you don’t have these endpoints created, and your instances are in the private subnet without access to the Internet, they would not be able to reach to a public CloudWatch Endpoint.
If this is the case, you must configure Kinesis Agent for Windows OS with the proxy.
Otherwise, the Kinesis Agent for Windows OS service will not start.

The way how to do this is the following:
1. Navigate to C:\Program Files\Amazon\AWSKinesisTap\
2. Open AWSKinesisTap.exe.config file in text editor of your choice

Insert the following at the beginning of the config file:

    <section name="aws" type="Amazon.AWSSection, AWSSDK.Core"/>
  port="3128" />

Replace the proxy with your actual proxy, should look like this:

I would suggest to type in, not copy paste.

When you do all of this, try to start the service. If configured properly, service should start without any issues.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close Bitnami banner