From 05110fc705ede0e0ee58fd4d5837dd4d0b66e990 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Mon, 26 Mar 2012 09:44:35 +0000 Subject: [PATCH] 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 --- includes/discovery/processors/hrdevice.inc.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/includes/discovery/processors/hrdevice.inc.php b/includes/discovery/processors/hrdevice.inc.php index 704925ce6..41b307860 100755 --- a/includes/discovery/processors/hrdevice.inc.php +++ b/includes/discovery/processors/hrdevice.inc.php @@ -8,6 +8,11 @@ if (is_array($hrDevice_array)) { 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") { $hrDeviceIndex = $entry['hrDeviceIndex'];