RRDtool fails when metrics become too big

Tags: #<Tag:0x00007f3b8644cb90> #<Tag:0x00007f3b8644c8e8>

I have installed LibreNMS a few days ago and am adding Hosts with Apps. The first host with MySQL succeeded, the second only painted graphs full of "NaN"s.

A lot of digging later, I figured out that the “bytes_sent” value of that particular MySQL instance is so big it gets converted to exponential notation which makes RRDtool fail. Excerpt from ./poller.php -d -v -h HOSTNAME -m applications:

mysqlRRD[update /opt/librenms/rrd/HOSTNAME/app-mysql-44.rrd N:8388608:60157252125:60157252698:49115833054:10804424073:4871464:48582280:56318823628:66673850:28259701:39988549:6424266:10084771:3595061344760:5639025:56318890986:680690:35088420:100587537650:52:8191:7043:771:97:400:15:1285:1661961115:15366265294:20087308235:4131270911:4194304:4176936:1000:310:7254:1873785:291:200859677:56990633441:6563070:5236:4202262:18:0:0:0:19210093193:0:48276945:52811314:9744524:10622995:19568109:4281154:0:0:0:0:0:0:0:82373699:0:1344262030:0:47182732:448475:51248446704371:1.1330469381810E+14:3931185:9137418:1:0:0:0:19210660868:5637722:3]
RRDtool Output: OK u:0,01 s:0,00 r:1,09
RRD[update /opt/librenms/rrd/HOSTNAME/app-mysql-44-status.rrd N:3:0:0:0:1:0:0:0:0:101:0:7:1:0:166:13]
RRDtool Output: ERROR: /opt/librenms/rrd/HOSTNAME/app-mysql-44.rrd: not a simple signed integer: '1.1330469381810E+14'

That number is meant to be 113285025282251, this is what the extend script reports.

I can confirm it is correctly saved in the DB:

MariaDB [librenms]> select * from application_metrics where app_id = 44 AND metric = "BSt";
| app_id | metric | value           | value_prev      |
|     44 | BSt    | 113297619811349 | 113294794472674 |

So it must be somewhere in the process of updating the RRD file that the number gets rewritten to scientific (exponential) notation.


LibreNMS  | 1.63-59-gc9155bf5e
DB Schema | 2020_04_19_010532_eventlog_sensor_reference_cleanup (164)
PHP       | 7.2.24-0ubuntu0.18.04.4
Python    | 3.6.9
MySQL     | 10.1.44-MariaDB-0ubuntu0.18.04.1
RRDTool   | 1.7.0
SNMP      | NET-SNMP 5.7.3

Edit: Observium has had this issue too, maybe the suggestions there help fixing it :slight_smile:

Doesn’t help, I can’t look at that :wink: