Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Metricbeat] [AWS] Add DynamoDB AWS light module #15097

Merged
merged 13 commits into from
Jan 14, 2020
6 changes: 6 additions & 0 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -1586,6 +1586,12 @@ type: object

--

[float]
=== dynamodb

`dynamodb` contains the metrics that were scraped from AWS CloudWatch which contains monitoring metrics sent by AWS DynamoDB.


[float]
=== ebs

Expand Down
4 changes: 4 additions & 0 deletions metricbeat/docs/modules/aws.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ The following metricsets are available:

* <<metricbeat-metricset-aws-cloudwatch,cloudwatch>>

* <<metricbeat-metricset-aws-dynamodb,dynamodb>>

* <<metricbeat-metricset-aws-ebs,ebs>>

* <<metricbeat-metricset-aws-ec2,ec2>>
Expand All @@ -175,6 +177,8 @@ include::aws/billing.asciidoc[]

include::aws/cloudwatch.asciidoc[]

include::aws/dynamodb.asciidoc[]

include::aws/ebs.asciidoc[]

include::aws/ec2.asciidoc[]
Expand Down
24 changes: 24 additions & 0 deletions metricbeat/docs/modules/aws/dynamodb.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
////
This file is generated! See scripts/mage/docs_collector.go
////

[[metricbeat-metricset-aws-dynamodb]]
=== aws dynamodb metricset

beta[]

include::../../../../x-pack/metricbeat/module/aws/dynamodb/_meta/docs.asciidoc[]

This is a default metricset. If the host module is unconfigured, this metricset is enabled by default.

==== Fields

For a description of each field in the metricset, see the
<<exported-fields-aws,exported fields>> section.

Here is an example document generated by this metricset:

[source,json]
----
include::../../../../x-pack/metricbeat/module/aws/dynamodb/_meta/data.json[]
----
3 changes: 2 additions & 1 deletion metricbeat/docs/modules_list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ This file is generated! See scripts/mage/docs_collector.go
|<<metricbeat-module-appsearch,App Search>> beta[] |image:./images/icon-no.png[No prebuilt dashboards] |
.1+| .1+| |<<metricbeat-metricset-appsearch-stats,stats>> beta[]
|<<metricbeat-module-aws,aws>> |image:./images/icon-yes.png[Prebuilt dashboards are available] |
.11+| .11+| |<<metricbeat-metricset-aws-billing,billing>> beta[]
.12+| .12+| |<<metricbeat-metricset-aws-billing,billing>> beta[]
|<<metricbeat-metricset-aws-cloudwatch,cloudwatch>>
|<<metricbeat-metricset-aws-dynamodb,dynamodb>> beta[]
|<<metricbeat-metricset-aws-ebs,ebs>>
|<<metricbeat-metricset-aws-ec2,ec2>>
|<<metricbeat-metricset-aws-elb,elb>> beta[]
Expand Down
Empty file.
52 changes: 52 additions & 0 deletions x-pack/metricbeat/module/aws/dynamodb/_meta/docs.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
The `dynamodb` metricset of aws module allows you to monitor your AWS SNS topic. `dynamodb` metricset fetches a set of values from
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/metrics-dimensions.html[Amazon DynamoDB Metrics].
For all other DynamoDB metrics, the aggregation granularity is five minutes.

[float]
=== Configuration example
[source,yaml]
----
- module: aws
period: 300s
metricsets:
- sns
kaiyan-sheng marked this conversation as resolved.
Show resolved Hide resolved
# This module uses the aws cloudwatch metricset, all
# the options for this metricset are also available here.
----

[float]
=== Metrics
Please see more details for each metric in
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/metrics-dimensions.html[Amazon DynamoDB Metrics].

