mirror of
https://github.com/librenms/librenms.git
synced 2024-09-21 18:38:25 +00:00
nimbleos Changed to bit shift high << 32 and add low. Changed over graphs. (#8411)
* Changed to concat 32bit high.low counters * Changed to concat 32bit high.low counters * Correction. Needed to bit shift. Correction. Needed to bit shift << 32 on high and add low. * Correction. Needed to bit shift. Correction. Needed to bit shift << 32 on high and add low. * Added storage removed processor and memory No point in processor and memory until nimble supports it. Added stroage to overhead.
This commit is contained in:
parent
4c2822fe77
commit
2537291734
@ -4,8 +4,7 @@ type: storage
|
||||
icon: nimble
|
||||
over:
|
||||
- { graph: device_bits, text: 'Device Traffic' }
|
||||
- { graph: device_processor, text: 'Processor Usage' }
|
||||
- { graph: device_mempool, text: 'Memory Usage' }
|
||||
- { graph: device_storage, text: 'Storage Usage' }
|
||||
mib_dir:
|
||||
- nimble
|
||||
discovery:
|
||||
|
@ -19,7 +19,7 @@
|
||||
*
|
||||
* @package LibreNMS
|
||||
* @link http://librenms.org
|
||||
* @copyright 2018 theherodied
|
||||
* @copyright 2018 Ryan Finney
|
||||
* @author https://github.com/theherodied/
|
||||
*/
|
||||
use LibreNMS\Config;
|
||||
@ -31,8 +31,9 @@ if (is_array($nimble_storage)) {
|
||||
$units = 1024*1024;
|
||||
$fstype = $storage['volOnline'];
|
||||
$descr = $storage['volName'];
|
||||
$size = $storage['volSizeLow'] * $units;
|
||||
$used = $storage['volUsageLow'] * $units;
|
||||
//nimble uses a high 32bit counter and a low 32bit counter to make a 64bit counter
|
||||
$size = (($storage['volSizeHigh'] << 32 ) + $storage['volSizeLow']) * $units;
|
||||
$used = (($storage['volUsageHigh'] << 32 ) + $storage['volUsageLow']) * $units;
|
||||
if (is_numeric($index)) {
|
||||
discover_storage($valid_storage, $device, $index, $fstype, 'nimbleos', $descr, $size, $units, $used);
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
/**
|
||||
* nimbleos.inc.php
|
||||
*
|
||||
* LibreNMS storage discovery module for Nimble Storage
|
||||
* LibreNMS storage polling module for Nimble Storage
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -19,7 +19,7 @@
|
||||
*
|
||||
* @package LibreNMS
|
||||
* @link http://librenms.org
|
||||
* @copyright 2018 theherodied
|
||||
* @copyright 2018 Ryan Finney
|
||||
* @author https://github.com/theherodied/
|
||||
*/
|
||||
if (!is_array($storage_cache['nimbleos'])) {
|
||||
@ -28,6 +28,7 @@ if (!is_array($storage_cache['nimbleos'])) {
|
||||
}
|
||||
$entry = $storage_cache['nimbleos'][$storage[storage_index]];
|
||||
$storage['units'] = 1024*1024;
|
||||
$storage['size'] = ($entry['volSizeLow'] * $storage['units']);
|
||||
$storage['used'] = ($entry['volUsageLow'] * $storage['units']);
|
||||
//nimble uses a high 32bit counter and a low 32bit counter to make a 64bit counter
|
||||
$storage['size'] = (($entry['volSizeHigh'] << 32 ) + $entry['volSizeLow']) * $storage['units'];
|
||||
$storage['used'] = (($entry['volUsageHigh'] << 32 ) + $entry['volUsageLow']) * $storage['units'];
|
||||
$storage['free'] = ($storage['size'] - $storage['used']);
|
||||
|
Loading…
Reference in New Issue
Block a user