mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Merge pull request #2740 from paulgear/unified-data-storage-rrd-influx
First cut at unified data storage for rrdtool & influxdb
This commit is contained in:
@@ -1139,25 +1139,17 @@ function save_mibs($device, $mibname, $oids, $mibdef, &$graphs)
|
||||
|
||||
$usedoids[$index][$obj] = $val;
|
||||
|
||||
// if there's a file from the previous version of MIB-based polling, rename it
|
||||
if (rrd_file_exists($device, array($mibname, $mibdef[$obj]['object_type'], $index))
|
||||
&& !rrd_file_exists($device, array($mibname, $mibdef[$obj]['shortname'], $index))) {
|
||||
rrd_file_rename($device,
|
||||
array($mibname, $mibdef[$obj]['object_type'], $index),
|
||||
array($mibname, $mibdef[$obj]['shortname'], $index));
|
||||
// Note: polling proceeds regardless of rename result
|
||||
}
|
||||
|
||||
rrd_create_update(
|
||||
$device,
|
||||
array(
|
||||
$mibname,
|
||||
$mibdef[$obj]['shortname'],
|
||||
$index,
|
||||
),
|
||||
array("DS:mibval:$type"),
|
||||
array("mibval" => $val)
|
||||
$tags = array(
|
||||
'rrd_def' => array("DS:mibval:$type"),
|
||||
'rrd_name' => array($mibname, $mibdef[$obj]['shortname'], $index),
|
||||
'rrd_oldname' => array($mibname, $mibdef[$obj]['object_type'], $index),
|
||||
'index' => $index,
|
||||
'oid' => $mibdef[$obj]['oid'],
|
||||
'module' => $mibdef[$obj]['module'],
|
||||
'mib' => $mibdef[$obj]['mib'],
|
||||
'object_type' => $obj,
|
||||
);
|
||||
data_update($device, 'mibval', $tags, $val);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user