mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* Add PK-SOFTWARE-APPLIANCE-V2 MIB * Add support for PrimeKey Software Appliance * Move file to correct path * Make the OS detection more specific * Thanks vscode * Sync filename with osname * Not supported * Track SQL database size as volume * Two fixes
19 lines
693 B
PHP
19 lines
693 B
PHP
<?php
|
|
|
|
// This isn't a volume, so we have to fake it a bit
|
|
if ($device['os'] === 'primekey-sw') {
|
|
$oids = snmp_get_multi_oid($device, ['pk-SAV2-internal-databaseAvailableStorage.0', 'pk-SAV2-internal-databaseTotalStorage.0'], '-OUQn', 'PK-SOFTWARE-APPLIANCE-V2');
|
|
|
|
$fstype = 'sql';
|
|
$descr = 'Internal Database';
|
|
$units = 1024;
|
|
$index = 0;
|
|
$free = $oids['.1.3.6.1.4.1.22408.1.4.1.3.1.2.0'];
|
|
$total = $oids['.1.3.6.1.4.1.22408.1.4.1.3.1.3.0'];
|
|
$used = $total - $free;
|
|
if (is_numeric($free) && is_numeric($total)) {
|
|
discover_storage($valid_storage, $device, $index, $fstype, 'primekey-sw-sql', $descr, $total, $units, $used);
|
|
}
|
|
unset($oids);
|
|
}
|