librenms-plugins / Weathermap

MIT License
65 stars 52 forks source link

No data on graphs when RRDCached is enabled #71

Closed mgradowskiempik closed 3 years ago

mgradowskiempik commented 3 years ago

Hello

I have an issue when RRDCached is enabled. If enabled there is no data on graphs or graphs are partially filled.

Here is why. By default path in TARGET is something like this (configs/*.conf):

TARGET ./10.0.0.1/port-id42.rrd:INOCTETS:OUTOCTETS

When rrdtool fetch command is executed, RRDCached returns this:

flush ./10.0.0.1/port-id42.rrd
Nothing to flush: /opt/librenms/rrd/./10.0.0.1/port-id42.rrd.

This means that data from cache is not written to disk. So data is outside time window, no recent values.

When I removed ./ from all TARGET then Weathermap works as expected (data shown):

flush 110.0.0.1/port-id42.rrd
0 Successfully flushed /opt/librenms/rrd/10.0.0.1/port-id42.rrd.

I think you should change this line. Add exception if RRDCached is enabled.

My RRDCached configuration is from docs page.

Cormoran96 commented 3 years ago

the solutions is in this PR " Fix rrdcached support #75 "