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

Update cloudwatch exporter dependency #839

Merged
merged 31 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
023c06c
Update cloudwatch exporter dependency
andriikushch May 14, 2024
fb934e7
Fix imports
andriikushch May 14, 2024
09f3380
Fix converter tests
andriikushch May 14, 2024
6df9bdc
Add documentation
andriikushch May 14, 2024
0802a26
Change CHANGELOG.md
andriikushch May 14, 2024
b2d50c6
Revert some changes in the test
andriikushch May 14, 2024
4a109b3
Merge branch 'refs/heads/main' into andriikushch/update-cloudwatch-ex…
andriikushch May 16, 2024
c743403
Update CHANGELOG.md
andriikushch May 16, 2024
a9a9f60
Fix tests
andriikushch May 16, 2024
6566866
Merge branch 'refs/heads/main' into andriikushch/update-cloudwatch-ex…
andriikushch May 21, 2024
dc04b58
Update go.mod
andriikushch May 21, 2024
6d6a0f6
Add -ld_classic to the CGO_LDFLAGS
andriikushch May 21, 2024
06893a6
Update CHANGELOG.md
andriikushch May 23, 2024
947b23b
Implements comments from the PR
andriikushch May 23, 2024
85e9bf3
Rename variable
andriikushch May 23, 2024
a426e78
Rename variable
andriikushch May 23, 2024
0ddfaa2
Update docs/sources/reference/components/prometheus.exporter.cloudwat…
andriikushch May 28, 2024
39c4fe9
Merge branch 'refs/heads/main' into andriikushch/update-cloudwatch-ex…
andriikushch May 29, 2024
46be868
Update go.mod
andriikushch May 29, 2024
9851b72
Update prometheus.exporter.cloudwatch.md
andriikushch May 31, 2024
63ff123
Add compatibility layer for the service aliases
andriikushch Jun 17, 2024
e5365fd
Merge branch 'refs/heads/main' into andriikushch/update-cloudwatch-ex…
andriikushch Jun 17, 2024
207a067
Solve merge conflicts
andriikushch Jun 17, 2024
23e1ce1
Merge branch 'refs/heads/main' into andriikushch/update-cloudwatch-ex…
andriikushch Jun 18, 2024
a04f268
Merge branch 'refs/heads/main' into andriikushch/update-cloudwatch-ex…
andriikushch Jun 21, 2024
800124f
Merge branch 'main' into andriikushch/update-cloudwatch-exporter-depe…
andriikushch Sep 2, 2024
91fe77c
Rename service name
andriikushch Sep 2, 2024
dd9944d
Rename service name
andriikushch Sep 2, 2024
e176bd4
Remove ld_classic tag
andriikushch Sep 2, 2024
54943b4
Update of the CHANGELOG.md
andriikushch Sep 2, 2024
6aa5fc2
Revert "Remove ld_classic tag"
andriikushch Sep 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
go-version: "1.22"
cache: true
- name: Test
run: make GO_TAGS="nodocker" test
run: CGO_LDFLAGS="-ld_classic $CGO_LDFLAGS" make GO_TAGS="nodocker" test
thampiotr marked this conversation as resolved.
Show resolved Hide resolved
4 changes: 4 additions & 0 deletions CHANGELOG.md
thampiotr marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ Main (unreleased)

- Add extra validation in `beyla.ebpf` to avoid panics when network feature is enabled. (@marctc)

- A new parameter `aws_sdk_version_v2` is added for the cloudwatch exporters configuration. It enables the use of aws sdk v2 which has shown to have significant performance benefits. (@kgeckhart, @andriikushch)

### Bugfixes

- Fix a bug where custom components don't always get updated when the config is modified in an imported directory. (@ante012)
Expand Down Expand Up @@ -67,6 +69,8 @@ Main (unreleased)

- Renamed standard library functions. Old names are still valid but are marked deprecated. (@wildum)

- Aliases for the namespaces are deprecated in the Cloudwatch exporter. For example: "s3" is not allowed, "AWS/S3" should be used. Usage of the aliases will generate warnings in the logs. Support for the aliases will be dropped in the upcoming releases. (@kgeckhart, @andriikushch)

v1.3.1
-----------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ To use all of the integration features, use the following AWS IAM Policy:

