addDataset($oid_ds, 'GAUGE', null, 100000000000); } foreach ($oids_counter as $oid) { $oid_ds = str_replace($shorten, $short_replacement, $oid); $rrd_def->addDataset($oid_ds, 'COUNTER', null, 100000000000); } $fields = array(); foreach ($oids as $oid) { if (is_numeric($data[0][$oid])) { $rrdupdate = ':'.$data[0][$oid]; } else { $rrdupdate = 'U'; } $fields[$oid] = $rrdupdate; } $tags = compact('rrd_def'); data_update($device, 'netscaler-stats-tcp', $tags, $fields); $graphs['netscaler_tcp_conn'] = true; $graphs['netscaler_tcp_bits'] = true; $graphs['netscaler_tcp_pkts'] = true; }//end if unset($oids_gauge, $oids_counter, $oids, $data, $tags, $fields, $rrd_def, $shorten, $short_replacement);