diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index ea0c2c0e3ee..63dbed21458 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -53,6 +53,10 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d *Metricbeat* +- update kubernetes apiserver metricset to not collect deprecated metrics and fix dashboard {pull}31973[31973] +- Check for nil metadata in GCP. {pull}32281[32281] +- update kubernetes controllermanager metricset to not collect deprecated metrics and fix dashboard {pull}32037[32037] +- update elasticsearch node_stats metricset to use keyword for cgroup memory instead of long {pull}32197[32197] *Packetbeat* diff --git a/x-pack/metricbeat/module/gcp/metrics/metricset.go b/x-pack/metricbeat/module/gcp/metrics/metricset.go index e121d6a3a02..b7f12bae207 100644 --- a/x-pack/metricbeat/module/gcp/metrics/metricset.go +++ b/x-pack/metricbeat/module/gcp/metrics/metricset.go @@ -314,14 +314,16 @@ func (m *MetricSet) getMetadata(out *metric.MetricDescriptor, metricsWithMeta ma ingestDelay: 0 * time.Second, } - if out.Metadata.SamplePeriod != nil { - m.Logger().Debugf("For metric type %s: sample period = %s", out.Type, out.Metadata.SamplePeriod) - meta.samplePeriod = time.Duration(out.Metadata.SamplePeriod.Seconds) * time.Second - } + if out.Metadata != nil { + if out.Metadata.SamplePeriod != nil { + m.Logger().Debugf("For metric type %s: sample period = %s", out.Type, out.Metadata.SamplePeriod) + meta.samplePeriod = time.Duration(out.Metadata.SamplePeriod.Seconds) * time.Second + } - if out.Metadata.IngestDelay != nil { - m.Logger().Debugf("For metric type %s: ingest delay = %s", out.Type, out.Metadata.IngestDelay) - meta.ingestDelay = time.Duration(out.Metadata.IngestDelay.Seconds) * time.Second + if out.Metadata.IngestDelay != nil { + m.Logger().Debugf("For metric type %s: ingest delay = %s", out.Type, out.Metadata.IngestDelay) + meta.ingestDelay = time.Duration(out.Metadata.IngestDelay.Seconds) * time.Second + } } metricsWithMeta[out.Type] = meta