diff --git a/includes/polling/core.inc.php b/includes/polling/core.inc.php index aa48a08320..41d7bcdf8b 100644 --- a/includes/polling/core.inc.php +++ b/includes/polling/core.inc.php @@ -65,22 +65,10 @@ if (is_numeric($uptime)) { log_event('Device rebooted after '.formatUptime($device['uptime']), $device, 'reboot', $device['uptime']); } - $uptime_rrd = $config['rrd_dir'].'/'.$device['hostname'].'/uptime.rrd'; - - if (!is_file($uptime_rrd)) { - rrdtool_create($uptime_rrd, 'DS:uptime:GAUGE:600:0:U '.$config['rrd_rra']); - } - - $fields = array( - 'uptime' => $uptime, + $tags = array( + 'rrd_def' => 'DS:uptime:GAUGE:600:0:U', ); - - rrdtool_update($uptime_rrd, $fields); - - $measurement = 'uptime'; - $tags = array(); - - influx_update($device,$measurement,$tags,$fields); + data_update($device, 'uptime', $tags, $uptime); $graphs['uptime'] = true;