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

GCP: fix config period value when the given value is below the minimum allowed period. #40020

Merged
merged 5 commits into from
Jul 3, 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
2 changes: 2 additions & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff]
- Normalize AWS RDS CPU Utilization values before making the metadata API call. {pull}39664[39664]
- Fix behavior of pagetypeinfo metrics {pull}39985[39985]
- Fix query logic for temp and non-temp tablespaces in Oracle module. {issue}38051[38051] {pull}39787[39787]
- Set GCP metrics config period to the default (60s) when the value is below the minimum allowed period. {issue}30434[30434] {pull}40020[40020]


*Osquerybeat*

Expand Down
5 changes: 4 additions & 1 deletion x-pack/metricbeat/module/gcp/metrics/metricset.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,10 @@ func New(base mb.BaseMetricSet) (mb.MetricSet, error) {
}

if err := validatePeriodForGCP(m.Module().Config().Period); err != nil {
return nil, err
m.Logger().Warnf("Period has been set to default value of 60s: %s", err)
m.config.period = &durationpb.Duration{
Seconds: int64(gcp.MonitoringMetricsSamplingRate),
}
}

// Get ingest delay and sample period for each metric type
Expand Down
Loading