From 0a065f52a6b748cf9dc5fbe680b11ac76f2723c1 Mon Sep 17 00:00:00 2001 From: kaiyan-sheng Date: Wed, 28 Aug 2019 12:56:52 -0600 Subject: [PATCH] [Docs] Fix aws-credentials-config link (#13335) * Fix aws-credentials-config link * Add indentation for aws-credentials-examples.asciidoc --- filebeat/docs/aws-credentials-examples.asciidoc | 8 +++++--- metricbeat/docs/aws-credentials-examples.asciidoc | 8 +++++--- metricbeat/docs/modules/aws.asciidoc | 6 ++++-- x-pack/metricbeat/module/aws/_meta/docs.asciidoc | 6 ++++-- .../metricbeat/module/aws/cloudwatch/_meta/docs.asciidoc | 2 +- 5 files changed, 19 insertions(+), 11 deletions(-) diff --git a/filebeat/docs/aws-credentials-examples.asciidoc b/filebeat/docs/aws-credentials-examples.asciidoc index 765dd3ffb4c..9921a5bc665 100644 --- a/filebeat/docs/aws-credentials-examples.asciidoc +++ b/filebeat/docs/aws-credentials-examples.asciidoc @@ -1,4 +1,5 @@ -* Use AWS credentials in filebeat configuration +* Use AWS credentials in Filebeat configuration ++ [source,yaml] ---- filebeat.inputs: @@ -8,9 +9,9 @@ filebeat.inputs: secret_access_key: '' session_token: '' ---- - ++ or - ++ [source,yaml] ---- filebeat.inputs: @@ -22,6 +23,7 @@ filebeat.inputs: ---- * Use shared AWS credentials file ++ [source,yaml] ---- filebeat.inputs: diff --git a/metricbeat/docs/aws-credentials-examples.asciidoc b/metricbeat/docs/aws-credentials-examples.asciidoc index d648e9f100b..c9fccb12aa9 100644 --- a/metricbeat/docs/aws-credentials-examples.asciidoc +++ b/metricbeat/docs/aws-credentials-examples.asciidoc @@ -1,3 +1,5 @@ +* Use AWS credentials in Metricbeat configuration ++ [source,yaml] ---- metricbeat.modules: @@ -9,9 +11,9 @@ metricbeat.modules: secret_access_key: '' session_token: '' ---- - ++ or - ++ [source,yaml] ---- metricbeat.modules: @@ -25,7 +27,7 @@ metricbeat.modules: ---- * Use shared AWS credentials file - ++ [source,yaml] ---- metricbeat.modules: diff --git a/metricbeat/docs/modules/aws.asciidoc b/metricbeat/docs/modules/aws.asciidoc index c5143551b9e..973037f3057 100644 --- a/metricbeat/docs/modules/aws.asciidoc +++ b/metricbeat/docs/modules/aws.asciidoc @@ -6,6 +6,8 @@ This file is generated! See scripts/mage/docs_collector.go [role="xpack"] == aws module +:libbeat-xpack-dir: ../../../x-pack/libbeat + This module periodically fetches monitoring metrics from AWS Cloudwatch using https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html[GetMetricData API] for AWS services. Note: extra AWS charges on GetMetricData API requests will be generated by this module. @@ -18,7 +20,7 @@ The default metricsets are `ec2`, `sqs`, `s3_request`, `s3_daily_storage`, `clou The `aws` module requires AWS credentials configuration in order to make AWS API calls. Users can either use `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` and/or `AWS_SESSION_TOKEN`, or use shared AWS credentials file. -Please see <> for more details. +Please see <> for more details. This module also accepts optional configuration `regions` to specify which AWS regions to query metrics from. If the `regions` parameter is not set in the @@ -89,7 +91,7 @@ for a list of AWS services that publish metrics to CloudWatch. dimensions to Amazon CloudWatch every minute. [id="aws-credentials-config"] -include::../../../../../libbeat/docs/aws-credentials-config.asciidoc +include::{libbeat-xpack-dir}/docs/aws-credentials-config.asciidoc[] [float] diff --git a/x-pack/metricbeat/module/aws/_meta/docs.asciidoc b/x-pack/metricbeat/module/aws/_meta/docs.asciidoc index ddda5e8a269..3a2d7510b62 100644 --- a/x-pack/metricbeat/module/aws/_meta/docs.asciidoc +++ b/x-pack/metricbeat/module/aws/_meta/docs.asciidoc @@ -1,3 +1,5 @@ +:libbeat-xpack-dir: ../../../x-pack/libbeat + This module periodically fetches monitoring metrics from AWS Cloudwatch using https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html[GetMetricData API] for AWS services. Note: extra AWS charges on GetMetricData API requests will be generated by this module. @@ -10,7 +12,7 @@ The default metricsets are `ec2`, `sqs`, `s3_request`, `s3_daily_storage`, `clou The `aws` module requires AWS credentials configuration in order to make AWS API calls. Users can either use `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` and/or `AWS_SESSION_TOKEN`, or use shared AWS credentials file. -Please see <> for more details. +Please see <> for more details. This module also accepts optional configuration `regions` to specify which AWS regions to query metrics from. If the `regions` parameter is not set in the @@ -81,4 +83,4 @@ for a list of AWS services that publish metrics to CloudWatch. dimensions to Amazon CloudWatch every minute. [id="aws-credentials-config"] -include::../../../../../libbeat/docs/aws-credentials-config.asciidoc +include::{libbeat-xpack-dir}/docs/aws-credentials-config.asciidoc[] diff --git a/x-pack/metricbeat/module/aws/cloudwatch/_meta/docs.asciidoc b/x-pack/metricbeat/module/aws/cloudwatch/_meta/docs.asciidoc index b7ee19710f7..e2a0f6a8728 100644 --- a/x-pack/metricbeat/module/aws/cloudwatch/_meta/docs.asciidoc +++ b/x-pack/metricbeat/module/aws/cloudwatch/_meta/docs.asciidoc @@ -29,7 +29,7 @@ By default, statistic includes Average, Sum, Count, Maximum and Minimum. === Configuration example To be more focused on `cloudwatch` metricset use cases, the examples below do not include configurations on AWS credentials. -Please see <> for more details on setting AWS credentials +Please see <> for more details on setting AWS credentials in configurations in order for this metricset to make proper AWS API calls. [source,yaml]