mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-03 00:11:49 +02:00
workaround bsnmp retardation and find some cpus (hardset type to processor if descr includes cpu)
git-svn-id: http://www.observium.org/svn/observer/trunk@2924 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -8,6 +8,11 @@ if (is_array($hrDevice_array))
|
|||||||
{
|
{
|
||||||
foreach ($hrDevice_array as $index => $entry)
|
foreach ($hrDevice_array as $index => $entry)
|
||||||
{
|
{
|
||||||
|
# Workaround bsnmpd reporting CPUs as hrDeviceOther (fuck you, FreeBSD.)
|
||||||
|
if ($entry['hrDeviceType'] == "hrDeviceOther" && preg_match('/^cpu[0-9]+:/', $entry['hrDeviceDescr']))
|
||||||
|
{
|
||||||
|
$entry['hrDeviceType'] = "hrDeviceProcessor";
|
||||||
|
}
|
||||||
if ($entry['hrDeviceType'] == "hrDeviceProcessor")
|
if ($entry['hrDeviceType'] == "hrDeviceProcessor")
|
||||||
{
|
{
|
||||||
$hrDeviceIndex = $entry['hrDeviceIndex'];
|
$hrDeviceIndex = $entry['hrDeviceIndex'];
|
||||||
|
|||||||
Reference in New Issue
Block a user