Page 1 of 1
Highcharts data point amount
Posted: Sat Dec 28, 2019 6:56 am
by smersh
Hello!
Is it possible to have a control over the amount of data points displayed on the performance graphs?
If several 1-year graphs are displayed, there may be much more then 100,000 points over 600px, making the local machine overload.
Regards,
Nick
Re: Highcharts data point amount
Posted: Mon Dec 30, 2019 2:29 pm
by cdienger
There's not much that can be done once the data is in the rrd files, but I think the /usr/local/nagios/etc/pnp/rra.cfg can be modified to hold less frequent(fewer) data points with a simple edit from:
Code: Select all
# PNP default RRA config
#
# you will get 400kb of data per datasource
#
# 2880 entries with 1 minute step = 48 hours
#
RRA:AVERAGE:0.5:1:2880
#
# 2880 entries with 5 minute step = 10 days
#
RRA:AVERAGE:0.5:5:2880
#
# 4320 entries with 30 minute step = 90 days
#
RRA:AVERAGE:0.5:30:4320
#
# 5840 entries with 360 minute step = 4 years
#
RRA:AVERAGE:0.5:360:5840
RRA:MAX:0.5:1:2880
RRA:MAX:0.5:5:2880
RRA:MAX:0.5:30:4320
RRA:MAX:0.5:360:5840
RRA:MIN:0.5:1:2880
RRA:MIN:0.5:5:2880
RRA:MIN:0.5:30:4320
RRA:MIN:0.5:360:5840
RRA:LAST:0.5:1:2880
RRA:LAST:0.5:1:2880
RRA:LAST:0.5:1:4320
RRA:LAST:0.5:1:5840
To:
Code: Select all
# PNP default RRA config
#
# you will get 400kb of data per datasource
#
# 2880 entries with 1 minute step = 48 hours
#
RRA:AVERAGE:0.5:1:2880
#
# 2880 entries with 5 minute step = 10 days
#
RRA:AVERAGE:0.5:5:2880
#
# 4320 entries with 30 minute step = 90 days
#
RRA:AVERAGE:0.5:30:4320
#
# 5840 entries with 360 minute step = 4 years
#
RRA:AVERAGE:0.5:720:5840
RRA:MAX:0.5:1:2880
RRA:MAX:0.5:5:2880
RRA:MAX:0.5:30:4320
RRA:MAX:0.5:720:5840
RRA:MIN:0.5:1:2880
RRA:MIN:0.5:5:2880
RRA:MIN:0.5:30:4320
RRA:MIN:0.5:720:5840
RRA:LAST:0.5:1:2880
RRA:LAST:0.5:1:2880
RRA:LAST:0.5:1:4320
RRA:LAST:0.5:1:5840
This would only affect newly created RRDs so you may want to remove the old perfdata files in /usr/local/nagios/share/perfdata/<hostname>/ so new ones can be created.
Re: Highcharts data point amount
Posted: Fri Jan 03, 2020 4:55 pm
by smersh
Thanks for the idea, but decreasing data points in the rrds is not accepable for us, we still need to dig in with a good detalisation. Removing of the old data would be a disaster btw.
I thought I may be able to modify the highchart php in order to decrease the amount of the displayed data points, but I don't know where to start.
Redards,
nj
Re: Highcharts data point amount
Posted: Mon Jan 06, 2020 1:28 pm
by cdienger
Note that with the previous suggest that the 1, 5, and 30 minute data would still be available.
That said, there doesn't appear to be a single file or setting to control how many data points are used in a graph.