graph creation bug in cacti
Moderators: Developers, Moderators
graph creation bug in cacti
get the following from php poller.php
]# php poller.php
Content-type: text/html
X-Powered-By: PHP/4.3.9
Waiting on 1/1 pollers.
Cannot find module (NONE): At line 0 in (none)
Cannot find module (NONE): At line 0 in (none)
Waiting on 1/1 pollers.
Cannot find module (NONE): At line 0 in (none)
Cannot find module (NONE): At line 0 in (none)
Waiting on 1/1 pollers.
ERROR: Duplicate DS name: traffic_in
ERROR: Duplicate DS name: traffic_in
ERROR: opening '/var/www/html/cacti-0.8.6g/rra/i80_traffic_in_548.rrd': No such file or directory
09/16/2005 11:11:22 AM - SYSTEM STATS: Time:3.1067 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:2 RRDsProcessed:1
[root@bam cacti-0.8.6g]#
I thought it would make the rrd files on the fly it doesnt seem to.
ideas?
Back to top
PostPosted: Fri Sep 16, 2005 11:28 am Post subject: I have some additional info Reply with quote
It appears something is broke in a cacti script somewhere. when I turned debug mode on in data source I get:
usr/local/rrdtool-1.2.11/bin/rrdtool create \
/var/www/html/cacti-0.8.6g/rra/i80_traffic_in_548.rrd \
--step 300 \
DS:traffic_in:COUNTER:600:0:100000000 \
DS:traffic_in:COUNTER:600:0:100000000 \
DS:traffic_out:COUNTER:600:0:100000000 \
DS:traffic_out:COUNTER:600:0:100000000 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
so i tried entering this manually and got the duplicat traffic_in counter error. So tediously I tried typing it in manually from the command line I intentionnaly left out the extra traffic_in and traffic_out entries and worked! i had a rrd file now. what do I need to edit so it stops trying to create duplicate traffic out entries???
Back to top
meister
found but dont know how to fix Reply with quote
here is the piece of offending code when I comment out the for each I eliminated the duplicate traffic entries but then I dont get any traffic_in statements.
IDEAS?
if (sizeof($data_sources) > 0) {
foreach ($data_sources as $data_source) {
/* use the cacti ds name by default or the user defined one, if entered */
$data_source_name = get_data_source_item_name($data_source["id"]);
$create_ds .= "DS:$data_source_name:" . $data_source_types{$data_source["data_source_type_id"]} . ":" . $data_source["rrd_heartbeat"] . ":" . $data_source["rrd_minimum"] . ":" . (empty($data_source["rrd_maximum"]) ? "U" : $data_source["rrd_maximum"]) . RRD_NL;
}
]# php poller.php
Content-type: text/html
X-Powered-By: PHP/4.3.9
Waiting on 1/1 pollers.
Cannot find module (NONE): At line 0 in (none)
Cannot find module (NONE): At line 0 in (none)
Waiting on 1/1 pollers.
Cannot find module (NONE): At line 0 in (none)
Cannot find module (NONE): At line 0 in (none)
Waiting on 1/1 pollers.
ERROR: Duplicate DS name: traffic_in
ERROR: Duplicate DS name: traffic_in
ERROR: opening '/var/www/html/cacti-0.8.6g/rra/i80_traffic_in_548.rrd': No such file or directory
09/16/2005 11:11:22 AM - SYSTEM STATS: Time:3.1067 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:2 RRDsProcessed:1
[root@bam cacti-0.8.6g]#
I thought it would make the rrd files on the fly it doesnt seem to.
ideas?
Back to top
PostPosted: Fri Sep 16, 2005 11:28 am Post subject: I have some additional info Reply with quote
It appears something is broke in a cacti script somewhere. when I turned debug mode on in data source I get:
usr/local/rrdtool-1.2.11/bin/rrdtool create \
/var/www/html/cacti-0.8.6g/rra/i80_traffic_in_548.rrd \
--step 300 \
DS:traffic_in:COUNTER:600:0:100000000 \
DS:traffic_in:COUNTER:600:0:100000000 \
DS:traffic_out:COUNTER:600:0:100000000 \
DS:traffic_out:COUNTER:600:0:100000000 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
so i tried entering this manually and got the duplicat traffic_in counter error. So tediously I tried typing it in manually from the command line I intentionnaly left out the extra traffic_in and traffic_out entries and worked! i had a rrd file now. what do I need to edit so it stops trying to create duplicate traffic out entries???
Back to top
meister
found but dont know how to fix Reply with quote
here is the piece of offending code when I comment out the for each I eliminated the duplicate traffic entries but then I dont get any traffic_in statements.
IDEAS?
if (sizeof($data_sources) > 0) {
foreach ($data_sources as $data_source) {
/* use the cacti ds name by default or the user defined one, if entered */
$data_source_name = get_data_source_item_name($data_source["id"]);
$create_ds .= "DS:$data_source_name:" . $data_source_types{$data_source["data_source_type_id"]} . ":" . $data_source["rrd_heartbeat"] . ":" . $data_source["rrd_minimum"] . ":" . (empty($data_source["rrd_maximum"]) ? "U" : $data_source["rrd_maximum"]) . RRD_NL;
}
Problem continues
I have received no reply to my post, however I have further data it seems the problem is further amiplified when you try to make changes to the rrd file under data sources. Not the following:
Data Source Debug
/usr/local/rrdtool-1.2.11/bin/rrdtool create \
/var/www/html/cacti-0.8.6g/rra/north_platte_omni_traffic_in_590.rrd \
--step 300 \
DS:traffic_in:COUNTER:600:0:125000 \
DS:traffic_out:COUNTER:600:0:125000 \
DS:traffic_in:COUNTER:600:0:100000000 \
DS:traffic_out:COUNTER:600:0:100000000 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
note that the duplicate entries for traffic_in are created but they now have two values. I assume last in wins so I can not chance the counter values. exciting no? I have also found this ONLY occurs when the traffic graph is created for a device. It does not seem to happen with any other graph type. PLEASE can someone help?
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
Um, pointing Ian (RaX) to take a look at this one.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
I have same problem posted here :
http://forums.cacti.net/viewtopic.php?t=9351
Ps : i have use the create device fonction to create this with a template .
I have try to create a other device with no template ,and after create data source inteface - traffic and i have the same problem .
http://forums.cacti.net/viewtopic.php?t=9351
Ps : i have use the create device fonction to create this with a template .
I have try to create a other device with no template ,and after create data source inteface - traffic and i have the same problem .
I have seen this problem before, but I was under the impression that it had been fixed. Did you do a fresh install of 0.8.6g or was it an upgrade? Without knowing the exact steps that you followed to produce the duplicate data sources, it is difficult to pinpoint the exact problem.
You can however fix the issue for now by running these two SQL statements. As always, be sure to backup your database before doing this.
-Ian
You can however fix the issue for now by running these two SQL statements. As always, be sure to backup your database before doing this.
Code: Select all
delete from data_template_rrd where data_template_id = 41 and local_data_id = 0 and id != 54 and id != 55;
delete from data_template_rrd where data_template_id = 41 and local_data_id > 0 and local_data_template_rrd_id != 54 and local_data_template_rrd_id != 55;
what was the fix before
I am not that familiar with sql what is the exact command sequence?
And for the record it was a brand new g install.
And for the record it was a brand new g install.
ok it fixed it but can you fix in original code?
I figured out select cacti;
then the delete entries
and low and behold I can create graphs!
but why did it occur???
then the delete entries
and low and behold I can create graphs!
but why did it occur???
ITS BACK
well it worked for traffic but not for errors:
/usr/local/rrdtool-1.2.11/bin/rrdtool create \
/var/www/html/cacti-0.8.6g/rra/doniphan_switch_errors_in_618.rrd \
--step 300 \
DS:errors_in:COUNTER:600:0:10000000 \
DS:discards_in:COUNTER:600:0:10000000 \
DS:discards_out:COUNTER:600:0:10000000 \
DS:errors_out:COUNTER:600:0:10000000 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
Cancel
/usr/local/rrdtool-1.2.11/bin/rrdtool create \
/var/www/html/cacti-0.8.6g/rra/doniphan_switch_errors_in_618.rrd \
--step 300 \
DS:errors_in:COUNTER:600:0:10000000 \
DS:discards_in:COUNTER:600:0:10000000 \
DS:discards_out:COUNTER:600:0:10000000 \
DS:errors_out:COUNTER:600:0:10000000 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
Cancel
Try this for errors:
-Ian
Code: Select all
delete from data_template_rrd where data_template_id = 38 and local_data_id = 0 and id != 47 and id != 50 and id != 46 and id != 51;
delete from data_template_rrd where data_template_id = 38 and local_data_id > 0 and local_data_template_rrd_id != 47 and local_data_template_rrd_id != 50 and local_data_template_rrd_id != 46 and local_data_template_rrd_id != 51;
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Errors actually look correct. Please make sure your device actually collects this information. Some devices don't.
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
oops sorry
sorry
I kinda jumped the gun.
Question why isnt the rrd file made right away? Why wait for the poller?
I kinda jumped the gun.
Question why isnt the rrd file made right away? Why wait for the poller?
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
Re: oops sorry
Short answer: Permissions.dan.ross wrote:Question why isnt the rrd file made right away? Why wait for the poller?
Long answer: Typically your poller will run as a different user than the web server. Having the poller create the file allows for better security, because the web server does not need to write to the directory or file.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Who is online
Users browsing this forum: No registered users and 2 guests