Hello all,
I am under the assumption that the following command will create a graph for an existing device and will create the associated data source (rrd) file:
php -q add_graphs.php --host-id=15 --graph-type=cg --graph-template-id=4
When I issue this command, I receive the following reply:
Graph Added - graph-id: (53) - data-source-id: (106)
After issuing the command, I go back to the browser and verify the existence of the newly created graph in Cacti's Graph Management page. However, when I turn on graph debug mode, an error is displayed:
ERROR: opening '/var/www/html/cacti-0.8.7b/rra/newhost_cpu_system_107.rrd': No such file or directory
And indeed I cannot find the rrd file in the rra directory. A tail of the Cacti log file shows:
CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'1064', SQL:"SELECT DISTINCT data_template_rrd.local_data_id FROM graph_templates_item, data_template_rrd WHERE graph_templates_item.local_graph_id = AND graph_templates_item.task_item_id = data_template_rrd.id"
The permissions on the rra directory are cactiuser:cactiuser and 755, and when I create the data sources via the graphical interface I have no such problems.
Am I missing a pertinent command in order to get the data sources created via cli? Thanks for any advice/help.
Regards,
Greg Durrett
add_graphs.php fails to create rrd files
Moderators: Developers, Moderators
Follow Up
Further information regarding this issue.
When I cut and paste the Data Source debug text, which is of course the rrdtool commands to create the data source, the command succeeds and creates the rrd file.
For some reason it's being executed neither via the cli script, nor the graphical interface, even though, as I mentioned, Cacti seems to think it's created the data sources properly.
Greg
When I cut and paste the Data Source debug text, which is of course the rrdtool commands to create the data source, the command succeeds and creates the rrd file.
For some reason it's being executed neither via the cli script, nor the graphical interface, even though, as I mentioned, Cacti seems to think it's created the data sources properly.
Greg
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
The script does never create rrd files. It only creates graphs.
It is always the poller which creates rrd files for those graphs (in fact: for the data sources related to that graph). And before doing so, the poller verifies that the target device is alive. In case this "downed host detection" fails, no rrd file will be created.
See e.g. 2nd link of my sig for debugging
R.
It is always the poller which creates rrd files for those graphs (in fact: for the data sources related to that graph). And before doing so, the poller verifies that the target device is alive. In case this "downed host detection" fails, no rrd file will be created.
See e.g. 2nd link of my sig for debugging
R.
Hey Reinhard,
thank you for the quick response. I ran through the whole debugging process (check cacti logfile, check cacti poller, check crontab, check permissions of RRDfiles,...) and can't find anything suspicious.
As I wrote already in topic no. 33817, creating graphs in cacti itself is no problem. I see the graphs and everything works fine. But when I try to create graphs by cli (command in topic 33817), I get an error-message that the RRDFiles are not created. I tried to explain this in the other topic
Greetz
Tom
Edit: Creating the files manually will cause the following error:
Edit2: aaaarrrrgggghhhhh, I got it!!! When I create devices in cacti, I use only SNMP to identfy an online device. By cli, the standard is ping and snmp. Adding --avail="snmp" to my script and it works!
thank you for the quick response. I ran through the whole debugging process (check cacti logfile, check cacti poller, check crontab, check permissions of RRDfiles,...) and can't find anything suspicious.
As I wrote already in topic no. 33817, creating graphs in cacti itself is no problem. I see the graphs and everything works fine. But when I try to create graphs by cli (command in topic 33817), I get an error-message that the RRDFiles are not created. I tried to explain this in the other topic
Greetz
Tom
Edit: Creating the files manually will cause the following error:
Code: Select all
ERROR: reading the cookie off /usr/local/apache2/htdocs/cacti/rra/aaa_dspower1_1096.rrd faild
- TheWitness
- Developer
- Posts: 17062
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
That cookie message typically means a 0 byte file. More than likely this RRDfile is corrupt. Don't know why it's happening but I have seen it with a few customers. More than likely either an rrdtool bug or disk corruption. I am thinking it's a rrdtool bug. I have seen this on rrdtool 1.2.27.
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?
Who is online
Users browsing this forum: No registered users and 0 guests