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

[MetricBeat] It is not necessary to list all metrics in a AWS region #35021

Closed
kwinstonix opened this issue Apr 5, 2023 · 2 comments
Closed
Labels
needs_team Indicates that the issue/PR needs a Team:* label Stalled

Comments

@kwinstonix
Copy link
Contributor

kwinstonix commented Apr 5, 2023

I have noticed the change

Changed module to call ListMetrics API only once per region #34055

// retrieve all the details for all the metrics available in the current region
listMetricsOutput, err := aws.GetListMetricsOutput("*", regionName, m.Period, svcCloudwatch)
if err != nil {
m.Logger().Errorf("Error while retrieving the list of metrics for region %s: %w", regionName, err)
}
if len(listMetricsOutput) == 0 {
continue
}
for namespace, namespaceDetails := range namespaceDetailTotal {
m.logger.Debugf("Collected metrics from namespace %s", namespace)
// filter listMetricsOutput by detailed configuration per each namespace
filteredMetricWithStatsTotal := filterListMetricsOutput(listMetricsOutput, namespace, namespaceDetails)

AWS has so many metrics namespaces and metrics, listing all metrics in one region can lead to more API calls and higher costs. If metric config only contains few namespace and metrics, that problem will be more obvious. I think it is better to list metrics by namespace that is defined in config files.

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Apr 5, 2023
@botelastic
Copy link

botelastic bot commented Apr 5, 2023

This issue doesn't have a Team:<team> label.

@kwinstonix kwinstonix changed the title It is not necessary to list all metrics in a aws region [MetricBeat] It is not necessary to list all metrics in a AWS region Apr 5, 2023
@botelastic
Copy link

botelastic bot commented Apr 4, 2024

Hi!
We just realized that we haven't looked into this issue in a while. We're sorry!

We're labeling this issue as Stale to make it hit our filters and make sure we get back to it as soon as possible. In the meantime, it'd be extremely helpful if you could take a look at it as well and confirm its relevance. A simple comment with a nice emoji will be enough :+1.
Thank you for your contribution!

@botelastic botelastic bot added the Stalled label Apr 4, 2024
@botelastic botelastic bot closed this as completed Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs_team Indicates that the issue/PR needs a Team:* label Stalled
Projects
None yet
Development

No branches or pull requests

1 participant