Skip to content

SNMP is reporting trap is report a value as infinity which is not valid json #1210

@thel1988

Description

@thel1988

We have been testing sc4snmp for a while now, we have seen if a device is report values as infinty eg:
memoryDeviceSerialNumberName": Infinity or "fruSerialNumberName": Infinity it will cause both the Otel collector and splunk enterprise to not parse it as valid json.

from the JSON spec:
Infinity is not a valid value in the official JSON specification (RFC 8259). While it's a recognized special numeric value in languages like Python and JavaScript, a compliant JSON parser must reject it. The value should be represented as null (if it's unknown or not applicable) or as a quoted string "Infinity"

Is it possible to overwrite the infinity values with quotes when returned in both snmp traps and snmp walks?

Both a Splunk HEC and a Splunk HEC endpoint hosted on a otel collector is rejecting the events as they should?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions