Data sources not created - RESOLVED!

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

Moderators: Developers, Moderators

chaachee
Posts: 22
Joined: Tue Aug 23, 2005 9:29 am

Data sources not created - RESOLVED!

Post by chaachee »

Cacti version: 0.8.6i
Operating System: Win2003

I recently noticed that the permissions on the /rra folder in my Cacti installation were incorrect (though it was still working fine) so I reset the permissions on the entire /inetpub/wwwroot/cacti folder. Since then, I can create new devices and select the device and graph the host, but no data sources are created for the graphs.

Since I have a bunch of devices already logging, I tried to remove one of the hosts which works and recreate it; once recreated, the data sources are never added.

For example, based on the attached debug log, I created a host named CSPACE19. I then select the Create Graphs for this Host and attempt to graph the network traffic.

Everything appears fine at this point. I go to the Graph Management screen and see an entry titled cspace19 - Traffic - |query_ifIP| (|query_ifDescr|).

When I open this graph, the Inbound Data Source and Outbound Data Source are set to None.

If I go to Data Sources, there are no entries for CSPACE19.

Could a change in file permissions have caused this?
Attachments
create_graph_cacti.txt
Debug log when creating the graph for CSPACE19's network interface.
(34.5 KiB) Downloaded 181 times
create_host_cacti.txt
Debug log when creating the device named CSPACE19.
(24.14 KiB) Downloaded 214 times
Last edited by chaachee on Fri Dec 08, 2006 9:48 am, edited 1 time in total.
chaachee
Posts: 22
Joined: Tue Aug 23, 2005 9:29 am

Post by chaachee »

Anyone have any info on this at all???
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

The rra's are created from poller.php. crontab should start this php script every 5 mins. So you nedd DEBUG log from poller.php, not from GUI actions
Reinhard
User avatar
snark
Posts: 18
Joined: Wed Sep 21, 2005 1:13 am
Contact:

Post by snark »

Why i see graphs and have "None" in data source fields (cacti 0.8.6i clean install)? In my old cacti installation i never seen "None". Btw, i thnk in this case, i can't use ifAlias or ifDescr on my graphs :evil:
Attachments
cacti_error.gif
cacti_error.gif (63.83 KiB) Viewed 5151 times
chaachee
Posts: 22
Joined: Tue Aug 23, 2005 9:29 am

Post by chaachee »

gandalf wrote:The rra's are created from poller.php. crontab should start this php script every 5 mins. So you nedd DEBUG log from poller.php, not from GUI actions
Reinhard
Well, I'm not as concerned with the missing RRAs as I am with the missing Data Sources (the cron is running every 5 minutes already). Why aren't the data sources created when I create the graph? This has worked in the past.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Did you create this graph from "Devices" -> "Edit host" -> "Create Graphs for this Host"?
Reinhard
chaachee
Posts: 22
Joined: Tue Aug 23, 2005 9:29 am

Post by chaachee »

