refactor: Update all applications to store metrics (#7853)

* Update all applications to store metrics

* fix db schema

* Add glue test
This commit is contained in:
Tony Murray
2017-12-06 16:13:10 -06:00
committed by Neil Lathwood
parent 0dd3ec25d3
commit b620692426
44 changed files with 181 additions and 74 deletions

View File

@@ -46,9 +46,6 @@ $oids=array(
'.1.3.6.1.4.1.3495.1.3.2.2.1.10.60'
);
$returnedoids=snmp_get_multi_oid($device, $oids);
if (is_array($returnedoids)) {
update_application($app, 'Data ok');
}
$memmaxsize = $returnedoids['.1.3.6.1.4.1.3495.1.2.5.1.0'];
$swapmaxsize = $returnedoids['.1.3.6.1.4.1.3495.1.2.5.2.0'];
@@ -177,3 +174,6 @@ $fields = array(
$tags = array('name' => $name, 'app_id' => $app_id, 'rrd_def' => $rrd_def, 'rrd_name' => $rrd_name);
data_update($device, 'app', $tags, $fields);
$response = ($returnedoids == false) ? false : 'Data ok';
update_application($app, $response, $fields);