mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Move to fixed DS names in MIB-based polling; add script to convert RRDs
This commit is contained in:
@ -16,14 +16,12 @@ $rrd_list = array();
|
||||
$prefix = rrd_name($device['hostname'], array($subtype, ''), '');
|
||||
foreach (glob($prefix.'*.rrd') as $filename) {
|
||||
// find out what * expanded to
|
||||
$globpart = str_replace($prefix, '', $filename);
|
||||
// take off the prefix
|
||||
$instance = substr($globpart, 0, -4);
|
||||
// take off ".rrd"
|
||||
$globpart = str_replace($prefix, '', $filename); // take off the prefix
|
||||
$instance = substr($globpart, 0, -4); // take off ".rrd"
|
||||
$ds = array();
|
||||
$mibparts = explode('-', $subtype);
|
||||
$mibvar = end($mibparts);
|
||||
$ds['ds'] = name_shorten($mibvar);
|
||||
$ds['ds'] = 'mibval';
|
||||
$ds['descr'] = "$mibvar-$instance";
|
||||
$ds['filename'] = $filename;
|
||||
$rrd_list[] = $ds;
|
||||
|
Reference in New Issue
Block a user