|===
|Metric Name|Statistic Method
|SuccessfulRequestLatency | Average
|OnlineIndexPercentageProgress | Average
|ProvisionedWriteCapacityUnits | Average
|ProvisionedReadCapacityUnits | Average
|ConsumedReadCapacityUnits | Average
|ConsumedWriteCapacityUnits | Average
|ReplicationLatency | Average
|TransactionConflict | Average
|AccountProvisionedReadCapacityUtilization | Average
|AccountProvisionedWriteCapacityUtilization | Average
|SystemErrors | Sum
|ConsumedReadCapacityUnits | Sum
|ConsumedWriteCapacityUnits | Sum
|ConditionalCheckFailedRequests | Sum
|PendingReplicationCount | Sum
|TransactionConflict | Sum
|ReadThrottleEvents | Sum
|ThrottledRequests | Sum
|WriteThrottleEvents | Sum
|SuccessfulRequestLatency | Maximum
|ReplicationLatency | Maximum
|AccountMaxReads | Maximum
|AccountMaxTableLevelReads | Maximum
|AccountMaxTableLevelWrites | Maximum
|AccountMaxWrites | Maximum
|MaxProvisionedTableReadCapacityUtilization | Maximum
|MaxProvisionedTableWriteCapacityUtilization | Maximum
|===

6 changes: 6 additions & 0 deletions x-pack/metricbeat/module/aws/dynamodb/_meta/fields.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- name: dynamodb
type: group
description: >
`dynamodb` contains the metrics that were scraped from AWS CloudWatch which contains monitoring metrics sent by AWS DynamoDB.
release: beta
fields:
24 changes: 24 additions & 0 deletions x-pack/metricbeat/module/aws/dynamodb/dynamodb_integration_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.

// +build integration

package dynamodb

import (
"testing"

mbtest "github.com/elastic/beats/metricbeat/mb/testing"
"github.com/elastic/beats/x-pack/metricbeat/module/aws/mtest"
)

func TestData(t *testing.T) {
config, info := mtest.GetConfigForTest("dynamodb", "300s")
if info != "" {
t.Skip("Skipping TestData: " + info)
}

metricSet := mbtest.NewFetcher(t, config)
metricSet.WriteEvents(t, "/")
}
21 changes: 21 additions & 0 deletions x-pack/metricbeat/module/aws/dynamodb/dynamodb_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.

package dynamodb

import (
"os"

"github.com/elastic/beats/metricbeat/mb"

// Register input module and metricset
_ "github.com/elastic/beats/x-pack/metricbeat/module/aws"
_ "github.com/elastic/beats/x-pack/metricbeat/module/aws/cloudwatch"
)

func init() {
// To be moved to some kind of helper
os.Setenv("BEAT_STRICT_PERMS", "false")
mb.Registry.SetSecondarySource(mb.NewLightModulesSource("../../../module"))
}
42 changes: 42 additions & 0 deletions x-pack/metricbeat/module/aws/dynamodb/manifest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
default: true
input:
module: aws
metricset: cloudwatch
defaults:
metrics:
- namespace: AWS/DynamoDB
statistic: ["Average"]
kaiyan-sheng marked this conversation as resolved.
Show resolved Hide resolved
name:
- SuccessfulRequestLatency
- OnlineIndexPercentageProgress
- ProvisionedWriteCapacityUnits
- ProvisionedReadCapacityUnits
- ConsumedReadCapacityUnits
- ConsumedWriteCapacityUnits
- ReplicationLatency
- TransactionConflict
- AccountProvisionedReadCapacityUtilization
- AccountProvisionedWriteCapacityUtilization
- namespace: AWS/DynamoDB
statistic: ["Sum"]
name:
- SystemErrors
- ConsumedReadCapacityUnits
- ConsumedWriteCapacityUnits
- ConditionalCheckFailedRequests
- PendingReplicationCount
- TransactionConflict
- ReadThrottleEvents
- ThrottledRequests
- WriteThrottleEvents
- namespace: AWS/DynamoDB
statistic: ["Maximum"]
name:
- SuccessfulRequestLatency
- ReplicationLatency
- AccountMaxReads
- AccountMaxTableLevelReads
- AccountMaxTableLevelWrites
- AccountMaxWrites
- MaxProvisionedTableReadCapacityUtilization
- MaxProvisionedTableWriteCapacityUtilization
2 changes: 1 addition & 1 deletion x-pack/metricbeat/module/aws/fields.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions x-pack/metricbeat/module/aws/module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ metricsets:
- usage
- billing
- sns
- dynamodb