All Apps and Add-ons

Kinesis error when consuming from cloudwatch logs queue

Jeremiah
Motivator

Has anyone had success with connecting Kinesis to Cloudwatch logs to pull data into Splunk? I've used the Kinesis modular input to pull other events, but when using the new Cloudwatch logs subscription feature, the Kinesis modular input returns an error for every event in the queue:

07-02-2015 11:13:26.029 -0700 ERROR ExecProcessor - message from "python /local/mnt/splunk/stage/splunk/etc/apps/kinesis_ta/bin/kinesis.py" Couldn't process record {SequenceNumber:     49552014282308283371136136273926985644062839320977866754,Data: java.nio.HeapByteBuffer[pos=1 lim=782 cap=782],PartitionKey: 035694369293:PiwikAccessLogs:awspiwikstg02.qualcomm.com}. Skipping the record.
07-02-2015 11:13:33.237 -0700 ERROR ExecProcessor - message from "python /local/mnt/splunk/stage/splunk/etc/apps/kinesis_ta/bin/kinesis.py" Malformed data: null
07-02-2015 11:13:33.238 -0700 ERROR ExecProcessor - message from "python /local/mnt/splunk/stage/splunk/etc/apps/kinesis_ta/bin/kinesis.py" java.nio.charset.MalformedInputException: Input length = 1

Using the AWS cli, we can consume these messages, and they are definitely not null. And if we push a message onto the same queue from the cli, that works and is consumed just fine in Splunk using the modular input.

0 Karma

Damien_Dallimor
Ultra Champion

Presumably it must be something to do with the way Cloudwatch writes data to Kinesis , that essentially means you have to use an actual Cloudwatch client (rather than trying to sneak in the backdoor and hit the underlying Kinesis queues directly)

0 Karma

Jeremiah
Motivator

I agree it must be something to do with the way that Cloudwatch writes the data, but this is not hitting the underlying kinesis queues. This is using a new feature of CWL called subscriptions, that writes the CWL entries to a kinesis queue specifically so you can consume the logs with other applications.

0 Karma

Jeremiah
Motivator

It looks like the reason for the error is that the CWL events in kinesis are encoded and compressed:

http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/Subscriptions.html

"The Data attribute in the Amazon Kinesis record is Base64 encoded and compressed with the gzip format"

0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...