Initial commit
parent
9fe43380b6
commit
51eb012777
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
use LibreNMS\RRD\RrdDefinition;
|
||||
|
||||
$name = 'ats-watts';
|
||||
$app_id = $app['app_id'];
|
||||
$options = '-O qv';
|
||||
$oid = '.1.3.6.1.4.1.8072.1.3.2.4.1.2.8.97.116.115.119.97.116.116.115.1';
|
||||
|
||||
$rrd_name = array('app', $name, $app_id);
|
||||
$rrd_def = RrdDefinition::make()->addDataset('Watts', 'GAUGE', 0);
|
||||
|
||||
$atswatts = snmp_get($device, $oid, $options, $mib);
|
||||
|
||||
$fields = array('Watts' => $atswatts,);
|
||||
|
||||
$tags = array('name' => $name, 'app_id' => $app_id, 'rrd_def' => $rrd_def, 'rrd_name' => $rrd_name);
|
||||
data_update($device, 'app', $tags, $fields);
|
||||
update_application($app, $atswatts, $fields, $atswatts);
|
Loading…
Reference in New Issue