Bug in data source edit

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
bragi

Bug in data source edit

Post by bragi »

If I create a datasource which has many output variables such as seen below. Then cacti creates all the sub datasources for you and gives them names. Now I went in to change the maximum data value to be collected on one of the datasources (ncb) and now it expects to find a round robin database and appends the name of the subdatabase to the rrd path.

="/usr/local/apache/htdocs/cacti/rra/gsn_load_ncb.rrd":

which of course does not exist. Does anyone know how to remedy this situation?

/usr/local/rrdtool/bin/rrdtool graph - \
--imgformat=PNG \
--start="-86400" \
--title="GSN 5 Minute Load Averages" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale \
--vertical-label="Load" \
DEF:a="/usr/local/apache/htdocs/cacti/rra/gsn_load.rrd":gpb1:AVERAGE \
DEF:b="/usr/local/apache/htdocs/cacti/rra/gsn_load_ncb.rrd":ncb:AVERAGE \
DEF:c="/usr/local/apache/htdocs/cacti/rra/gsn_load.rrd":gpb2:AVERAGE \
DEF:d="/usr/local/apache/htdocs/cacti/rra/gsn_load.rrd":gpb3:AVERAGE \
DEF:e="/usr/local/apache/htdocs/cacti/rra/gsn_load.rrd":gpb4:AVERAGE \
AREA:b#7EE600:"NCB\: 0.01" \
LINE1:a#00234B:"GPB 1\: 0.03" \
LINE2:c#4444FF:"GPB 2\: 0.03" \
LINE3:d#837C04:"GPB 3\: 0.05" \
LINE2:e#BCBEB3:"GPB 4\: 0.01"
User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

Post by bulek »

I had similar problems in the past. Well... I don't have a precise answer for you. To correct already stored paths you can use sql command like this:
mysql> update rrd_ds set DSPath="<path_rra>/gsn_load.rrd" where DSPath="<path_rra>/gsn_load_ncb.rrd";
You should look for a bug in include/functions.php file in two functions: GetDataSourcePath and CheckDataSourceName. I for example modified the line 118. I removed calling CheckDataSourceName function because it was truncating my file names (I use quite long DS names and there is no reason to shorten the coresponding file names - only internal DS names are restricted to 19 chars).

- bulek
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest