diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 1617c6b27df..096b7c69eef 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -55,6 +55,7 @@ https://github.com/elastic/beats/compare/v8.2.0\...main[Check the HEAD diff] - Add handling of AAA operations for Cisco ASA module. {issue}32257[32257] {pull}32789[32789] - Fix gc.log always shipped even if gc fileset is disabled {issue}30995[30995] - Fix handling of empty array in httpjson input. {pull}32001[32001] +- Fix reporting of `filebeat.events.active` in log events such that the current value is always reported instead of the difference from the last value. {pull}33597[33597] *Heartbeat* - Fix bug affecting let's encrypt and other users of cross-signed certs, where cert expiration was incorrectly calculated. {issue}33215[33215] diff --git a/filebeat/beater/filebeat.go b/filebeat/beater/filebeat.go index 2f24c0ea29c..7f65130427d 100644 --- a/filebeat/beater/filebeat.go +++ b/filebeat/beater/filebeat.go @@ -233,7 +233,7 @@ func (fb *Filebeat) Run(b *beat.Beat) error { // count active events for waiting on shutdown wgEvents := &eventCounter{ - count: monitoring.NewInt(nil, "filebeat.events.active"), + count: monitoring.NewInt(nil, "filebeat.events.active"), // Gauge added: monitoring.NewUint(nil, "filebeat.events.added"), done: monitoring.NewUint(nil, "filebeat.events.done"), } diff --git a/libbeat/monitoring/report/log/log.go b/libbeat/monitoring/report/log/log.go index 61f70d775e1..886e207593a 100644 --- a/libbeat/monitoring/report/log/log.go +++ b/libbeat/monitoring/report/log/log.go @@ -42,6 +42,7 @@ var gauges = map[string]bool{ "libbeat.pipeline.clients": true, "libbeat.config.module.running": true, "registrar.states.current": true, + "filebeat.events.active": true, "filebeat.harvester.running": true, "filebeat.harvester.open_files": true, "beat.memstats.memory_total": true, @@ -248,16 +249,16 @@ func toKeyValuePairs(snaps map[string]monitoring.FlatSnapshot) []interface{} { for name, snap := range snaps { data := make(mapstr.M, snapshotLen(snap)) for k, v := range snap.Bools { - data.Put(k, v) + data.Put(k, v) //nolint:errcheck // All keys within the flat snapshot are unique and are for scalar values. } for k, v := range snap.Floats { - data.Put(k, v) + data.Put(k, v) //nolint:errcheck // All keys within the flat snapshot are unique and are for scalar values. } for k, v := range snap.Ints { - data.Put(k, v) + data.Put(k, v) //nolint:errcheck // All keys within the flat snapshot are unique and are for scalar values. } for k, v := range snap.Strings { - data.Put(k, v) + data.Put(k, v) //nolint:errcheck // All keys within the flat snapshot are unique and are for scalar values. } if len(data) > 0 { args = append(args, logp.Reflect(name, data)) diff --git a/libbeat/publisher/pipeline/monitoring.go b/libbeat/publisher/pipeline/monitoring.go index af4f604bd54..e5c49ad2ad2 100644 --- a/libbeat/publisher/pipeline/monitoring.go +++ b/libbeat/publisher/pipeline/monitoring.go @@ -84,7 +84,7 @@ func newMetricsObserver(metrics *monitoring.Registry) *metricsObserver { return &metricsObserver{ metrics: metrics, vars: metricsObserverVars{ - clients: monitoring.NewUint(reg, "clients"), + clients: monitoring.NewUint(reg, "clients"), // Gauge events: monitoring.NewUint(reg, "events.total"), filtered: monitoring.NewUint(reg, "events.filtered"), @@ -96,7 +96,7 @@ func newMetricsObserver(metrics *monitoring.Registry) *metricsObserver { queueACKed: monitoring.NewUint(reg, "queue.acked"), queueMaxEvents: monitoring.NewUint(reg, "queue.max_events"), - activeEvents: monitoring.NewUint(reg, "events.active"), + activeEvents: monitoring.NewUint(reg, "events.active"), // Gauge }, } }