Files
librenms-librenms/includes/discovery/os/sentry3.inc.php
Tony Murray 9284bc60ff Update code in includes to be PSR-2 compliant (#4220)
refactor: Update code in /includes to be psr2 compliant #4220
2016-08-28 18:32:58 +01:00

19 lines
608 B
PHP

<?php
if (!$os) {
if (preg_match('/^Sentry\ (Switched|Smart) /', $sysDescr)) {
// ServerTech doesn't have a way to distinguish between sentry3 and sentry4 devices
// Hopefully, we can use the version string to figure it out
$version = trim(snmp_get($device, 'Sentry3-MIB::serverTech.4.1.1.1.3.0', '-Osqnv'));
$version = explode(" ", $version);
$version = intval($version[1]);
// It appears that version 8 and up is good for sentry4
if ($version >= 8) {
$os = 'sentry4';
} else {
$os = 'sentry3';
}
}
}