diff --git a/includes/polling/applications/smart.inc.php b/includes/polling/applications/smart.inc.php index d87d0dfc5527..933ea5343509 100644 --- a/includes/polling/applications/smart.inc.php +++ b/includes/polling/applications/smart.inc.php @@ -132,28 +132,21 @@ $int++; } -# smart enhancement id9 +# smart enhancement id9 $rrd_name = array('app', $name, $app_id); $rrd_def = RrdDefinition::make() ->addDataset('id9', 'GAUGE', 0); $int=0; -$metrics = array(); while (isset($lines[$int])) { list($disk, , , , , , , , , , , , , , , , , , , , , , , , , $id9)=explode(",", $lines[$int]); - if (is_int($id9)) { - $id=null; - } - $rrd_name = array('app', $name.'_id9', $app_id, $disk); - $fields = array( - 'id9'=>$id9 - ); - - $metrics[$disk] = $fields; + $fields = ['id9' => $id9]; + $metrics[$disk]['id9'] = $id9; + $tags = array('name' => $name, 'app_id' => $app_id, 'rrd_def' => $rrd_def, 'rrd_name' => $rrd_name); data_update($device, 'app', $tags, $fields);