Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
Post general support questions here that do not specifically fall into the Linux or Windows categories.
Moderators: Developers , Moderators
Polaris75
Posts: 4 Joined: Tue Jun 01, 2010 2:18 pm
Post
by Polaris75 » Tue Jun 01, 2010 2:33 pm
I've been pulling my hair out for a couple of days trying to connect the dots here, and I've finally given up trying to figure it out on my own ... help would be GREATLY appreciated!
I need to correlate graphs, based on description, to either local_data_id or, if I've gone that far, data_source_path, and I can't quite seem to connect the dots ...
I need to get from here:
Code: Select all
mysql> select id, local_graph_id, title_cache from graph_templates_graph where title_cache like "%ROUTER1%-%7/0/1%";
+------+----------------+-------------------------------------------------+
| id | local_graph_id | title_cache |
+------+----------------+-------------------------------------------------+
| 5866 | 5814 | ROUTER1 - PO7/0/1 To ROUTER2 POS7/0/1 |
+------+----------------+-------------------------------------------------+
1 row in set (0.05 sec)
mysql>
to here:
Code: Select all
mysql> select id, local_data_id, name_cache, data_source_path from data_template_data where local_data_id = 5793;
+------+---------------+----------------------------------+---------------------------------------------+
| id | local_data_id | name_cache | data_source_path |
+------+---------------+----------------------------------+---------------------------------------------+
| 5864 | 5793 | ROUTER1 - Traffic - PO7/0/1 | <path_rra>/router1_traffic_in_5793.rrd |
+------+---------------+----------------------------------+---------------------------------------------+
1 row in set (0.00 sec)
mysql>
and I keep running into dead ends ... if someone could tell me how to it would be greatly appreciated. Thanks!
Polaris75
Posts: 4 Joined: Tue Jun 01, 2010 2:18 pm
Post
by Polaris75 » Tue Jun 01, 2010 2:57 pm
YAY! Nevermind! Found it FINALLY!
Code: Select all
mysql> select id, local_graph_id, title_cache from graph_templates_graph where title_cache like "%ROUTER1%-%7/0/1%";
+------+----------------+-------------------------------------------------+
| id | local_graph_id | title_cache |
+------+----------------+-------------------------------------------------+
| 5866 | 5814 | ROUTER1 - PO7/0/1 To ROUTER2 POS7/0/1 |
+------+----------------+-------------------------------------------------+
1 row in set (0.05 sec)
mysql>
Code: Select all
mysql> select * from graph_local where id = 5814;
+------+-------------------+---------+---------------+------------+
| id | graph_template_id | host_id | snmp_query_id | snmp_index |
+------+-------------------+---------+---------------+------------+
| 5814 | 2 | 143 | 1 | 29 |
+------+-------------------+---------+---------------+------------+
1 row in set (0.00 sec)
mysql>
Code: Select all
mysql> select * from data_local where host_id = 143 and snmp_index = 29;
+------+------------------+---------+---------------+------------+
| id | data_template_id | host_id | snmp_query_id | snmp_index |
+------+------------------+---------+---------------+------------+
| 5793 | 41 | 143 | 1 | 29 |
+------+------------------+---------+---------------+------------+
1 row in set (0.01 sec)
mysql>
Code: Select all
mysql> select id, local_data_id, name_cache, data_source_path from data_template_data where local_data_id = 5793;
+------+---------------+----------------------------------+---------------------------------------------+
| id | local_data_id | name_cache | data_source_path |
+------+---------------+----------------------------------+---------------------------------------------+
| 5864 | 5793 | ROUTER1 - Traffic - PO7/0/1 | <path_rra>/router1_traffic_in_5793.rrd |
+------+---------------+----------------------------------+---------------------------------------------+
1 row in set (0.00 sec)
mysql>
lcano
Cacti User
Posts: 190 Joined: Thu Oct 09, 2008 5:46 pm
Location: Spain
Post
by lcano » Tue Jun 01, 2010 3:01 pm
Polaris75
Posts: 4 Joined: Tue Jun 01, 2010 2:18 pm
Post
by Polaris75 » Tue Jun 01, 2010 3:22 pm
Yep
I did search first, but for 'database', so I missed that
Thanks
Users browsing this forum: No registered users and 2 guests