Skip to content

Commit

Permalink
Merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
kgeckhart committed Jul 1, 2024
2 parents 280fd6a + 43c09fe commit be5080d
Show file tree
Hide file tree
Showing 21 changed files with 385 additions and 120 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
run: docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t ghcr.io/nerdswords/yet-another-cloudwatch-exporter:${{github.ref_name}} --build-arg VERSION=${{github.ref_name}} --push .

- name: Build && release binaries
uses: goreleaser/goreleaser-action@v5
uses: goreleaser/goreleaser-action@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
3 changes: 2 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version: 2
builds:
- binary: yace
main: ./cmd/yace
Expand All @@ -16,6 +17,6 @@ archives:
files:
- none*
changelog:
skip: true
disable: true
checksum:
name_template: 'checksums.txt'
48 changes: 48 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,54 @@ Refactoring:

**Full Changelog**: https://github.com/...

# 0.61.2

Bugfix release to update the `goreleaser` configuration (again!), please refer to the release notes for `0.61.0` for actual code changes.

https://github.com/nerdswords/yet-another-cloudwatch-exporter/releases/tag/v0.61.0

# 0.61.1

Bugfix release to update the `goreleaser` configuration, please refer to the release notes for `0.61.0` for actual code changes.

https://github.com/nerdswords/yet-another-cloudwatch-exporter/releases/tag/v0.61.0

# 0.61.0

**Important news and breaking changes**

* This release adds support for AWS account aliases (by @thepalbi). If the role used by YACE has `"iam:ListAccountAliases"` permission, the account alias (if any) is added as a label to the `aws_account_info` metric.

**Bugfixes and features**

Features:
* Add AWS/EC2CapacityReservations to the services list by @luismy
* Add support for MediaPackage metrics by @theunissenne
* Add AWS/AppRunner as supported service by @fabiiw05

Bugs:
* Fix association with gwlb by @vainiusd

Refactoring:
* Add support for batching by time params by @kgeckhart

**Dependencies**

* Bump alpine from 3.19.1 to 3.20.1
* Bump github.com/aws/aws-sdk-go from 1.53.1 to 1.54.7
* Bump github.com/aws/aws-sdk-go-v2/service/ec2 from 1.161.4 to 1.162.0 in the aws-sdk-v2 group
* Bump github.com/prometheus/common from 0.53.0 to 0.54.0
* Bump golangci/golangci-lint-action from 5.3.0 to 6.0.1
* Bump goreleaser/goreleaser-action from 5 to 6
* Bump the aws-sdk-v2 group

**New contributors**

* @luismy made their first contribution in https://github.com/nerdswords/yet-another-cloudwatch-exporter/pull/1341
* @fabiiw05 made their first contribution in https://github.com/nerdswords/yet-another-cloudwatch-exporter/pull/1433

**Full Changelog**: https://github.com/nerdswords/yet-another-cloudwatch-exporter/compare/v0.60.0...v0.61.0

# 0.60.0

**Bugfixes and features**
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ENV CGO_ENABLED=0
ARG VERSION
RUN go build -v -ldflags "-X main.version=$VERSION" -o yace ./cmd/yace

FROM alpine:3.20.0
FROM alpine:3.20.1

