mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
refactor: Mib poll def to seperate MIB name from RRD name (#6028)
* extended poll_mib_def() to take rrd_name as optional parameter * removed tabs * refactored to use
This commit is contained in:
committed by
Neil Lathwood
parent
002f4157b6
commit
11e52b5e69
@@ -397,6 +397,9 @@ function poll_mib_def($device, $mib_name_table, $mib_subdir, $mib_oids, $mib_gra
|
||||
} else {
|
||||
$measurement_name = strtolower($rrd_name);
|
||||
}
|
||||
if (is_null($rrd_name)) {
|
||||
$rrd_name = $measurement_name;
|
||||
}
|
||||
|
||||
$rrd_def = new RrdDefinition();
|
||||
$oidglist = array();
|
||||
@@ -453,7 +456,7 @@ function poll_mib_def($device, $mib_name_table, $mib_subdir, $mib_oids, $mib_gra
|
||||
}
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, $measurement_name, $tags, $fields);
|
||||
data_update($device, $rrd_name, $tags, $fields);
|
||||
|
||||
foreach ($mib_graphs as $graphtoenable) {
|
||||
$graphs[$graphtoenable] = true;
|
||||
|
Reference in New Issue
Block a user