简体   繁体   English

Cloudwatch Logs数据发送到kinesis data stream时,它的编码格式是什么

[英]When Cloudwatch Logs data is sent into kinesis data stream, what is its encoding format

I'm trying to write a Go program, to download data from aws kinesis data stream. I read that kinesis data stream encode the data with base64 , so I need first decode with base64 .我正在尝试编写一个 Go 程序,以从 aws 运动数据 stream 下载数据。我读到运动数据 stream 用base64对数据进行编码,所以我需要先用base64解码。 However, I can't figure out what encoding was used on the data as it is passed, from cloudwatch logs to kinesis data stream.但是,我无法弄清楚数据在传递时使用了什么编码,从 cloudwatch 日志到运动数据 stream。

I'm trying the different decoding method but none works.我正在尝试不同的解码方法,但都不起作用。 My unprocessed byte array downloaded from kinesis data stream is as the following:我从kinesis data stream下载的未经处理的字节数组如下:

[31 139 8 0 0 0 0 0 0 0 53 206 65 11 130 64 16 134 225 191 178 204 89 130 178 34 246 22 97 30 178 130 12 58 68 196 166 147 14 233 174 236 140 69 68 255 61 204 58 190 204 7 243 188 160 70 102 83 224 254 217 32 104 88 108 55 251 221 54 57 175 163 52 157 199 17 4 224 30 22 125 119 169 92 155 63 140 100 101 226 10 134 0 42 87 196 222 181 13 104 232 43 21 143 166 238 147 219 11 103 158 26 33 103 151 84 9 122 6 125 60 125 119 209 29 173 116 249 2 202 251 185 80 141 44 166 110 64 15 167 227 201 48 28 79 166 225 108 20 6 127 94 7 56 36 234 199 83 63 158 86 139 18 179 27 217 66 149 104 42 41 149 187 170 28 89 200 154 238 179 90 145 69 38 86 252 165 13 224 125 122 127 0 234 141 66 79 242 0 0 0]

Can someone give me some tips how to process this piece of data?有人可以给我一些如何处理这段数据的提示吗?

You can use a subscription filter with Kinesis, Lambda, or Kinesis Data Firehose.您可以将订阅筛选器与 Kinesis、Lambda 或 Kinesis Data Firehose 结合使用。 Logs that are sent to a receiving service through a subscription filter are base64 encoded and compressed with the gzip format.通过订阅过滤器发送到接收服务的日志采用 base64 编码并使用 gzip 格式压缩。

https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/SubscriptionFilters.html https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/SubscriptionFilters.html

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 当以 JSON 格式记录到 CloudWatch 日志时,时间戳属性的名称是什么?预期格式是什么? - When logging to CloudWatch logs in a JSON format what is the name of the timestamp property and what is the expected format? 使用来自 Kinesis Data Stream 源的 Kinesis Firehose Delivery Stream 将数据写入 S3 时出现问题 - Problem writing data to S3 with Kinesis Firehose Delivery Stream from Kinesis Data Stream source 从运动流中读取数据失败 - Reading data from kinesis stream unsuccessfully 如何将通过 webrtc kinesis stream 接收到的 OPUS 文件中的数据解码为 PCM 格式? - How to decode the data from OPUS files received though the webrtc kinesis stream into PCM format? 从数据 stream (Kinesis) 到 OpenSearch AWS 创建交付 stream (Firehose) - Create delivery stream (Firehose) from data stream (Kinesis) to OpenSearch AWS 如何在不通过 Kinesis Data 的情况下直接将 KPL(Kinesis Producer Library)集成到 Kinesis firehose Stream - How to integrate KPL (Kinesis Producer Library) to Kinesis firehose directly without going through Kinesis Data Stream 通过 Logstash 将日志从 AWS Kinesis 流式传输到 ElasticSearch 时出现编码问题 - Encoding issue when streaming logs from AWS Kinesis to ElasticSearch via Logstash CloudWatch Logs Insights 找不到日志流中存在的数据 - CloudWatch Logs Insights isn't finding data that exists in logstream .NET 上的 AWS Kinesis PutRecordAsync - 我应该使用什么数据格式来发布 IEnumerable<t> ?</t> - AWS Kinesis PutRecordAsync on .NET - what data format should I use to publish IEnumerable<T>? 以 Kinesis Firehose output 格式将 DynamoDB 数据传输到 S3 - DynamoDB data to S3 in Kinesis Firehose output format
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM