addDataset('Watts', 'GAUGE', 0); $atswatts = snmp_get($device, $oid, $options, $mib); $fields = array('Watts' => $atswatts,); $tags = array('name' => $name, 'app_id' => $app_id, 'rrd_def' => $rrd_def, 'rrd_name' => $rrd_name); data_update($device, 'app', $tags, $fields); update_application($app, $atswatts, $fields, $atswatts);