Known variables that can be used: the data source id (local_data.id) and the host id (local_data.host_id).
Here is an example of a very first query try which fetches all the graphs associated to a particular host:
Code: Select all
SELECT graph_local.id,
graph_templates_graph.title_cache AS name
FROM data_local, graph_local, graph_templates_graph
WHERE data_local.id = '$data_source_id'
AND data_local.host_id = '$host_id'
AND data_local.host_id = graph_local.host_id
AND graph_local.id = graph_templates_graph.local_graph_id
ORDER BY graph_templates_graph.title_cache
PS: maybe this thread is in the wrong forum section, sorry for that in this case.