I attempted to create the data source manually and I noticed the following lines in my log (logging isn't set to debug right now):

12/07/2006 11:09:33 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "select snmp_query_graph_rrd.snmp_field_name, data_template_rrd.id as data_template_rrd_id from (snmp_query_graph_rrd,data_template_rrd) where snmp_query_graph_rrd.data_template_rrd_id=data_template_rrd.local_data_template_rrd_id and snmp_query_graph_rrd.snmp_query_graph_id= and snmp_query_graph_rrd.data_template_id=41 and data_template_rrd.local_data_id=186"
12/07/2006 11:09:33 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "select snmp_query_graph_rrd.snmp_field_name, data_template_rrd.id as data_template_rrd_id from (snmp_query_graph_rrd,data_template_rrd) where snmp_query_graph_rrd.data_template_rrd_id=data_template_rrd.local_data_template_rrd_id and snmp_query_graph_rrd.snmp_query_graph_id= and snmp_query_graph_rrd.data_template_id=41 and data_template_rrd.local_data_id=186"
12/07/2006 11:11:25 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "select snmp_query_graph_rrd.snmp_field_name, data_template_rrd.id as data_template_rrd_id from (snmp_query_graph_rrd,data_template_rrd) where snmp_query_graph_rrd.data_template_rrd_id=data_template_rrd.local_data_template_rrd_id and snmp_query_graph_rrd.snmp_query_graph_id= and snmp_query_graph_rrd.data_template_id=41 and data_template_rrd.local_data_id=186"
12/07/2006 11:11:43 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "select data_input_fields.type_code, data_input_data.value from (data_input_fields,data_input_data) where data_input_fields.id=data_input_data.data_input_field_id and data_input_data.data_template_data_id= and (data_input_fields.type_code='index_type' or data_input_fields.type_code='index_value' or data_input_fields.type_code='output_type')"
12/07/2006 11:11:58 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "select data_input_fields.type_code, data_input_data.value from (data_input_fields,data_input_data) where data_input_fields.id=data_input_data.data_input_field_id and data_input_data.data_template_data_id= and (data_input_fields.type_code='index_type' or data_input_fields.type_code='index_value' or data_input_fields.type_code='output_type')"
12/07/2006 11:12:45 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "select data_input_fields.type_code, data_input_data.value from (data_input_fields,data_input_data) where data_input_fields.id=data_input_data.data_input_field_id and data_input_data.data_template_data_id= and (data_input_fields.type_code='index_type' or data_input_fields.type_code='index_value' or data_input_fields.type_code='output_type')"
12/07/2006 11:12:45 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "select snmp_query_graph_rrd.snmp_field_name, data_template_rrd.id as data_template_rrd_id from (snmp_query_graph_rrd,data_template_rrd) where snmp_query_graph_rrd.data_template_rrd_id=data_template_rrd.local_data_template_rrd_id and snmp_query_graph_rrd.snmp_query_graph_id= and snmp_query_graph_rrd.data_template_id=41 and data_template_rrd.local_data_id=186"
12/07/2006 11:14:08 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "select data_input_fields.type_code, data_input_data.value from (data_input_fields,data_input_data) where data_input_fields.id=data_input_data.data_input_field_id and data_input_data.data_template_data_id= and (data_input_fields.type_code='index_type' or data_input_fields.type_code='index_value' or data_input_fields.type_code='output_type')"


The part that stands out is that there isn't a value for snmp_query_graph_rrd.snmp_query_graph_id and data_input_data.data_template_data_id, so the query fails.

Does this help at all?
chaachee
Posts: 22
Joined: Tue Aug 23, 2005 9:29 am

Post by chaachee »

gandalf wrote:Did you create this graph from "Devices" -> "Edit host" -> "Create Graphs for this Host"?
Reinhard
Yes. I then select the interface at the bottom of the page and select In/Out Bytes, then hit Create. Like I mentioned, the graphs are created under Graph Management, but the Data Sources are not created.

I even tried removing a host that was added correctly before (and all associated data sources and graphs) and re-adding it but it won't work.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Did you modify code or use plugin arch?
Reinhard
chaachee
Posts: 22
Joined: Tue Aug 23, 2005 9:29 am

Post by chaachee »

gandalf wrote:Did you modify code or use plugin arch?
Reinhard
The last thing I did before it stopped working is reset permissions on my \cacti folder. The reason I did this is I noticed that my cron user did not have permission to the RRA folder and was causing Access Denied errors in the Windows Security log (this did not prevent it from graphing, but I thought I would address it anyway).

The permissions on the \cacti folder and all sub-folders is:

Administrators (Full Control)
Cacti user (Full control)
IIS_WPG (Read/Write/Modify)
IIS anonymous account (Read/Write)

The permissions a more lax than necessary because I was trying to figure out where the failure was happening.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Moved to windows. Perhaps a permission issue
Reinhard
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Please read my installation guide regarding the various permissions you must set: http://forums.cacti.net/viewtopic.php?t=11747

Additionally, you can use Sysinternals FileMon to track down specific NTFS permission errors.
User avatar
snark
Posts: 18
Joined: Wed Sep 21, 2005 1:13 am
Contact:

Post by snark »

What about me? I don't use M$, i'm FreeBSD user!
chaachee
Posts: 22
Joined: Tue Aug 23, 2005 9:29 am

Post by chaachee »

Well, it appears I've found the issue but have no idea what caused it:

I found that none of my graph template had any Graph Template Items.

I installed another instance of cacti with its own database, exported the graph templates, then imported them into my original installation and now everything is working fine.

Could something have been messed up in MySQL?
Attachments
After template import
After template import
found_items.jpg (54.6 KiB) Viewed 5077 times
Before template import
Before template import
missing_items.jpg (51.42 KiB) Viewed 5077 times
chaachee
Posts: 22
Joined: Tue Aug 23, 2005 9:29 am

Post by chaachee »

gandalf wrote:Moved to windows. Perhaps a permission issue
Reinhard
To gandalf: I wish you wouldn't have been so quick to mark this as a Windows specific issue simply because my installation is on Windows. In this case, the platform was irrelevant, and nothing indicated that the fact that it was installed on Windows was causing the problem.

Even if file permissions HAD been the issue, there had been no troubleshooting done to indicate the problem was Windows specific.

Marc
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest