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.
//extracts all local_data_ids associated with current local_graph_id
//COMMENTS - > COMMENT#1
$l_d_i=db_fetch_assoc('select
data_template_rrd.id as id,
data_template_rrd.local_data_id,
data_template_rrd.data_source_type_id,
data_template_rrd.data_source_name,
data_template_rrd.data_input_field_id,
graph_templates_graph.lower_limit,
graph_templates_graph.upper_limit,
graph_templates_graph.auto_scale,
graph_templates_graph.auto_scale_opts
from
graph_templates_item
left join data_template_rrd on (graph_templates_item.task_item_id=data_template_rrd.id)
left join graph_templates_graph on (graph_templates_graph.local_graph_id = graph_templates_item.local_graph_id)
where (graph_templates_item.local_graph_id='.$local_graph_id.' and local_data_id <> "")
group by data_template_rrd.id order by sequence
');
//print_r($l_d_i);die;
//extracts poller_items for each local_data_id
//COMMENTS - > COMMENT#2
foreach ($l_d_i as $ldi) {
$local_data_id=$ldi['local_data_id'];
$ds_type=$ldi['data_source_type_id'];
$poller_items = db_fetch_assoc("select
".$ldi['id']." as 'id',
local_data_id,
host_id,
action,
hostname,
snmp_community,
snmp_version,
snmp_username,
snmp_password,".
(($V=="0.8.7") ?
"snmp_auth_protocol,
snmp_priv_passphrase,
snmp_priv_protocol,
snmp_context," : "").
"snmp_port,
snmp_timeout,
rrd_name,
rrd_path,
arg1,
graph_templates_item.consolidation_function_id as cf_id
from poller_item
left join graph_templates_item on graph_templates_item.task_item_id=${ldi['id']}
where local_data_id='$local_data_id'");