What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

How can I avoid the message ''x' is not a valid floating point value' in SNMP sensors?

Votes:

0

When monitoring specific OIDs with a custom SNMP sensor, the sensor shows the error message that ''x' is not a valid floating point'. What does this mean and what can I do about it?

comma float oid prtg snmp-custom-sensor

Created on Jan 15, 2019 12:47:02 PM by  Brandy Greger [Paessler Support]

Last change on Jan 23, 2019 1:56:47 PM by  Gerald Schoch [Paessler Support]



1 Reply

Accepted Answer

Votes:

0

This article applies to PRTG Network Monitor 18 or later

Workaround for ''x' is not a valid floating point value'

You might receive the error message 'x' is not a valid floating point value when you use SNMP Custom, SNMP Custom Advanced, or SNMP Library sensors to monitor an OID that returns a value with a comma "," like 27,5545 as a float value.

Check the Value Returned by the OID

  • Download and install SNMP Tester.
  • Open the SNMP Tester and enter the following information.
    • The Device IP/Port of the device.
    • The SNMP Version as configured on the device.
    • The Community as configured on the device.
    • Select Custom OID and enter the OID you want to monitor. In this example, we use 1.3.6.1.4.1.6574.4.3.2.1.0 that corresponds to the UPS Battery Voltage value of a UPS device.
  • Click Start to execute the request.

Request Results
Click to enlarge.

The value 29,14885454 is correct and includes a comma but it is read as a string value and not a float value.

  • In SNMP Tester, set Read As to Float.
  • Click Start to execute the new request.

Incorrect Request Results
Click to enlarge.

The value 2914885454 is incorrect because it does not contain a decimal separator. The float value returned by the SNMP request must contain a dot '.' as decimal separator, otherwise PRTG cannot interpret the value.

Solution: Create an SNMP Custom String Sensor

The SNMP Custom String sensor allows you to extract a floating point value from a string result using a regular expression.

  • Add an SNMP Custom String sensor to the device.
  • Under OID Value, enter the OID. In our example it is 1.3.6.1.4.1.6574.4.3.2.1.0.
  • In section Extended Processing, select Extract a numeric value using a regular expression.
    • Under Regular Expression, enter ([0-9]+),([0-9]+) to convert the float value into an integer value.
    • Under Index of Capturing Group, enter 2.
    • Under Decimal Separator, enter a comma ','.
    • Under Thousands Separator, enter a comma ','.
  • Save your settings.

The sensor now shows the correct value. Sensor Result
Click to enlarge.

See Also

Created on Jan 15, 2019 2:26:05 PM by  Brandy Greger [Paessler Support]

Last change on Jan 23, 2019 2:11:06 PM by  Gerald Schoch [Paessler Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.