I'm trying to add graphs of CPU utilisation to 200 hosts.
How i can add that massively?
I've search database from relations, but i can't find all.
I've do:
Code: Select all
create unique index host_graph_idx_tmp on host_graph (host_id, graph_template_id);
insert into host_graph (host_id, graph_template_id) select id, 88 from host where host_template_id = 12;
drop index host_graph_idx_tmp;
insert into graph_local (graph_template_id, host_id,snmp_query) select 88, id, 0 from host where host_template_id = 12;
insert into data_local (data_template_id, host_id, snmp_query_id) select 71, id, 0 from host where host_template_id = 12;
Some screens after SQL query in attachment.