mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
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:
committed by
Neil Lathwood
parent
0dd3ec25d3
commit
b620692426
@@ -8,7 +8,6 @@ $app_id = $app['app_id'];
|
||||
$oid = '.1.3.6.1.4.1.8072.1.3.2.3.1.2.10.110.116.112.45.115.101.114.118.101.114';
|
||||
$ntpserver_data = snmp_get($device, $oid, '-Oqv');
|
||||
$ntpserver_data = str_replace('"', '', $ntpserver_data);
|
||||
update_application($app, $ntpserver_data);
|
||||
list ($stratum, $offset, $frequency, $jitter, $noise, $stability, $uptime, $buffer_recv, $buffer_free, $buffer_used, $packets_drop, $packets_ignore, $packets_recv, $packets_sent) = explode("\n", $ntpserver_data);
|
||||
|
||||
echo ' '.$name;
|
||||
@@ -51,3 +50,4 @@ $fields = array(
|
||||
|
||||
$tags = compact('name', 'app_id', 'rrd_name', 'rrd_def');
|
||||
data_update($device, 'app', $tags, $fields);
|
||||
update_application($app, $ntpserver_data, $fields);
|
||||
|
Reference in New Issue
Block a user