Skip to content

Commit

Permalink
smart application database update fix (#10378)
Browse files Browse the repository at this point in the history
* fix database filling

* Update smart.inc.php

* Update smart.inc.php
  • Loading branch information
SourceDoctor authored and murrant committed Jun 26, 2019
1 parent dd2fc0b commit 932d338
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions includes/polling/applications/smart.inc.php
Expand Up @@ -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);

Expand Down

0 comments on commit 932d338

Please sign in to comment.