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

ROX-15136: filter aws metrics by cluster name #857

Merged
merged 1 commit into from
Apr 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -4,215 +4,134 @@ metadata:
name: cloudwatch-exporter-config
namespace: {{ include "cloudwatch.namespace" . }}
data:
config.yaml: |-
region: us-east-1
metrics:
- aws_metric_name: DatabaseConnections
aws_namespace: AWS/RDS
aws_dimensions:
- DBInstanceIdentifier
aws_statistics:
- Average
- Maximum
- Minimum
aws_extended_statistics:
- p90
- p95
- p99
use_get_metric_data: true

- aws_metric_name: ServerlessDatabaseCapacity
aws_namespace: AWS/RDS
aws_dimensions:
- DBInstanceIdentifier
aws_statistics:
- Average
- Maximum
- Minimum
aws_extended_statistics:
- p90
- p95
- p99
use_get_metric_data: true

- aws_metric_name: ACUUtilization
aws_namespace: AWS/RDS
aws_dimensions:
- DBInstanceIdentifier
aws_statistics:
- Average
- Maximum
- Minimum
aws_extended_statistics:
- p90
- p95
- p99
use_get_metric_data: true

- aws_metric_name: FreeableMemory
aws_namespace: AWS/RDS
aws_dimensions:
- DBInstanceIdentifier
aws_statistics:
- Average
- Maximum
- Minimum
aws_extended_statistics:
- p90
- p95
- p99
use_get_metric_data: true

- aws_metric_name: CPUUtilization
aws_namespace: AWS/RDS
aws_dimensions:
- DBInstanceIdentifier
aws_statistics:
- Average
- Maximum
- Minimum
aws_extended_statistics:
- p90
- p95
- p99
use_get_metric_data: true

- aws_metric_name: ReadLatency
aws_namespace: AWS/RDS
aws_dimensions:
- DBInstanceIdentifier
aws_statistics:
- Average
- Maximum
- Minimum
aws_extended_statistics:
- p90
- p95
- p99
use_get_metric_data: true

- aws_metric_name: ReadThroughput
aws_namespace: AWS/RDS
aws_dimensions:
- DBInstanceIdentifier
aws_statistics:
- Average
- Maximum
- Minimum
aws_extended_statistics:
- p90
- p95
- p99
use_get_metric_data: true

- aws_metric_name: WriteLatency
aws_namespace: AWS/RDS
aws_dimensions:
- DBInstanceIdentifier
aws_statistics:
- Average
- Maximum
- Minimum
aws_extended_statistics:
- p90
- p95
- p99
use_get_metric_data: true

- aws_metric_name: WriteThroughput
aws_namespace: AWS/RDS
aws_dimensions:
- DBInstanceIdentifier
aws_statistics:
- Average
- Maximum
- Minimum
aws_extended_statistics:
- p90
- p95
- p99
use_get_metric_data: true

- aws_metric_name: NetworkThroughput
aws_namespace: AWS/RDS
aws_dimensions:
- DBInstanceIdentifier
aws_statistics:
- Average
- Maximum
- Minimum
aws_extended_statistics:
- p90
- p95
- p99
use_get_metric_data: true

- aws_metric_name: AuroraReplicaLag
aws_namespace: AWS/RDS
aws_dimensions:
- DBInstanceIdentifier
aws_statistics:
- Average
- Maximum
- Minimum
aws_extended_statistics:
- p90
- p95
- p99
use_get_metric_data: true

- aws_metric_name: MaximumUsedTransactionIDs
aws_namespace: AWS/RDS
aws_dimensions:
- DBInstanceIdentifier
aws_statistics:
- Average
- Maximum
- Minimum
aws_extended_statistics:
- p90
- p95
- p99
use_get_metric_data: true

- aws_metric_name: TransactionLogsDiskUsage
aws_namespace: AWS/RDS
aws_dimensions:
- DBInstanceIdentifier
aws_statistics:
- Average
- Maximum
- Minimum
aws_extended_statistics:
- p90
- p95
- p99
use_get_metric_data: true

- aws_metric_name: Deadlocks
aws_namespace: AWS/RDS
aws_dimensions:
- DBInstanceIdentifier
aws_statistics:
- Average
- Maximum
- Minimum
aws_extended_statistics:
- p90
- p95
- p99
use_get_metric_data: true

- aws_metric_name: BufferCacheHitRatio
aws_namespace: AWS/RDS
aws_dimensions:
- DBInstanceIdentifier
aws_statistics:
- Average
- Maximum
- Minimum
aws_extended_statistics:
- p90
- p95
- p99
use_get_metric_data: true
config.yml: |-
apiVersion: v1alpha1
discovery:
jobs:
- type: rds
regions:
- us-east-1
searchTags:
- key: DataplaneClusterName
value: ^{{ .Values.clusterName }}$
metrics:
- name: DatabaseConnections
statistics:
- Average
- Maximum
- Minimum
- p90
- p95
- p99
- name: ServerlessDatabaseCapacity
statistics:
- Average
- Maximum
- Minimum
- p90
- p95
- p99
- name: ACUUtilization
statistics:
- Average
- Maximum
- Minimum
- p90
- p95
- p99
- name: FreeableMemory
statistics:
- Average
- Maximum
- Minimum
- p90
- p95
- p99
- name: CPUUtilization
statistics:
- Average
- Maximum
- Minimum
- p90
- p95
- p99
- name: ReadLatency
statistics:
- Average
- Maximum
- Minimum
- p90
- p95
- p99
- name: ReadThroughput
statistics:
- Average
- Maximum
- Minimum
- p90
- p95
- p99
- name: WriteLatency
statistics:
- Average
- Maximum
- Minimum
- p90
- p95
- p99
- name: WriteThroughput
statistics:
- Average
- Maximum
- Minimum
- p90
- p95
- p99
- name: NetworkThroughput
statistics:
- Average
- Maximum
- Minimum
- p90
- p95
- p99
- name: AuroraReplicaLag
statistics:
- Average
- Maximum
- Minimum
- p90
- p95
- p99
- name: MaximumUsedTransactionIDs
statistics:
- Average
- Maximum
- Minimum
- p90
- p95
- p99
- name: TransactionLogsDiskUsage
statistics:
- Average
- Maximum
- Minimum
- p90
- p95
- p99
- name: Deadlocks
statistics:
- Average
- Maximum
- Minimum
- p90
- p95
- p99
- name: BufferCacheHitRatio
statistics:
- Average
- Maximum
- Minimum
- p90
- p95
- p99
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ spec:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
args:
- "--config.file=/tmp/config.yml"
env:
- name: AWS_ACCESS_KEY_ID
valueFrom:
Expand All @@ -41,12 +43,11 @@ spec:
name: rhacs-cloudwatch-exporter
key: AWS_SECRET_ACCESS_KEY
volumeMounts:
- mountPath: /config/config.yml
- mountPath: /tmp
name: config
subPath: config.yaml
ports:
- name: monitoring
containerPort: 9106
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that port forwarded ? Does any service require adjustment here ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's referenced by the pod monitor by the port name monitoring. So no other change should be necessary.

containerPort: 5000
volumes:
- name: config
configMap:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ aws:

clusterName: ""
environment: ""
image: "quay.io/prometheus/cloudwatch-exporter:v0.15.1"
image: "ghcr.io/nerdswords/yet-another-cloudwatch-exporter:v0.48.0-alpha"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because it has better filter and region support

To make it more concrete: It allows to pull metrics from multiple regions, it supports auto discovery of resources via tags (and it's written in Golang rather than Java 😅 ).

kylape marked this conversation as resolved.
Show resolved Hide resolved