Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Newly created graphs based on new data sources do not show up on dropdown of device list. #573

Closed
thurban opened this issue Apr 17, 2017 · 1 comment

Comments

@thurban
Copy link
Contributor

thurban commented Apr 17, 2017

In host.php line 756 ( https://github.com/Cacti/cacti/blob/develop/host.php#L756 ) the ON statement should be:
ON dtd.data_template_id=dtr.data_template_id
instead of
ON dtd.id=dtr.data_template_id

Otherwise the ids do not match:

MariaDB [cacti]> SELECT DISTINCT gt.id, gt.name, dtr.data_template_id
    -> FROM graph_templates AS gt
    -> LEFT JOIN snmp_query_graph AS sqg
    -> ON sqg.graph_template_id = gt.id
    -> INNER JOIN graph_templates_item AS gti
    -> ON gti.graph_template_id=gt.id
    -> INNER JOIN data_template_rrd AS dtr
    -> ON gti.task_item_id=dtr.id;
+----+--------------------------------------------------+------------------+
| id | name                                             | data_template_id |
+----+--------------------------------------------------+------------------+
| 34 | Host - Running Processes                         |               34 |
+----+--------------------------------------------------+------------------+


MariaDB [cacti]> select * from data_template_data;
+----+-----------------------------+---------------+------------------+---------------+--------+---------------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+----------+--------+------------+----------+--------------------------+------------------------+
| id | local_data_template_data_id | local_data_id | data_template_id | data_input_id | t_name | name                                                          | name_cache                                      | data_source_path                                  | t_active | active | t_rrd_step | rrd_step | t_data_source_profile_id | data_source_profile_id |
+----+-----------------------------+---------------+------------------+---------------+--------+---------------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+----------+--------+------------+----------+--------------------------+------------------------+
| 54 |                           0 |             0 |               34 |             1 |        | |host_description| - Running Processes                        |                                                 |                                                   |          | on     |            |      300 |                          |                      1 |
+----+-----------------------------+---------------+------------------+---------------+--------+---------------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+----------+--------+------------+----------+--------------------------+------------------------+
@cigamit
Copy link
Member

cigamit commented Apr 17, 2017

Resolved, thanks!

cigamit added a commit that referenced this issue Apr 17, 2017
Missing Graph Template dropdown items
@cigamit cigamit closed this as completed Apr 17, 2017
@github-actions github-actions bot locked and limited conversation to collaborators Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants