diff --git a/src/docs/getting-started/adot-eks-add-on/config-amp.mdx b/src/docs/getting-started/adot-eks-add-on/config-amp.mdx index 57db3f874..682c27f51 100644 --- a/src/docs/getting-started/adot-eks-add-on/config-amp.mdx +++ b/src/docs/getting-started/adot-eks-add-on/config-amp.mdx @@ -16,7 +16,7 @@ The Collector configuration below is set up to receive Prometheus metrics and ex ```console kubectl apply -f collector-config-amp.yaml ``` -to deploy your Collector. Make sure to replace `` in the `prometheusremoterwite` exporter config, and `` in the `sigv4auth` extension config, as per your own target environment. Note that a `ClusterRole` and `ClusterRoleBinding` will also be created, which provide necessary permissions for the `prometheus` receiver during service discovery. +To deploy your Collector. Make sure to replace `` in the `prometheusremoterwite` exporter config, and `` in the `sigv4auth` extension config, as per your own target environment. Note that a `ClusterRole` and `ClusterRoleBinding` will also be created, which provide necessary permissions for the `prometheus` receiver during service discovery.
@@ -391,6 +391,27 @@ subjects:
+**Note: If you have existing Prometheus configurations, you will need to replace the `$` characters with `$$` to avoid having the value replaced with environment variables. ** +This is especially important for the `replacement` value of the relabel_configurations. For instance, the following configuration for relabel_configurations below + +``` +relabel_configs: +- source_labels: [__meta_kubernetes_ingress_scheme,__address__,__meta_kubernetes_ingress_path] + regex: (.+);(.+);(.+) + replacement: ${1}://${2}${3} + target_label: __param_target +``` + +would become + +``` +relabel_configs: +- source_labels: [__meta_kubernetes_ingress_scheme,__address__,__meta_kubernetes_ingress_path] + regex: (.+);(.+);(.+) + replacement: $${1}://${2}${3} + target_label: __param_target +``` + ## Verify if the Metrics Data is being sent to Amazon Managed Prometheus using the awscurl tool You can use `awscurl` to check if Amazon Managed Prometheus received the metrics data. The `awscurl` tool is a curl like tool with AWS Signature Version 4 request signing. It performs requests to AWS services with requests signing using curl interface, and it supports IAM profile credentials. To learn more about awscurl, please refer to its [Github repository](https://github.com/okigan/awscurl). diff --git a/src/docs/getting-started/adot-eks-add-on/config-cloudwatch.mdx b/src/docs/getting-started/adot-eks-add-on/config-cloudwatch.mdx index 257a87eea..747a6e2fb 100644 --- a/src/docs/getting-started/adot-eks-add-on/config-cloudwatch.mdx +++ b/src/docs/getting-started/adot-eks-add-on/config-cloudwatch.mdx @@ -11,7 +11,7 @@ The Collector configuration below is set up to receive Prometheus metrics and ex ```console kubectl apply -f collector-config-cloudwatch.yaml ``` -to deploy your Collector. Make sure to replace `` in the `spec::env` section and `` in the `awsemf` exporter config, as per your own target environment. Note that a `ClusterRole` and `ClusterRoleBinding` will also be created, which provide necessary permissions for the `prometheus` receiver during service discovery. +To deploy your Collector. Make sure to replace `` in the `spec::env` section and `` in the `awsemf` exporter config, as per your own target environment. Note that a `ClusterRole` and `ClusterRoleBinding` will also be created, which provide necessary permissions for the `prometheus` receiver during service discovery.
@@ -428,6 +428,27 @@ subjects: * Click the “ContainerInsights/Prometheus” box under “custom namespaces” * Select the “EKS_Cluster, EKS_Namespace, EKS_PodName“ to view your metrics data +**Note: If you have existing Prometheus configurations, you will need to replace the `$` characters with `$$` to avoid having the value replaced with environment variables. ** +This is especially important for the `replacement` value of the relabel_configurations. For instance, the following configuration for relabel_configurations below. + +``` +relabel_configs: +- source_labels: [__meta_kubernetes_ingress_scheme,__address__,__meta_kubernetes_ingress_path] + regex: (.+);(.+);(.+) + replacement: ${1}://${2}${3} + target_label: __param_target +``` + +would become + +``` +relabel_configs: +- source_labels: [__meta_kubernetes_ingress_scheme,__address__,__meta_kubernetes_ingress_path] + regex: (.+);(.+);(.+) + replacement: $${1}://${2}${3} + target_label: __param_target +``` + ## [Previous Topic: Collector Configuration Introduction](/docs/getting-started/adot-eks-add-on/config-intro) ## Related Topics: diff --git a/src/docs/getting-started/prometheus-remote-write-exporter.mdx b/src/docs/getting-started/prometheus-remote-write-exporter.mdx index cfb1ddaed..d892a798e 100644 --- a/src/docs/getting-started/prometheus-remote-write-exporter.mdx +++ b/src/docs/getting-started/prometheus-remote-write-exporter.mdx @@ -10,11 +10,11 @@ import SectionSeparator from "components/MdxSectionSeparator/sectionSeparator.js import SubSectionSeparator from "components/MdxSubSectionSeparator/subsectionSeparator.jsx" import prometheusPipelineEKSImg from "assets/img/docs/gettingStarted/prometheus/eks/Prometheus_Pipeline.png" -In order to scrape and export metrics to your AWS Managed Service for Prometheus (AMP) instance, you can use either the AWS Distro for +In order to scrape and export metrics to your AWS Managed Service for Prometheus (AMP), you can use either the AWS Distro for the OpenTelemetry Collector (ADOT Collector) or a standard vanilla Prometheus server. In this Getting Started guide, we’ll show you how to configure the ADOT Collector to scrape from a Prometheus-instrumented application, -and send metrics to the AWS Managed Service for Prometheus (AMP). +and send metrics to the Amazon Managed Service for Prometheus (AMP). diff --git a/src/docs/getting-started/prometheus-remote-write-exporter/ecs.mdx b/src/docs/getting-started/prometheus-remote-write-exporter/ecs.mdx index f1bcad222..32dc26326 100644 --- a/src/docs/getting-started/prometheus-remote-write-exporter/ecs.mdx +++ b/src/docs/getting-started/prometheus-remote-write-exporter/ecs.mdx @@ -98,26 +98,26 @@ Now, we have defined the roles necessary to execute our ECS ADOT Collector confi ## Building our Sample App Image -We will be using a simple sample app that is used for the integration tests of this pipeline. You can find the sample app [here](https://github.com/aws-observability/aws-otel-community). +We will be using a simple sample app that is used for the integration tests of this pipeline. You can find the sample app [here](https://github.com/aws-observability/aws-otel-community/tree/master/sample-apps/prometheus-sample-app). First, fork the repository. Then clone the repository and run the following commands: ```bash -$ cd ./sample-apps/prometheus +$ cd /sample-apps/prometheus $ docker build . -t prometheus-sample-app:latest ``` -Next, push this image to a remote repository on either ECR or Dockerhub so that it can be used by the ECS deployment +Next, push this image to a remote repository on either [Amazon ECR](https://docs.aws.amazon.com/AmazonECR/latest/public/docker-push-ecr-image.html) or Dockerhub so that it can be used by the ECS deployment ## Demonstration 1: ECS Powered by Fargate -1. [Download the ECS Fargate AMP task definition template from GitHub.](https://github.com/aws-observability/aws-otel-collector/tree/main/examples/ecs/aws-prometheus/ecs-fargate-task-def.json) This definition specifies a Prometheus sample app and an ADOT Collector instance. If you would like to learn more about the sample app, please visit [here](https://github.com/aws-observability/aws-otel-community/tree/master/sample-apps/prometheus). +1. [Download the ECS Fargate AMP task definition template from GitHub.](https://github.com/aws-observability/aws-otel-collector/tree/main/examples/ecs/aws-prometheus/ecs-fargate-task-def.json) This definition specifies a Prometheus sample app and an ADOT Collector instance. If you would like to learn more about the sample app, please visit [here](https://github.com/aws-observability/aws-otel-community/tree/master/sample-apps/prometheus-sample-app). 2. Fill the following parameters in the task definition templates: * `region` - the region the data will be sent to * `ecsTaskRoleArn` - AWSOTTaskRole ARN created in the previous section - * `ecsExecutionRoleArn` - AWSOTTaskExcutionRole ARN created in the previous section + * `ecsExecutionRoleArn` - AWSOTTaskExecutionRole ARN created in the previous section * `sampleAppImage` - the image to the Prometheus sample app we created above 3. Follow the [ECS task definition setup instructions](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/create-task-definition.html), and use the “Fargate Launch Type” instructions step 1 to create a task definition using the given template. * Be sure to verify all of the fields match the template @@ -136,11 +136,11 @@ Note that you must have a cluster created with an EC2 instance available. We cho Diagram -1. [Download the ECS EC2 AMP task definition template from GitHub](https://github.com/aws-observability/aws-otel-collector/tree/main/examples/ecs/aws-prometheus/ecs-ec2-task-def.json). This definition specifies a Prometheus sample app and an ADOT Collector instance. If you would like to learn more about the sample app, please visit [here](https://github.com/aws-observability/aws-otel-community/tree/master/sample-apps/prometheus). +1. [Download the ECS EC2 AMP task definition template from GitHub](https://github.com/aws-observability/aws-otel-collector/tree/main/examples/ecs/aws-prometheus/ecs-ec2-task-def.json). This definition specifies a Prometheus sample app and an ADOT Collector instance. If you would like to learn more about the sample app, please visit [here](https://github.com/aws-observability/aws-otel-community/tree/master/sample-apps/prometheus-sample-app). 2. Fill the following parameters in the task definition templates: * `region` - the region the data will be sent to * `ecsTaskRoleArn` - AWSOTTaskRole ARN created in the previous section - * `ecsExecutionRoleArn` - AWSOTTaskExcutionRole ARN created in the previous section + * `ecsExecutionRoleArn` - AWSOTTaskExecutionRole ARN created in the previous section * `sampleAppImage` - the image to the Prometheus sample app we created above 3. Follow the [ECS task definition setup instructions](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/create-task-definition.html), and use the “EC2 Launch Type” instructions step 1 to create a task definition using the given template. * Be sure to verify all of the fields match the template diff --git a/src/docs/getting-started/prometheus-remote-write-exporter/eks.mdx b/src/docs/getting-started/prometheus-remote-write-exporter/eks.mdx index 7225eb450..841109beb 100644 --- a/src/docs/getting-started/prometheus-remote-write-exporter/eks.mdx +++ b/src/docs/getting-started/prometheus-remote-write-exporter/eks.mdx @@ -90,7 +90,7 @@ $ cd ./sample-apps/prometheus $ docker build . -t prometheus-sample-app:latest ``` -In order to use this Docker image for Kubernetes, we need to push this image to a registry. You will need to push your image to your Amazon ECR or DockerHub registry. +In order to use this Docker image for Kubernetes, you will need to push your image to your either [Amazon ECR](https://docs.aws.amazon.com/AmazonECR/latest/public/docker-push-ecr-image.html) or Dockerhub. To deploy the sample app in EKS, copy this Kubernetes configuration and apply it. Make sure to use the latest image that was pushed. @@ -98,7 +98,7 @@ To deploy the sample app in EKS, copy this Kubernetes configuration and apply it $ curl https://raw.githubusercontent.com/aws-observability/aws-otel-collector/main/examples/eks/aws-prometheus/prometheus-sample-app.yaml -o prometheus-sample-app.yaml ``` -Add your image reference to `prometheus-sample-app.yaml` +Add your image reference to `[prometheus-sample-app.yaml](https://github.com/aws-observability/aws-otel-collector/blob/main/examples/eks/aws-prometheus/prometheus-sample-app.yaml#L29)` ```bash $ kubectl apply -f prometheus-sample-app.yaml @@ -229,7 +229,7 @@ $ awscurl --service="aps" --region="AMP_REGION" "https://{AMP_ENDPOINT}/api/v1/q If you receive a metric as the response, that means your pipeline setup is successful! This metric has successfully propagated from the sample app into AMP. -Similar pipelines can be configured using the components mentioned above to scrape your Kubernetes cluster and applications. Please refer below for advanced configurations. +Similar pipelines can be configured using the components mentioned above to scrape your Kubernetes cluster and applications. Please refer to [Advanced Collector Configuration for AMP](https://aws-otel.github.io/docs/getting-started/adot-eks-add-on/config-advanced).