Skip to content

Commit

Permalink
[AWS] Add Kinesis Metrics datastream (#3829)
Browse files Browse the repository at this point in the history
  • Loading branch information
legoguy1000 authored Jul 27, 2022
1 parent 5222ef6 commit eb82fe9
Show file tree
Hide file tree
Showing 25 changed files with 2,160 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/aws/_dev/build/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ Visit the page for each individual AWS integration to see details about exported
| ECS | x | |
| ELB | x | x |
| Fargate | x | |
| Kinesis | x | |
| Network Firewall | x | x |
| Lambda | x | |
| NAT Gateway | x | |
Expand Down
7 changes: 7 additions & 0 deletions packages/aws/_dev/build/docs/kinesis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# kinesis

## Metrics

{{event "kinesis"}}

{{fields "kinesis"}}
5 changes: 5 additions & 0 deletions packages/aws/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# newer versions go on top
- version: "1.19.0"
changes:
- description: Add Kinesis metrics datastream
type: enhancement
link: https://github.com/elastic/integrations/pull/3829
- version: "1.18.2"
changes:
- description: Move s3_request metrics config from beats to integrations
Expand Down
75 changes: 75 additions & 0 deletions packages/aws/data_stream/kinesis/agent/stream/stream.yml.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
metricsets: ["cloudwatch"]
period: {{period}}
{{#if access_key_id}}
access_key_id: {{access_key_id}}
{{/if}}
{{#if secret_access_key}}
secret_access_key: {{secret_access_key}}
{{/if}}
{{#if session_token}}
session_token: {{session_token}}
{{/if}}
{{#if credential_profile_name}}
credential_profile_name: {{credential_profile_name}}
{{/if}}
{{#if shared_credential_file}}
shared_credential_file: {{shared_credential_file}}
{{/if}}
{{#if role_arn}}
role_arn: {{role_arn}}
{{/if}}
{{#if endpoint}}
endpoint: {{endpoint}}
{{/if}}
{{#if regions}}
regions:
{{#each regions as |region i|}}
- {{region}}
{{/each}}
{{/if}}
{{#if latency}}
latency: {{latency}}
{{/if}}
{{#if tags_filter}}
tags_filter: {{tags_filter}}
{{/if}}
{{#if proxy_url }}
proxy_url: {{proxy_url}}
{{/if}}
metrics:
- namespace: AWS/Kinesis
resource_type: kinesis
statistic: ["Average"]
name:
- GetRecords.Bytes
- GetRecords.IteratorAgeMilliseconds
- GetRecords.Latency
- IncomingBytes
- IncomingRecords
- PutRecord.Bytes
- PutRecord.Latency
- PutRecord.Success
- PutRecords.Bytes
- PutRecords.Latency
- PutRecords.Success
- ReadProvisionedThroughputExceeded
- SubscribeToShard.RateExceeded
- SubscribeToShard.Success
- SubscribeToShardEvent.Bytes
- SubscribeToShardEvent.MillisBehindLatest
- SubscribeToShardEvent.Success
- WriteProvisionedThroughputExceeded
- OutgoingBytes
- IteratorAgeMilliseconds
- namespace: AWS/Kinesis
resource_type: kinesis
statistic: ["Sum"]
name:
- GetRecords.Records
- GetRecords.Success
- PutRecords.TotalRecords
- PutRecords.SuccessfulRecords
- PutRecords.FailedRecords
- PutRecords.ThrottledRecords
- SubscribeToShardEvent.Records
- OutgoingRecords
238 changes: 238 additions & 0 deletions packages/aws/data_stream/kinesis/fields/agent.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@
- name: cloud
title: Cloud
group: 2
description: Fields related to the cloud or infrastructure the events are coming from.
footnote: 'Examples: If Metricbeat is running on an EC2 host and fetches data from its host, the cloud info contains the data about this machine. If Metricbeat runs on a remote machine outside the cloud and fetches data from a service running in the cloud, the field contains cloud data from the machine the service is running on.'
type: group
fields:
- name: account.id
level: extended
type: keyword
ignore_above: 1024
description: 'The cloud account or organization id used to identify different entities in a multi-tenant environment.
Examples: AWS account id, Google Cloud ORG Id, or other unique identifier.'
example: 666777888999
- name: availability_zone
level: extended
type: keyword
ignore_above: 1024
description: Availability zone in which this host is running.
example: us-east-1c
- name: instance.id
level: extended
type: keyword
ignore_above: 1024
description: Instance ID of the host machine.
example: i-1234567890abcdef0
- name: instance.name
level: extended
type: keyword
ignore_above: 1024
description: Instance name of the host machine.
- name: machine.type
level: extended
type: keyword
ignore_above: 1024
description: Machine type of the host machine.
example: t2.medium
- name: provider
level: extended
type: keyword
ignore_above: 1024
description: Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean.
example: aws
- name: region
level: extended
type: keyword
ignore_above: 1024
description: Region in which this host is running.
example: us-east-1
- name: project.id
type: keyword
description: Name of the project in Google Cloud.
- name: image.id
type: keyword
description: Image ID for the cloud instance.
- name: container
title: Container
group: 2
description: 'Container fields are used for meta information about the specific container that is the source of information.
These fields help correlate data based containers from any runtime.'
type: group
fields:
- name: id
level: core
type: keyword
ignore_above: 1024
description: Unique container id.
- name: image.name
level: extended
type: keyword
ignore_above: 1024
description: Name of the image the container was built on.
- name: labels
level: extended
type: object
object_type: keyword
description: Image labels.
- name: name
level: extended
type: keyword
ignore_above: 1024
description: Container name.
- name: host
title: Host
group: 2
description: 'A host is defined as a general computing instance.
ECS host.* fields should be populated with details about the host on which the event happened, or from which the measurement was taken. Host types include hardware, virtual machines, Docker containers, and Kubernetes nodes.'
type: group
fields:
- name: architecture
level: core
type: keyword
ignore_above: 1024
description: Operating system architecture.
example: x86_64
- name: domain
level: extended
type: keyword
ignore_above: 1024
description: 'Name of the domain of which the host is a member.
For example, on Windows this could be the host''s Active Directory domain or NetBIOS domain name. For Linux this could be the domain of the host''s LDAP provider.'
example: CONTOSO
default_field: false
- name: hostname
level: core
type: keyword
ignore_above: 1024
description: 'Hostname of the host.
It normally contains what the `hostname` command returns on the host machine.'
- name: id
level: core
type: keyword
ignore_above: 1024
description: 'Unique host id.
As hostname is not always unique, use values that are meaningful in your environment.
Example: The current usage of `beat.name`.'
- name: ip
level: core
type: ip
description: Host ip addresses.
- name: mac
level: core
type: keyword
ignore_above: 1024
description: Host mac addresses.
- name: name
level: core
type: keyword
ignore_above: 1024
description: 'Name of the host.
It can contain what `hostname` returns on Unix systems, the fully qualified domain name, or a name specified by the user. The sender decides which value to use.'
- name: os.family
level: extended
type: keyword
ignore_above: 1024
description: OS family (such as redhat, debian, freebsd, windows).
example: debian
- name: os.kernel
level: extended
type: keyword
ignore_above: 1024
description: Operating system kernel version as a raw string.
example: 4.4.0-112-generic
- name: os.name
level: extended
type: keyword
ignore_above: 1024
multi_fields:
- name: text
type: text
norms: false
default_field: false
description: Operating system name, without the version.
example: Mac OS X
- name: os.platform
level: extended
type: keyword
ignore_above: 1024
description: Operating system platform (such centos, ubuntu, windows).
example: darwin
- name: os.version
level: extended
type: keyword
ignore_above: 1024
description: Operating system version as a raw string.
example: 10.14.1
- name: type
level: core
type: keyword
ignore_above: 1024
description: 'Type of host.
For Cloud providers this can be the machine type like `t2.medium`. If vm, this could be the container, for example, or other information meaningful in your environment.'
- name: containerized
type: boolean
description: >
If the host is a container.
- name: os.build
type: keyword
example: "18D109"
description: >
OS build information.
- name: os.codename
type: keyword
example: "stretch"
description: >
OS codename, if any.
- name: cpu.pct
type: scaled_float
format: percent
description: >
Percent CPU used. This value is normalized by the number of CPU cores and it ranges from 0 to 1.
- name: disk.read.bytes
type: long
format: bytes
description: >
The total number of bytes read successfully in a given period of time.
- name: disk.write.bytes
type: long
format: bytes
description: >
The total number of bytes write successfully in a given period of time.
- name: network.in.bytes
type: long
format: bytes
description: >
The number of bytes received on all network interfaces by the host in a given period of time.
- name: network.in.packets
type: long
description: >
The number of packets received on all network interfaces by the host in a given period of time.
- name: network.out.bytes
type: long
format: bytes
description: >
The number of bytes sent out on all network interfaces by the host in a given period of time.
- name: network.out.packets
type: long
description: >
The number of packets sent out on all network interfaces by the host in a given period of time.
20 changes: 20 additions & 0 deletions packages/aws/data_stream/kinesis/fields/base-fields.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
- name: data_stream.type
type: constant_keyword
description: Data stream type.
- name: data_stream.dataset
type: constant_keyword
description: Data stream dataset.
- name: data_stream.namespace
type: constant_keyword
description: Data stream namespace.
- name: '@timestamp'
type: date
description: Event timestamp.
- name: event.module
type: constant_keyword
description: Event module
value: aws
- name: event.dataset
type: constant_keyword
description: Event dataset
value: aws.kinesis
24 changes: 24 additions & 0 deletions packages/aws/data_stream/kinesis/fields/ecs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
- external: ecs
name: cloud
- external: ecs
name: cloud.account.id
- external: ecs
name: cloud.account.name
- external: ecs
name: cloud.availability_zone
- external: ecs
name: cloud.instance.id
- external: ecs
name: cloud.machine.type
- external: ecs
name: cloud.provider
- external: ecs
name: cloud.region
- external: ecs
name: ecs.version
- external: ecs
name: error
- external: ecs
name: error.message
- external: ecs
name: service.type
Loading

0 comments on commit eb82fe9

Please sign in to comment.