Long term NUT data missing from rrdtool statistics

I have a router running 24.10.1 for 110d and collecting rrdtool statistics visualized under LuCI. The default intervals are selected, i.e.: 2h, 1d, 1w, 1mo, 1yr, with 288 rows per RRA, and not only the average, but the max and min values for each element/period. The data is at the default /tmp/rrd location.

For some reason, the longer term data is displayed for everything except for my NUT UPS, for which I only get around the last month on screen:

And I have an older router that is monitoring via network the first one (where the UPS is connected). That router is also missing old data:

Note: the second router is mostly intended as backup, the first one is which should store the long-term data for statistics.

Suggestions of things we could try?

Check parameters with

rrdtool info file.rrd

And compare "full width" and "short" file thresholds.

Check the rrd database content with rrdtool dump /path/file.

  • Looking for the info of the rrd files, I notice many differences between the one retaining the long-term results, and the one that doesn’t

  • Looking at the dump of the data, I only see results going back to one month back from today

Does the right side info have the shorttterm/longterm thresholds in place. They dont necessarily are entered in order....

Has the hostname by which you access the UPS changed (e.g. from localhost to an FQDN or vice versa, or 127.0.0.1, etc)? If so, LuCI's statistics app will show the data under that hostname instead of your device's hostname (the hostname selector is in the top left of the statistic pages, when there is more than one).

On the local router (monitoring localhost:port) I don’t see the long term data of NUT:

# rrdtool dump ./load/load.rrd >load.txt
# cat load.txt |grep 2025-12-01
                        <!-- 2025-12-01 09:30:00 -04 / 1764595800 --> <row><v> 5.5448480547e-02 </v><v> 4.6415828851e-02 </v><v> 7.0229074169e-03 </v></row>
                        <!-- 2025-12-01 09:30:00 -04 / 1764595800 --> <row><v> 0.0000000000e+00 </v><v> 0.0000000000e+00 </v><v> 0.0000000000e+00 </v></row>
                        <!-- 2025-12-01 09:30:00 -04 / 1764595800 --> <row><v> 5.4903971354e-01 </v><v> 2.0052083333e-01 </v><v> 7.9882812500e-02 </v></row>
#
# rrdtool dump ./UPS/voltage-input.rrd >voltage.txt
# cat voltage.txt |grep 2025-12-01
#



The older/remote router listen the other router (the one connected to the UPS) by its IP_address:port.

x/192.168.x.x/UPS# rrdtool dump voltage-input.rrd >voltage.txt
# cat voltage.txt |grep 2025-12-01
                        <!-- 2025-12-01 09:30:00 -04 / 1764595800 --> <row><v> NaN </v></row>
                        <!-- 2025-12-01 09:30:00 -04 / 1764595800 --> <row><v> NaN </v></row>
                        <!-- 2025-12-01 09:30:00 -04 / 1764595800 --> <row><v> NaN </v></row>
# cat voltage.txt |grep 2025-09-01
# cat voltage.txt |grep 2025-11-01
# cat voltage.txt |grep 2025-11-16
                        <!-- 2025-11-16 03:30:00 -04 / 1763278200 --> <row><v> NaN </v></row>
                        <!-- 2025-11-16 03:30:00 -04 / 1763278200 --> <row><v> NaN </v></row>
                        <!-- 2025-11-16 03:30:00 -04 / 1763278200 --> <row><v> NaN </v></row>
# cat voltage.txt |grep 2025-11-15
#

Possible it takes wrong field in nut output...

Not sure on what you mean, but how could we tell?

Saved value is NaN(Not-A-Number), so likely it was a text extracted instead of number from nut command/web request.

That NaN just confirm that the second router doesn’t receive old NUT stats from the original router, where the actual NUT is collecting the data.

FWIW, this is what the Cudy main router is running:

Powered by LuCI (HEAD detached at 2ac26e56) branch (25.103.51521~2ac26e5) / OpenWrt 24.10.1 (r28597-0425664679)
nut-server - 2.8.1-r2 
collectd-mod-nut - 5.12.0-r54
collectd-mod-rrdtool - 5.12.0-r54 
luci-app-nut - 25.299.71202~85db833 

For interop problems one usually pulls together both ends.