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 cost warning messages to azure get metric values calls #15356

Merged
merged 3 commits into from
Jan 9, 2020

Conversation

narph
Copy link
Contributor

@narph narph commented Jan 7, 2020

Add cost warning messages to azure get metric values calls.
The azure response object contains the cost value for each api call, if not 0 we will log a warning message.

@narph narph requested a review from a team as a code owner January 7, 2020 13:47
@narph narph self-assigned this Jan 7, 2020
@narph narph added Metricbeat Metricbeat Team:Integrations Label for the Integrations team labels Jan 7, 2020
@@ -100,6 +103,11 @@ func (service *MonitorService) GetMetricValues(resourceID string, namespace stri
}
resp, err := service.metricsClient.List(service.context, resourceID, timespan, tg, strings.Join(metricNames[i:end], ","),
aggregations, nil, "", filter, insights.Data, namespace)

// check for applied charges before returning any errors
if resp.Cost != nil && *resp.Cost != 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is awesome! I wish AWS has it as well...

@narph narph merged commit 2e8e4e6 into elastic:master Jan 9, 2020
@narph narph added needs_backport PR is waiting to be backported to other branches. v7.6.0 labels Jan 9, 2020
@zube zube bot added [zube]: Done needs_backport PR is waiting to be backported to other branches. and removed [zube]: In Review needs_backport PR is waiting to be backported to other branches. v7.6.0 labels Jan 9, 2020
@narph narph added the v7.6.0 label Jan 9, 2020
narph added a commit to narph/beats that referenced this pull request Jan 9, 2020
…5356)

* Add cost warnings to azure api calls

* Add changelog entry

* run fmt update

(cherry picked from commit 2e8e4e6)
narph added a commit that referenced this pull request Jan 10, 2020
…ric values calls (#15415)

* Add cost warning messages to azure get metric values calls (#15356)

* Add cost warnings to azure api calls

* Add changelog entry

* run fmt update

(cherry picked from commit 2e8e4e6)

* fix changelog
@narph narph removed the needs_backport PR is waiting to be backported to other branches. label Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Metricbeat Metricbeat release-highlight Team:Integrations Label for the Integrations team v7.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants