Hello,
I've looked around a bit for a solution to this but either have not found one or didn't know I found it.
I am trying to graph metering data from an SNMP gateway device that stores floats as string values. See Figure 1:snmpwalk. Sensitive info redacted.
Figure 1:
[root@devcacti ~]# snmpwalk -v 1 -c ******* ##.##.##.## .1.3.6.1.4.1.3815.1.2.2.1.1.2.1.1.2.1
SNMPv2-SMI::enterprises.3815.1.2.2.1.1.2.1.1.2.1 = STRING: "409681.500000"
Unsurprisingly, the graph returns NaN. See Figure 2: graph attached.
RRDTool sees, hears and speaks no evil. See Figure 3: RRDTool
Figure 3:
RRDTool Says:
OK
Is there a plugin or other script that I can use to convert this string back to a float or integer so that I can graph it numerically? As far as I, or the makers of the snmp gateway I am using, know I can not change the format of the value in the snmp table.
Please let me know if you need any more information. Here is my VM and general info:
[root@devcacti ~]# cat /etc/*release*
CentOS release 6.5 (Final)
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch
cat: /etc/lsb-release.d: Is a directory
CentOS release 6.5 (Final)
CentOS release 6.5 (Final)
cpe:/o:centos:linux:6:GA
Cacti Version 0.8.8b
Cacti OS unix
SNMP Version NET-SNMP version: 5.5
RRDTool Version RRDTool 1.3.x
Thank you in advance!
[solved] Float values stored as Strings to graph the number
Moderators: Developers, Moderators
-
- Posts: 3
- Joined: Thu Aug 06, 2015 2:23 pm
[solved] Float values stored as Strings to graph the number
- Attachments
-
- NaN
- graph_image.png (13.05 KiB) Viewed 1136 times
Re: Reading Float values stored as Strings to graph the numb
what method are you using to get the data into cacti? maybe forgot to alter the data template data source MAX field?lowenbehold wrote:Unsurprisingly, the graph returns NaN. See Figure 2: graph attached.
increase the logging level for cacti.log to high or debug. is that string value being correctly interpreted?
What about the rrdtool update command?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
-
- Posts: 3
- Joined: Thu Aug 06, 2015 2:23 pm
Re: Reading Float values stored as Strings to graph the numb
I was using a Get SNMP Data source but made a data query and now the data is showing up as numbers. Thanks a lot!