CloudWatch Logs
Kubemq cloudwatch-logs target connector allows services using kubemq server to access aws cloudwatch-logs service.

Prerequisites

The following required to run the aws-cloudwatch-logs target connector:
  • kubemq cluster
  • aws account with cloudwatch-logs active service
  • some action will need cloudwatch-logs permission (IAM User)
  • kubemq-source deployment

Configuration

cloudwatch-logs target connector configuration properties:
Properties Key
Required
Description
Example
aws_key
yes
aws key
aws key supplied by aws
aws_secret_key
yes
aws secret key
aws secret key supplied by aws
region
yes
region
aws region
token
no
aws token ("default" empty string
aws token
Example:
1
bindings:
2
- name: kubemq-query-aws-cloudwatch-logs
3
source:
4
kind: kubemq.query
5
name: kubemq-query
6
properties:
7
address: "kubemq-cluster:50000"
8
client_id: "kubemq-query-aws-cloudwatch-logs"
9
auth_token: ""
10
channel: "query.aws.cloudwatch.logs"
11
group: ""
12
auto_reconnect: "true"
13
reconnect_interval_seconds: "1"
14
max_reconnects: "0"
15
target:
16
kind: aws.cloudwatch.logs
17
name: aws-cloudwatch-logs
18
properties:
19
aws_key: "id"
20
aws_secret_key: 'json'
21
region: "region"
22
token: ""
Copied!

Usage

Create log Stream

create a new log stream
Create log Stream:
Metadata Key
Required
Description
Possible values
method
yes
type of method
"create_log_event_stream"
log_stream_name
yes
aws log stream name
"string"
log_group_name
yes
aws log group name
"string"
Example:
1
{
2
"metadata": {
3
"method": "create_log_event_stream",
4
"log_stream_name": "my_stream_name",
5
"log_group_name": "my_group_name"
6
},
7
"data": null
8
}
Copied!

Describe log Stream

describe a selected log stream by group_name
Describe log Stream:
Metadata Key
Required
Description
Possible values
method
yes
type of method
"describe_log_event_stream"
log_group_name
yes
aws log group name
"string"
Example:
1
{
2
"metadata": {
3
"method": "describe_log_event_stream",
4
"log_group_name": "my_group_name"
5
},
6
"data": null
7
}
Copied!

Delete log Stream

delete log stream
Delete log Stream:
Metadata Key
Required
Description
Possible values
method
yes
type of method
"delete_log_event_stream"
log_stream_name
yes
aws log stream name
"string"
log_group_name
yes
aws log group name
"string"
Example:
1
{
2
"metadata": {
3
"method": "delete_log_event_stream",
4
"log_stream_name": "my_stream_name",
5
"log_group_name": "my_group_name"
6
},
7
"data": null
8
}
Copied!

Get log Event

get log event
Get log Stream:
Metadata Key
Required
Description
Possible values
method
yes
type of method
"get_log_event"
log_stream_name
yes
aws log stream name
"string"
log_group_name
yes
aws log group name
"string"
Example:
1
{
2
"metadata": {
3
"method": "get_log_event",
4
"log_stream_name": "my_stream_name",
5
"log_group_name": "my_group_name"
6
},
7
"data": null
8
}
Copied!

Create Log Event Group

create a new log event group
Create Log Event Group:
Metadata Key
Required
Description
Possible values
method
yes
type of method
"create_log_group"
log_group_name
yes
aws log group name
"string"
data
no
aws tags
key value pair string string
Example:
1
{
2
"metadata": {
3
"method": "create_log_group",
4
"log_group_name": "my_group_name"
5
},
6
"data": null
7
}
Copied!

Put Log

put a log in log stream
Put Log Event:
Metadata Key
Required
Description
Possible values
method
yes
type of method
"put_log_event"
log_stream_name
yes
aws log stream name
"string"
log_group_name
yes
aws log group name
"string"
sequence_token
yes
aws stream sequence token
"string"
data
yes
key value pair of int-string int-time - string-Message
"string"
Example:
1
{
2
"metadata": {
3
"method": "put_log_event",
4
"log_group_name": "my_group_name",
5
"sequence_token": "my_token_from_aws"
6
},
7
"data": "eyIxNTk3MjM1NTU4NTEyIjoibXkgZmlyc3QgbWVzc2FnZSB0byBzZW5kIiwiMTU5NzIzNTU1ODUyNyI6Im15IHNlY29uZCBtZXNzYWdlIHRvIHNlbmQifQ=="
8
}
Copied!

Describe Log Event Group

describe log event group
Describe Log Event Group:
Metadata Key
Required
Description
Possible values
method
yes
type of method
"describe_log_group"
log_group_prefix
yes
aws log group prefix
"string"
Example:
1
{
2
"metadata": {
3
"method": "describe_log_group",
4
"log_group_name": "my_group_name"
5
},
6
"data": null
7
}
Copied!

Delete Log Event Group

delete log event group
Delete Log Event Group:
Metadata Key
Required
Description
Possible values
method
yes
type of method
"delete_log_group"
log_group_name
yes
aws log group name
"string"
Example:
1
{
2
"metadata": {
3
"method": "delete_log_group",
4
"log_group_name": "my_group_name"
5
},
6
"data": null
7
}
Copied!
Last modified 11mo ago