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

Add support for KCM and KSH metrics #289

Merged
merged 2 commits into from
Nov 26, 2024
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
5 changes: 5 additions & 0 deletions modules/eks-monitoring/add-ons/adot-operator/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ resource "kubernetes_cluster_role_v1" "adot" {
non_resource_urls = ["/metrics"]
verbs = ["get"]
}
rule {
api_groups = ["metrics.eks.amazonaws.com"]
verbs = ["get"]
resources = ["kcm/metrics", "ksh/metrics"]
}
rule {
api_groups = [""]
resources = ["configmaps"]
Expand Down
7 changes: 7 additions & 0 deletions modules/eks-monitoring/otel-config/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ rules:
- get
- list
- watch
- apiGroups:
- metrics.eks.amazonaws.com
resources:
- kcm/metrics
- ksh/metrics
verbs:
- get
- nonResourceURLs:
- /metrics
verbs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,42 @@ spec:
regex: apiserver_request_duration_seconds_bucket;(0.15|0.2|0.3|0.35|0.4|0.45|0.6|0.7|0.8|0.9|1.25|1.5|1.75|2|3|3.5|4|4.5|6|7|8|9|15|25|40|50)
replacement: $${1}
action: drop
- job_name: 'ksh-metrics'
scheme: https
tls_config:
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
insecure_skip_verify: true
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
kubernetes_sd_configs:
- role: endpoints
metrics_path: /apis/metrics.eks.amazonaws.com/v1/ksh/container/metrics
relabel_configs:
- source_labels:
[
__meta_kubernetes_namespace,
__meta_kubernetes_service_name,
__meta_kubernetes_endpoint_port_name,
]
action: keep
regex: default;kubernetes;https
- job_name: 'kcm-metrics'
scheme: https
tls_config:
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
insecure_skip_verify: true
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
kubernetes_sd_configs:
- role: endpoints
metrics_path: /apis/metrics.eks.amazonaws.com/v1/kcm/container/metrics
relabel_configs:
- source_labels:
[
__meta_kubernetes_namespace,
__meta_kubernetes_service_name,
__meta_kubernetes_endpoint_port_name,
]
action: keep
regex: default;kubernetes;https
{{ end }}

- job_name: serviceMonitor/default/kube-prometheus-stack-prometheus-node-exporter/0
Expand Down
Loading