```alloy
prometheus.exporter.cloudwatch "queues" {
sts_region = "us-east-2"

sts_region = "us-east-2"
aws_sdk_version_v2 = "false"
discovery {
type = "sqs"
type = "AWS/SQS"
regions = ["us-east-2"]
search_tags = {
"scrape" = "true",
Expand Down Expand Up @@ -124,6 +124,7 @@ Omitted fields take their default values.
| Name | Type | Description | Default | Required |
|---------------------------|---------------------|--------------------------------------------------------------------------------|---------|----------|
| `sts_region` | `string` | AWS region to use when calling [STS][] for retrieving account information. | | yes |
| `aws_sdk_version_v2` | `bool` | Use AWS SDK version 2. | `false` | no |
| `fips_disabled` | `bool` | Disable use of FIPS endpoints. Set 'true' when running outside of USA regions. | `true` | no |
| `debug` | `bool` | Enable debug logging on CloudWatch exporter internals. | `false` | no |
| `discovery_exported_tags` | `map(list(string))` | List of tags (value) per service (key) to export in all metrics. For example, defining the `["name", "type"]` under `"AWS/EC2"` will export the name and type tags and its values as labels in all metrics. Affects all discovery jobs. | `{}` | no |
Expand Down Expand Up @@ -366,91 +367,100 @@ See the examples described under each [discovery][] and [static] sections.
## Supported services in discovery jobs

The following is a list of AWS services that are supported in `cloudwatch_exporter` discovery jobs. When configuring a
discovery job, the `type` field of each `discovery_job` must match either the desired job namespace or alias.

- Namespace: `CWAgent` or Alias: `cwagent`
- Namespace: `AWS/Usage` or Alias: `usage`
- Namespace: `AWS/CertificateManager` or Alias: `acm`
- Namespace: `AWS/ACMPrivateCA` or Alias: `acm-pca`
- Namespace: `AmazonMWAA` or Alias: `airflow`
- Namespace: `AWS/MWAA` or Alias: `mwaa`
- Namespace: `AWS/ApplicationELB` or Alias: `alb`
- Namespace: `AWS/AppStream` or Alias: `appstream`
- Namespace: `AWS/Backup` or Alias: `backup`
- Namespace: `AWS/ApiGateway` or Alias: `apigateway`
- Namespace: `AWS/AmazonMQ` or Alias: `mq`
- Namespace: `AWS/AppSync` or Alias: `appsync`
- Namespace: `AWS/Athena` or Alias: `athena`
- Namespace: `AWS/AutoScaling` or Alias: `asg`
- Namespace: `AWS/ElasticBeanstalk` or Alias: `beanstalk`
- Namespace: `AWS/Billing` or Alias: `billing`
- Namespace: `AWS/Cassandra` or Alias: `cassandra`
- Namespace: `AWS/CloudFront` or Alias: `cloudfront`
- Namespace: `AWS/Cognito` or Alias: `cognito-idp`
- Namespace: `AWS/DMS` or Alias: `dms`
- Namespace: `AWS/DDoSProtection` or Alias: `shield`
- Namespace: `AWS/DocDB` or Alias: `docdb`
- Namespace: `AWS/DX` or Alias: `dx`
- Namespace: `AWS/DynamoDB` or Alias: `dynamodb`
- Namespace: `AWS/EBS` or Alias: `ebs`
- Namespace: `AWS/ElastiCache` or Alias: `ec`
- Namespace: `AWS/MemoryDB` or Alias: `memorydb`
- Namespace: `AWS/EC2` or Alias: `ec2`
- Namespace: `AWS/EC2Spot` or Alias: `ec2Spot`
- Namespace: `AWS/ECS` or Alias: `ecs-svc`
- Namespace: `ECS/ContainerInsights` or Alias: `ecs-containerinsights`
- Namespace: `AWS/EFS` or Alias: `efs`
- Namespace: `AWS/ELB` or Alias: `elb`
- Namespace: `AWS/ElasticMapReduce` or Alias: `emr`
- Namespace: `AWS/EMRServerless` or Alias: `emr-serverless`
- Namespace: `AWS/ES` or Alias: `es`
- Namespace: `AWS/Firehose` or Alias: `firehose`
- Namespace: `AWS/FSx` or Alias: `fsx`
- Namespace: `AWS/GameLift` or Alias: `gamelift`
- Namespace: `AWS/GlobalAccelerator` or Alias: `ga`
- Namespace: `Glue` or Alias: `glue`
- Namespace: `AWS/IoT` or Alias: `iot`
- Namespace: `AWS/Kafka` or Alias: `kafka`
- Namespace: `AWS/KafkaConnect` or Alias: `kafkaconnect`
- Namespace: `AWS/Kinesis` or Alias: `kinesis`
- Namespace: `AWS/KinesisAnalytics` or Alias: `kinesis-analytics`
- Namespace: `AWS/Lambda` or Alias: `lambda`
- Namespace: `AWS/MediaConnect` or Alias: `mediaconnect`
- Namespace: `AWS/MediaConvert` or Alias: `mediaconvert`
- Namespace: `AWS/MediaLive` or Alias: `medialive`
- Namespace: `AWS/MediaTailor` or Alias: `mediatailor`
- Namespace: `AWS/Neptune` or Alias: `neptune`
- Namespace: `AWS/NetworkFirewall` or Alias: `nfw`
- Namespace: `AWS/NATGateway` or Alias: `ngw`
- Namespace: `AWS/NetworkELB` or Alias: `nlb`
- Namespace: `AWS/PrivateLinkEndpoints` or Alias: `vpc-endpoint`
- Namespace: `AWS/PrivateLinkServices` or Alias: `vpc-endpoint-service`
- Namespace: `AWS/Prometheus` or Alias: `amp`
- Namespace: `AWS/QLDB` or Alias: `qldb`
- Namespace: `AWS/RDS` or Alias: `rds`
- Namespace: `AWS/Redshift` or Alias: `redshift`
- Namespace: `AWS/Route53Resolver` or Alias: `route53-resolver`
- Namespace: `AWS/Route53` or Alias: `route53`
- Namespace: `AWS/S3` or Alias: `s3`
- Namespace: `AWS/SES` or Alias: `ses`
- Namespace: `AWS/States` or Alias: `sfn`
- Namespace: `AWS/SNS` or Alias: `sns`
- Namespace: `AWS/SQS` or Alias: `sqs`
- Namespace: `AWS/StorageGateway` or Alias: `storagegateway`
- Namespace: `AWS/TransitGateway` or Alias: `tgw`
- Namespace: `AWS/TrustedAdvisor` or Alias: `trustedadvisor`
- Namespace: `AWS/VPN` or Alias: `vpn`
- Namespace: `AWS/ClientVPN` or Alias: `clientvpn`
- Namespace: `AWS/WAFV2` or Alias: `wafv2`
- Namespace: `AWS/WorkSpaces` or Alias: `workspaces`
- Namespace: `AWS/AOSS` or Alias: `aoss`
- Namespace: `AWS/SageMaker` or Alias: `sagemaker`
- Namespace: `/aws/sagemaker/Endpoints` or Alias: `sagemaker-endpoints`
- Namespace: `/aws/sagemaker/TrainingJobs` or Alias: `sagemaker-training`
- Namespace: `/aws/sagemaker/ProcessingJobs` or Alias: `sagemaker-processing`
- Namespace: `/aws/sagemaker/TransformJobs` or Alias: `sagemaker-transform`
- Namespace: `/aws/sagemaker/InferenceRecommendationsJobs` or Alias: `sagemaker-inf-rec`
- Namespace: `AWS/Sagemaker/ModelBuildingPipeline` or Alias: `sagemaker-model-building-pipeline`
discovery job, the `type` field of each `discovery_job` must match the desired job namespace.

- Namespace: `CWAgent`
- Namespace: `AWS/Usage`
- Namespace: `AWS/CertificateManager`
- Namespace: `AWS/ACMPrivateCA`
- Namespace: `AmazonMWAA`
- Namespace: `AWS/MWAA`
- Namespace: `AWS/ApplicationELB`
- Namespace: `AWS/AppStream`
- Namespace: `AWS/Backup`
- Namespace: `AWS/ApiGateway`
- Namespace: `AWS/AmazonMQ`
- Namespace: `AWS/AppSync`
- Namespace: `AWS/Athena`
- Namespace: `AWS/AutoScaling`
- Namespace: `AWS/ElasticBeanstalk`
- Namespace: `AWS/Billing`
- Namespace: `AWS/Cassandra`
- Namespace: `AWS/CloudFront`
- Namespace: `AWS/Cognito`
- Namespace: `AWS/DataSync`
- Namespace: `AWS/DMS`
- Namespace: `AWS/DDoSProtection`
- Namespace: `AWS/DocDB`
- Namespace: `AWS/DX`
- Namespace: `AWS/DynamoDB`
- Namespace: `AWS/EBS`
- Namespace: `AWS/ElastiCache`
- Namespace: `AWS/MemoryDB`
- Namespace: `AWS/EC2`
- Namespace: `AWS/EC2Spot`
- Namespace: `AWS/ECS`
- Namespace: `ECS/ContainerInsights`
- Namespace: `AWS/EFS`
- Namespace: `AWS/ELB`
- Namespace: `AWS/ElasticMapReduce`
- Namespace: `AWS/EMRServerless`
- Namespace: `AWS/ES`
- Namespace: `AWS/Firehose`
- Namespace: `AWS/FSx`
- Namespace: `AWS/GameLift`
- Namespace: `AWS/GatewayELB`
- Namespace: `AWS/GlobalAccelerator`
- Namespace: `Glue`
- Namespace: `AWS/IoT`
- Namespace: `AWS/Kafka`
- Namespace: `AWS/KafkaConnect`
- Namespace: `AWS/Kinesis`
- Namespace: `AWS/KinesisAnalytics`
- Namespace: `AWS/KMS`
- Namespace: `AWS/Lambda`
- Namespace: `AWS/Logs`
- Namespace: `AWS/MediaConnect`
- Namespace: `AWS/MediaConvert`
- Namespace: `AWS/MediaLive`
- Namespace: `AWS/MediaTailor`
- Namespace: `AWS/Neptune`
- Namespace: `AWS/NetworkFirewall`
- Namespace: `AWS/NATGateway`
- Namespace: `AWS/NetworkELB`
- Namespace: `AWS/PrivateLinkEndpoints`
- Namespace: `AWS/PrivateLinkServices`
- Namespace: `AWS/Prometheus`
- Namespace: `AWS/QLDB`
- Namespace: `AWS/RDS`
- Namespace: `AWS/Redshift`
- Namespace: `AWS/Route53Resolver`
- Namespace: `AWS/Route53`
- Namespace: `AWS/RUM`
- Namespace: `AWS/S3`
- Namespace: `AWS/SecretsManager`
- Namespace: `AWS/SES`
- Namespace: `AWS/States`
- Namespace: `AWS/SNS`
- Namespace: `AWS/SQS`
- Namespace: `AWS/StorageGateway`
- Namespace: `AWS/TransitGateway`
- Namespace: `AWS/TrustedAdvisor`
- Namespace: `AWS/VPN`
- Namespace: `AWS/ClientVPN`
- Namespace: `AWS/WAFV2`
- Namespace: `AWS/WorkSpaces`
- Namespace: `AWS/AOSS`
- Namespace: `AWS/SageMaker`
- Namespace: `/aws/sagemaker/Endpoints`
- Namespace: `/aws/sagemaker/TrainingJobs`
- Namespace: `/aws/sagemaker/ProcessingJobs`
- Namespace: `/aws/sagemaker/TransformJobs`
- Namespace: `/aws/sagemaker/InferenceRecommendationsJobs`
- Namespace: `AWS/Sagemaker/ModelBuildingPipeline`
- Namespace: `AWS/IPAM`
- Namespace: `AWS/Bedrock`
- Namespace: `AWS/Events`

<!-- START GENERATED COMPATIBLE COMPONENTS -->

Expand Down
21 changes: 11 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ require (
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f
github.com/natefinch/atomic v1.0.1
github.com/ncabatoff/process-exporter v0.7.10
github.com/nerdswords/yet-another-cloudwatch-exporter v0.55.0
github.com/nerdswords/yet-another-cloudwatch-exporter v0.60.0
github.com/oklog/run v1.1.0
github.com/olekukonko/tablewriter v0.0.5
github.com/oliver006/redis_exporter v1.54.0
Expand Down Expand Up @@ -386,22 +386,23 @@ require (
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.7 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.0 // indirect
github.com/aws/aws-sdk-go-v2/service/amp v1.23.0 // indirect
github.com/aws/aws-sdk-go-v2/service/apigateway v1.22.0 // indirect
github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.19.0 // indirect
github.com/aws/aws-sdk-go-v2/service/autoscaling v1.38.0 // indirect
github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.36.0 // indirect
github.com/aws/aws-sdk-go-v2/service/ec2 v1.149.1 // indirect
github.com/aws/aws-sdk-go-v2/service/amp v1.25.5 // indirect
github.com/aws/aws-sdk-go-v2/service/apigateway v1.23.7 // indirect
github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.20.5 // indirect
github.com/aws/aws-sdk-go-v2/service/autoscaling v1.40.6 // indirect
github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.38.1 // indirect
github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.38.5 // indirect
github.com/aws/aws-sdk-go-v2/service/ec2 v1.161.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.0 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.9 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.0 // indirect
github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.20.0 // indirect
github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.21.5 // indirect
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.27.0 // indirect
github.com/aws/aws-sdk-go-v2/service/shield v1.24.0 // indirect
github.com/aws/aws-sdk-go-v2/service/shield v1.25.5 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.20.9 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.24.3 // indirect
github.com/aws/aws-sdk-go-v2/service/storagegateway v1.26.0 // indirect
github.com/aws/aws-sdk-go-v2/service/storagegateway v1.27.5 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.28.10 // indirect
github.com/aws/smithy-go v1.20.2 // indirect
github.com/axiomhq/hyperloglog v0.0.0-20240124082744-24bca3a5b39b // indirect
Expand Down
Loading
Loading