EXPOSE 5000
ENTRYPOINT ["yace"]
Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Only the latest version gets security updates. We won't support older versions.
* `AmazonMWAA` - Managed Apache Airflow
* `AWS/ACMPrivateCA` - ACM Private CA
* `AWS/AmazonMQ` - Managed Message Broker Service
* `AWS/AppRunner` - Managed Container Apps Service
* `AWS/AOSS` - OpenSearch Serverless
* `AWS/ApiGateway` - ApiGateway (V1 and V2)
* `AWS/ApplicationELB` - Application Load Balancer
Expand Down Expand Up @@ -162,7 +163,8 @@ As a quick start, the following IAM policy can be used to grant the all permissi
"ec2:DescribeSpotFleetRequests",
"shield:ListProtections",
"storagegateway:ListGateways",
"storagegateway:ListTagsForResource"
"storagegateway:ListTagsForResource",
"iam:ListAccountAliases"
],
"Effect": "Allow",
"Resource": "*"
Expand Down Expand Up @@ -224,6 +226,11 @@ This permission is required to discover protected resources for the AWS/DDoSProt
"shield:ListProtections"
```

The AWS IAM API supports creating account aliases, which are human-friendly names that can be used to easily identify accounts. An account can have at most a single alias, see ([docs](https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListAccountAliases.html)). Each alias must be unique across an AWS network partition ([docs](https://docs.aws.amazon.com/IAM/latest/UserGuide/console_account-alias.html#AboutAccountAlias)). The following permission is required to get the alias for an account, which is exported as a label in the `aws_account_info` metric:
```json
"iam:ListAccountAliases"
```

If running YACE inside an AWS EC2 instance, the exporter will automatically attempt to assume the associated IAM Role. If this is undesirable behavior turn off the use the metadata endpoint by setting the environment variable `AWS_EC2_METADATA_DISABLED=true`.

## Configuration
Expand Down
25 changes: 25 additions & 0 deletions examples/apprunner.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: v1alpha1
discovery:
jobs:
- regions:
- us-east-1
period: 300
length: 300
type: AWS/AppRunner
metrics:
- name: MemoryUtilization
statistics: [Average, Maximum]
- name: CPUUtilization
statistics: [Average, Maximum]
- name: 2xxStatusResponses
statistics: [Sum]
- name: Requests
statistics: [Sum]
- name: RequestLatency
statistics: [Average]
- name: ActiveInstances
statistics: [Maximum]
- name: 4xxStatusResponses
statistics: [Sum]
- name: Concurrency
statistics: [Maximum]
51 changes: 26 additions & 25 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,27 @@ module github.com/nerdswords/yet-another-cloudwatch-exporter
go 1.22.0

require (
github.com/aws/aws-sdk-go v1.53.11
github.com/aws/aws-sdk-go-v2 v1.27.0
github.com/aws/aws-sdk-go-v2/config v1.27.16
github.com/aws/aws-sdk-go-v2/credentials v1.17.16
github.com/aws/aws-sdk-go-v2/service/amp v1.25.8
github.com/aws/aws-sdk-go-v2/service/apigateway v1.23.10
github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.20.8
github.com/aws/aws-sdk-go-v2/service/autoscaling v1.40.9
github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.38.4
github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.38.8
github.com/aws/aws-sdk-go-v2/service/ec2 v1.162.0
github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.21.8
github.com/aws/aws-sdk-go-v2/service/shield v1.25.8
github.com/aws/aws-sdk-go-v2/service/storagegateway v1.28.1
github.com/aws/aws-sdk-go-v2/service/sts v1.28.10
github.com/aws/aws-sdk-go v1.54.7
github.com/aws/aws-sdk-go-v2 v1.30.0
github.com/aws/aws-sdk-go-v2/config v1.27.21
github.com/aws/aws-sdk-go-v2/credentials v1.17.21
github.com/aws/aws-sdk-go-v2/service/amp v1.26.1
github.com/aws/aws-sdk-go-v2/service/apigateway v1.24.1
github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.21.1
github.com/aws/aws-sdk-go-v2/service/autoscaling v1.41.1
github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.39.1
github.com/aws/aws-sdk-go-v2/service/databasemigrationservice v1.39.1
github.com/aws/aws-sdk-go-v2/service/ec2 v1.165.1
github.com/aws/aws-sdk-go-v2/service/iam v1.33.1
github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.22.1
github.com/aws/aws-sdk-go-v2/service/shield v1.26.1
github.com/aws/aws-sdk-go-v2/service/storagegateway v1.30.1
github.com/aws/aws-sdk-go-v2/service/sts v1.29.1
github.com/aws/smithy-go v1.20.2
github.com/go-kit/log v0.2.1
github.com/grafana/regexp v0.0.0-20221123153739-15dc172cd2db
github.com/prometheus/client_golang v1.19.1
github.com/prometheus/common v0.53.0
github.com/prometheus/common v0.54.0
github.com/r3labs/diff/v3 v3.0.1
github.com/stretchr/testify v1.9.0
github.com/urfave/cli/v2 v2.27.2
Expand All @@ -31,14 +32,14 @@ require (
)

require (
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.3 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.7 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.7 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.8 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.12 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.12 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // 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/presigned-url v1.11.9 // 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/internal/presigned-url v1.11.14 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.21.1 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.25.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
Expand All @@ -47,13 +48,13 @@ require (
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.6.0 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect
golang.org/x/sys v0.18.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
golang.org/x/sys v0.19.0 // indirect
google.golang.org/protobuf v1.34.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit be5080d

Please sign in to comment.