Skip to content

Commit

Permalink
Modifying metrics.md to show getting leader pod commmands
Browse files Browse the repository at this point in the history
  • Loading branch information
mdzraf committed Feb 25, 2025
1 parent dba6d70 commit f089a66
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions docs/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,14 @@ aws_ebs_csi_api_request_duration_seconds_count{request="AttachVolume"} 1
```

To manually scrape AWS metrics:

**Note: You must export the the lead controller pod for each sidecar individually as they are not guaranteed to be assigned the same lead controller pod.**
```sh
$ export ebs_csi_controller=$(kubectl get lease -n kube-system ebs-csi-aws-com -o=jsonpath="{.spec.holderIdentity}")
$ kubectl port-forward $ebs_csi_controller 3301:3301 -n kube-system
$ curl 127.0.0.1:3301/metrics
$ export ebs_csi_attacher_leader=$(kubectl get lease external-attacher-leader-ebs-csi-aws-com -n kube-system -o=jsonpath='{.spec.holderIdentity}')
$ export ebs_csi_resizer_leader=$(kubectl get lease external-resizer-ebs-csi-aws-com -n kube-system -o=jsonpath='{.spec.holderIdentity}')
$ kubectl port-forward $ebs_csi_attacher_leader 3301:3301 -n kube-system &
$ kubectl port-forward $ebs_csi_resizer_leader 3302:3301 -n kube-system &
$ curl 127.0.0.1:3301/metrics && curl 127.0.0.1:3302/metrics
```

## EBS Node Metrics
Expand Down

0 comments on commit f089a66

Please sign in to comment.