-
Notifications
You must be signed in to change notification settings - Fork 27
Add scraper for NVME Container Insights prometheus metrics in EKS (#296) #309
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
Conversation
* Add scraper for NVME Container Insights prometheus metrics in EKS * Remove unnecessary code * Fix linter error * Generalize relabel configs and fix naming conventions * Change unit map names
Adding this comment as reference: aws/amazon-cloudwatch-agent#1625 (comment). I think we should probably use this method as opposed to using a cumulativetodelta processor (as long as it works as expected -- from my testing it did seem to be the case) |
Regex: relabel.MustNewRegexp(".*_bucket|.*_sum|.*_count.*"), | ||
Action: relabel.Drop, | ||
}, | ||
// Hacky way to inject static values (clusterName/instanceId/nodeName/volumeID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remind me -- do we do this anywhere else?
Where we use relabel configs to inject clustername, instanceid, etc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah we do similar stuff in DCGM scraper:
Line 86 in 1004f32
// hacky way to inject static values (clusterName/instanceId/instanceType) |
Action: relabel.Keep, | ||
}, | ||
|
||
// Below metrics are histogram type which are not supported for container insights yet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make sure we have a TODO item in the backlog for this. Once we support prom histograms we should add these back
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think @duhminick did investigations on this and it was proposed to not pursue this metric because the emitted metric isn't actually useful.
} | ||
} | ||
|
||
func getMetricRelabelConfig(hostInfoProvider hostInfoProvider) []*relabel.Config { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need relabel configs here? Can't we just take all the metrics scraped from the endpoint?
Sorry if this was answered before -- I can't remember the previous PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's for relabeling the dimensions to the values we actually want to see on CloudWatch. You could scrape them as it is and use another processor to relabel them, but just following DCGM pattern:
Line 65 in 1004f32
func getMetricRelabelConfig(hostInfoProvider hostInfoProvider) []*relabel.Config { |
I know this works well, so I'm okay with approving it. Though I still wonder what the behavior of is (outside of histogram stuff that we had talked about): opentelemetry-collector-contrib/exporter/awsemfexporter/metric_translator.go Lines 144 to 153 in cb2f770
|
Important
This PR assumes CSI driver will modify their Kubernetes service policy to be local. Otherwise the metrics routed from the service IP will be random.
Description
Customers who have ebs csi driver addon installed should see new ebs volume metrics when enabling container insights. This is not the current behavior since container insights receiver does not have any functionality to support this use case.
This PR adds prometheus scraper to scrape at port 3302 which is the default port exposed by CSI driver for disk metrics: https://github.com/kubernetes-sigs/aws-ebs-csi-driver/blob/master/docs/metrics.md#ebs-node-metrics
Link to tracking issue
Testing
Unit test.
Manual Testing
EMF Output