Skip to content

Handle NaNs in Cloud Foundry metrics #22599

@jsoriano

Description

@jsoriano

There have been reports of Metricbeats using the cloudfoundry module only, that log errors like these ones:

ERROR   [publisher_pipeline_output]     pipeline/output.go:180  failed to publish events: unsupported float value: NaN
ERROR   [logstash]      logstash/async.go:280   Failed to publish events caused by: unsupported float value: NaN
DEBUG   [logstash]      logstash/enc.go:37      Failed to encode event: &{2020-11-16 15:50:08.877478995 +0100 CET {} Not valid json: json: error calling MarshalJSON for type common.Float: invalid character 'N' looking for beginning of value <nil> true}

That seem to indicate that there is a problem like #10849, but in the cloudfoundry module.

As we did with Prometheus in #12084, we may also need to add some defensive code around float values received from the Firehose.

Floats can be received from the Firehose in envelopes of type value (Value field) and in container metrics (CpuPercentage), objects in the firehose are encoded using protobuf, that supports NaN values.

For confirmed bugs, please report:

  • Version: 7.7.1, 7.10.0
  • Steps to Reproduce: Use the cloudfoundry module (not clear with what metrics).

Metadata

Metadata

Assignees

Labels

Team:PlatformsLabel for the Integrations - Platforms teambug

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions