Add support for Supermicro hardware/serial discovery (#12176)

* Add support for Supermicro hardware/serial discovery

* add tests

* prefix with supermicro

* Update ServerHardware.php

* Update linux_supermicro.json

Co-authored-by: Tony Murray <murraytony@gmail.com>
This commit is contained in:
Jellyfrog
2020-10-06 08:16:29 +02:00
committed by GitHub
parent 3fdbd5c720
commit b5d94c38a6
6 changed files with 2568 additions and 40 deletions

View File

@@ -29,7 +29,7 @@ trait ServerHardware
{
protected function discoverServerHardware()
{
$this->discoverDellHardware() || $this->discoverHpHardware();
$this->discoverDellHardware() || $this->discoverHpHardware() || $this->discoverSupermicroHardware();
}
protected function discoverDellHardware()
@@ -71,4 +71,26 @@ trait ServerHardware
return true;
}
protected function discoverSupermicroHardware()
{
// Detect Supermicro hardware via Supermicro SuperDoctor 5
$hw = snmp_get_multi_oid($this->getDeviceArray(), [
'SUPERMICRO-SD5-MIB::mbProductName.1',
'SUPERMICRO-SD5-MIB::mbSerialNumber.1',
], '-OUQ', null, 'supermicro');
if (empty($hw)) {
return false;
}
$device = $this->getDevice();
if (! empty($hw['SUPERMICRO-SD5-MIB::mbProductName.1'])) {
$device->hardware = 'Supermicro ' . $hw['SUPERMICRO-SD5-MIB::mbProductName.1'];
}
$device->serial = $hw['SUPERMICRO-SD5-MIB::mbSerialNumber.1'] ?? $device->serial;
return true;
}
}

View File

@@ -3,7 +3,7 @@
--
-- October 26 2001, Software LAB
--
-- Copyright (c) 1993-2001 by Super Micro Computer Inc.
-- Copyright (c) 1993-2019 Super Micro Computer, Inc.
-- All rights reserved.
--
-- *****************************************************************
@@ -87,7 +87,9 @@ SMHealthMonitorEntry ::=
smHealthMonitorMaxReading Integer32,
smHealthMonitorMinReading Integer32,
smHealthMonitorDivisor Integer32,
smHealthMonitorMonitor TruthValue
smHealthMonitorMonitor TruthValue,
smHealthMonitorReadingUnit DisplayString,
smHealthMonitorStatus Integer32
}
smHealthMonitorIndex OBJECT-TYPE
@@ -95,7 +97,7 @@ smHealthMonitorIndex OBJECT-TYPE
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"The unique value which identifies this Monitor device."
"The unique value identifies this Monitor device."
::= { smHealthMonitorEntry 1 }
smHealthMonitorName OBJECT-TYPE
@@ -120,11 +122,10 @@ smHealthMonitorReading OBJECT-TYPE
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Indicates the value from the Monitor device that are
currently in use on the managed device.
FAN reading is in unit of RPM,
Voltage reading is in unit of mV,
Temperture reading is in unit of degree C"
"Indicates the reading value for the Monitor device that are currently in use on the managed device.
FAN readings are displayed in RPM.
Voltage readings are displayed in mV.
Temperture readings are displayed in Celsius."
::= { smHealthMonitorEntry 4 }
smHealthMonitorHighLimit OBJECT-TYPE
@@ -132,12 +133,9 @@ smHealthMonitorHighLimit OBJECT-TYPE
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Indicates the value for the High limitation
for the Monitor device that are currently in use on the
managed device.
Apply to Temperature and Voltage deivces only.
Voltage limit is in unit of mV,
Temperture limit is in unit of degree C"
"Indicates the the High limit for the Monitor device that are currently in use on the managed device.
This is applied to Temperature and Voltage devices only.
Voltage limit is displayed in mV, and Temperture limit is displayed in Celsius."
::= { smHealthMonitorEntry 5 }
smHealthMonitorLowLimit OBJECT-TYPE
@@ -145,12 +143,8 @@ smHealthMonitorLowLimit OBJECT-TYPE
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Indicates the value for the Low limitation
for the Monitor device that are currently in use on the
managed device.
FAN limit is in unit of RPM,
Voltage limit is in unit of mV,
Temperture limit is in unit of degree C"
"Indicates the value for the Low limitation for the Monitor device that are currently in use on the managed device.
FAN limit is displayed in RPM, Voltage limit is displayed in mV, and Temperture limit is displayed in Celsius."
::= { smHealthMonitorEntry 6 }
smHealthMonitorMaxReading OBJECT-TYPE
@@ -158,12 +152,10 @@ smHealthMonitorMaxReading OBJECT-TYPE
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Indicates the value for the possible Maximum reading value
for the Monitor device that are currently in use on the
managed device.
FAN reading is in unit of RPM,
Voltage reading is in unit of mV,
Temperture reading is in unit of degree C"
"Indicates the value for the possible Maximum reading value for the Monitor device that are currently in use on the managed device.
FAN readings are displayed in RPM.
Voltage readings are displayed in mV.
Temperture readings are in Celsius."
::= { smHealthMonitorEntry 7 }
smHealthMonitorMinReading OBJECT-TYPE
@@ -171,12 +163,10 @@ smHealthMonitorMinReading OBJECT-TYPE
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Indicates the value for the possible Minimum reading value
for the Monitor device that are currently in use on the
managed device.
FAN reading is in unit of RPM,
Voltage reading is in unit of mV,
Temperture reading is in unit of degree C"
"Indicates the value for the possible Minimum reading value for the Monitor device that are currently in use on the managed device.
FAN readings are displayed in RPM.
Voltage readings are displayed in mV.
Temperture readings are displayed in Celsius."
::= { smHealthMonitorEntry 8 }
smHealthMonitorDivisor OBJECT-TYPE
@@ -184,9 +174,8 @@ smHealthMonitorDivisor OBJECT-TYPE
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Indicates the value for the Divisor for the Fan
device that are currently in use on the managed device.
Apply to Fan devices only."
"Indicates the value for the Divisor for the Fan device that are currently in use on the managed device.
This is applied to Fan devices only."
::= { smHealthMonitorEntry 9 }
smHealthMonitorMonitor OBJECT-TYPE
@@ -194,10 +183,29 @@ smHealthMonitorMonitor OBJECT-TYPE
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Indicates the monitoring status for the Fan device
that are currently in use on the managed device.
1 = monitor, 2=do not monitor"
"Indicates the monitoring status for the Fan device that are currently in use on the managed device.
0 = not monitored, 1 = monitored."
::= { smHealthMonitorEntry 10 }
smHealthMonitorReadingUnit OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Indicates the reading unit of the monitor device."
::= { smHealthMonitorEntry 11 }
smHealthMonitorStatus OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Indicates the status of the monitor device. Values:
0: OK
1: Warning
2: Critical
"
::= { smHealthMonitorEntry 12 }
-- notifications
@@ -243,4 +251,24 @@ smHealthMonitorGroup OBJECT-GROUP
"A collection of objects providing Monitor devices."
::= { smHealthGroups 1 }
smHealthAllinoneStatus OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Indicates the all-in-one status of the monitoring items. Values:
0: OK
1: Warning
2: Critical
"
::= { smHealth 2 }
smHealthAllinoneMsg OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The all-in-one status message of the monitoring items."
::= { smHealth 3 }
END

View File

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,7 @@
--
-- October 1995, Software LAB
--
-- Copyright (c) 1993-2001 by Super Micro Computer Inc.
-- Copyright (c) 1993-2019 Super Micro Computer, Inc.
-- All rights reserved.
--
-- *****************************************************************
@@ -52,4 +52,10 @@ smHealth OBJECT-IDENTITY
"smHealth is the main subtree for new mib development."
::= { supermicro 2 }
smSSMInfo OBJECT-IDENTITY
STATUS current
DESCRIPTION
"smSSMInfo is the main subtree for ssm mib development."
::= { supermicro 100 }
END

View File

@@ -0,0 +1,23 @@
{
"os": {
"discovery": {
"devices": [
{
"sysName": "",
"sysObjectID": ".1.3.6.1.4.1.8072.3.2.10",
"sysDescr": "Linux hostname 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u4 (2018-08-21) x86_64",
"sysContact": null,
"version": "4.9.0-8-amd64",
"hardware": "Supermicro X9SRL-F",
"features": null,
"os": "linux",
"type": "server",
"serial": "ZM145S015127",
"icon": "linux.svg",
"location": null
}
]
},
"poller": "matches discovery"
}
}

View File

@@ -0,0 +1,158 @@
1.3.6.1.2.1.1.1.0|4|Linux hostname 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u4 (2018-08-21) x86_64
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.8072.3.2.10
1.3.6.1.4.1.10876.2.1.1.1.1.2.1|4|CPU Temp
1.3.6.1.4.1.10876.2.1.1.1.1.2.2|4|System Temp
1.3.6.1.4.1.10876.2.1.1.1.1.2.3|4|Peripheral Temp
1.3.6.1.4.1.10876.2.1.1.1.1.2.4|4|PCH Temp
1.3.6.1.4.1.10876.2.1.1.1.1.2.5|4|P1-DIMMA1 TEMP
1.3.6.1.4.1.10876.2.1.1.1.1.2.6|4|P1-DIMMA2 TEMP
1.3.6.1.4.1.10876.2.1.1.1.1.2.7|4|P1-DIMMB1 TEMP
1.3.6.1.4.1.10876.2.1.1.1.1.2.8|4|P1-DIMMB2 TEMP
1.3.6.1.4.1.10876.2.1.1.1.1.2.9|4|P1-DIMMC1 TEMP
1.3.6.1.4.1.10876.2.1.1.1.1.2.10|4|P1-DIMMC2 TEMP
1.3.6.1.4.1.10876.2.1.1.1.1.2.11|4|P1-DIMMD1 TEMP
1.3.6.1.4.1.10876.2.1.1.1.1.2.12|4|P1-DIMMD2 TEMP
1.3.6.1.4.1.10876.2.1.1.1.1.2.13|4|FAN 1
1.3.6.1.4.1.10876.2.1.1.1.1.2.14|4|FAN 2
1.3.6.1.4.1.10876.2.1.1.1.1.2.15|4|FAN 3
1.3.6.1.4.1.10876.2.1.1.1.1.2.16|4|FAN 4
1.3.6.1.4.1.10876.2.1.1.1.1.2.17|4|FAN A
1.3.6.1.4.1.10876.2.1.1.1.1.2.18|4|Vcore
1.3.6.1.4.1.10876.2.1.1.1.1.2.19|4|3.3VCC
1.3.6.1.4.1.10876.2.1.1.1.1.2.20|4|12V
1.3.6.1.4.1.10876.2.1.1.1.1.2.21|4|VDIMM
1.3.6.1.4.1.10876.2.1.1.1.1.2.22|4|5VCC
1.3.6.1.4.1.10876.2.1.1.1.1.2.23|4|CPU VTT
1.3.6.1.4.1.10876.2.1.1.1.1.2.24|4|VBAT
1.3.6.1.4.1.10876.2.1.1.1.1.2.25|4|VSB
1.3.6.1.4.1.10876.2.1.1.1.1.2.26|4|AVCC
1.3.6.1.4.1.10876.2.1.1.1.1.3.1|2|2
1.3.6.1.4.1.10876.2.1.1.1.1.3.2|2|2
1.3.6.1.4.1.10876.2.1.1.1.1.3.3|2|2
1.3.6.1.4.1.10876.2.1.1.1.1.3.4|2|2
1.3.6.1.4.1.10876.2.1.1.1.1.3.5|2|2
1.3.6.1.4.1.10876.2.1.1.1.1.3.6|2|2
1.3.6.1.4.1.10876.2.1.1.1.1.3.7|2|2
1.3.6.1.4.1.10876.2.1.1.1.1.3.8|2|2
1.3.6.1.4.1.10876.2.1.1.1.1.3.9|2|2
1.3.6.1.4.1.10876.2.1.1.1.1.3.10|2|2
1.3.6.1.4.1.10876.2.1.1.1.1.3.11|2|2
1.3.6.1.4.1.10876.2.1.1.1.1.3.12|2|2
1.3.6.1.4.1.10876.2.1.1.1.1.3.13|2|0
1.3.6.1.4.1.10876.2.1.1.1.1.3.14|2|0
1.3.6.1.4.1.10876.2.1.1.1.1.3.15|2|0
1.3.6.1.4.1.10876.2.1.1.1.1.3.16|2|0
1.3.6.1.4.1.10876.2.1.1.1.1.3.17|2|0
1.3.6.1.4.1.10876.2.1.1.1.1.3.18|2|1
1.3.6.1.4.1.10876.2.1.1.1.1.3.19|2|1
1.3.6.1.4.1.10876.2.1.1.1.1.3.20|2|1
1.3.6.1.4.1.10876.2.1.1.1.1.3.21|2|1
1.3.6.1.4.1.10876.2.1.1.1.1.3.22|2|1
1.3.6.1.4.1.10876.2.1.1.1.1.3.23|2|1
1.3.6.1.4.1.10876.2.1.1.1.1.3.24|2|1
1.3.6.1.4.1.10876.2.1.1.1.1.3.25|2|1
1.3.6.1.4.1.10876.2.1.1.1.1.3.26|2|1
1.3.6.1.4.1.10876.2.1.1.1.1.3.27|2|3
1.3.6.1.4.1.10876.2.1.1.1.1.3.28|2|3
1.3.6.1.4.1.10876.2.1.1.1.1.3.29|2|3
1.3.6.1.4.1.10876.2.1.1.1.1.4.1|2|32
1.3.6.1.4.1.10876.2.1.1.1.1.4.2|2|29
1.3.6.1.4.1.10876.2.1.1.1.1.4.3|2|29
1.3.6.1.4.1.10876.2.1.1.1.1.4.4|2|45
1.3.6.1.4.1.10876.2.1.1.1.1.4.5|2|33
1.3.6.1.4.1.10876.2.1.1.1.1.4.6|2|34
1.3.6.1.4.1.10876.2.1.1.1.1.4.7|2|33
1.3.6.1.4.1.10876.2.1.1.1.1.4.8|2|31
1.3.6.1.4.1.10876.2.1.1.1.1.4.9|2|32
1.3.6.1.4.1.10876.2.1.1.1.1.4.10|2|33
1.3.6.1.4.1.10876.2.1.1.1.1.4.11|2|33
1.3.6.1.4.1.10876.2.1.1.1.1.4.12|2|35
1.3.6.1.4.1.10876.2.1.1.1.1.4.13|2|2550
1.3.6.1.4.1.10876.2.1.1.1.1.4.14|2|0
1.3.6.1.4.1.10876.2.1.1.1.1.4.15|2|0
1.3.6.1.4.1.10876.2.1.1.1.1.4.16|2|3975
1.3.6.1.4.1.10876.2.1.1.1.1.4.17|2|0
1.3.6.1.4.1.10876.2.1.1.1.1.4.18|2|912
1.3.6.1.4.1.10876.2.1.1.1.1.4.19|2|3408
1.3.6.1.4.1.10876.2.1.1.1.1.4.20|2|12508
1.3.6.1.4.1.10876.2.1.1.1.1.4.21|2|1520
1.3.6.1.4.1.10876.2.1.1.1.1.4.22|2|5120
1.3.6.1.4.1.10876.2.1.1.1.1.4.23|2|1016
1.3.6.1.4.1.10876.2.1.1.1.1.4.24|2|3504
1.3.6.1.4.1.10876.2.1.1.1.1.4.25|2|3616
1.3.6.1.4.1.10876.2.1.1.1.1.4.26|2|3424
1.3.6.1.4.1.10876.2.1.1.1.1.5.1|2|93
1.3.6.1.4.1.10876.2.1.1.1.1.5.2|2|85
1.3.6.1.4.1.10876.2.1.1.1.1.5.3|2|85
1.3.6.1.4.1.10876.2.1.1.1.1.5.4|2|95
1.3.6.1.4.1.10876.2.1.1.1.1.5.5|2|85
1.3.6.1.4.1.10876.2.1.1.1.1.5.6|2|85
1.3.6.1.4.1.10876.2.1.1.1.1.5.7|2|85
1.3.6.1.4.1.10876.2.1.1.1.1.5.8|2|85
1.3.6.1.4.1.10876.2.1.1.1.1.5.9|2|85
1.3.6.1.4.1.10876.2.1.1.1.1.5.10|2|85
1.3.6.1.4.1.10876.2.1.1.1.1.5.11|2|85
1.3.6.1.4.1.10876.2.1.1.1.1.5.12|2|85
1.3.6.1.4.1.10876.2.1.1.1.1.5.18|2|1520
1.3.6.1.4.1.10876.2.1.1.1.1.5.19|2|3648
1.3.6.1.4.1.10876.2.1.1.1.1.5.20|2|13197
1.3.6.1.4.1.10876.2.1.1.1.1.5.21|2|1776
1.3.6.1.4.1.10876.2.1.1.1.1.5.22|2|5600
1.3.6.1.4.1.10876.2.1.1.1.1.5.23|2|1368
1.3.6.1.4.1.10876.2.1.1.1.1.5.24|2|3648
1.3.6.1.4.1.10876.2.1.1.1.1.5.25|2|3920
1.3.6.1.4.1.10876.2.1.1.1.1.5.26|2|3648
1.3.6.1.4.1.10876.2.1.1.1.1.6.13|2|450
1.3.6.1.4.1.10876.2.1.1.1.1.6.14|2|450
1.3.6.1.4.1.10876.2.1.1.1.1.6.15|2|450
1.3.6.1.4.1.10876.2.1.1.1.1.6.16|2|450
1.3.6.1.4.1.10876.2.1.1.1.1.6.17|2|450
1.3.6.1.4.1.10876.2.1.1.1.1.6.18|2|512
1.3.6.1.4.1.10876.2.1.1.1.1.6.19|2|2880
1.3.6.1.4.1.10876.2.1.1.1.1.6.20|2|10600
1.3.6.1.4.1.10876.2.1.1.1.1.6.21|2|1216
1.3.6.1.4.1.10876.2.1.1.1.1.6.22|2|4320
1.3.6.1.4.1.10876.2.1.1.1.1.6.23|2|896
1.3.6.1.4.1.10876.2.1.1.1.1.6.24|2|2880
1.3.6.1.4.1.10876.2.1.1.1.1.6.25|2|3072
1.3.6.1.4.1.10876.2.1.1.1.1.6.26|2|2880
1.3.6.1.4.1.10876.2.1.1.1.1.9.1|2|0
1.3.6.1.4.1.10876.2.1.1.1.1.9.2|2|0
1.3.6.1.4.1.10876.2.1.1.1.1.9.3|2|0
1.3.6.1.4.1.10876.2.1.1.1.1.9.4|2|0
1.3.6.1.4.1.10876.2.1.1.1.1.9.5|2|0
1.3.6.1.4.1.10876.2.1.1.1.1.9.6|2|0
1.3.6.1.4.1.10876.2.1.1.1.1.9.7|2|0
1.3.6.1.4.1.10876.2.1.1.1.1.9.8|2|0
1.3.6.1.4.1.10876.2.1.1.1.1.9.9|2|0
1.3.6.1.4.1.10876.2.1.1.1.1.9.10|2|0
1.3.6.1.4.1.10876.2.1.1.1.1.9.11|2|0
1.3.6.1.4.1.10876.2.1.1.1.1.9.12|2|0
1.3.6.1.4.1.10876.2.1.1.1.1.10.1|2|1
1.3.6.1.4.1.10876.2.1.1.1.1.10.2|2|1
1.3.6.1.4.1.10876.2.1.1.1.1.10.3|2|1
1.3.6.1.4.1.10876.2.1.1.1.1.10.4|2|1
1.3.6.1.4.1.10876.2.1.1.1.1.10.5|2|1
1.3.6.1.4.1.10876.2.1.1.1.1.10.6|2|1
1.3.6.1.4.1.10876.2.1.1.1.1.10.7|2|1
1.3.6.1.4.1.10876.2.1.1.1.1.10.8|2|1
1.3.6.1.4.1.10876.2.1.1.1.1.10.9|2|1
1.3.6.1.4.1.10876.2.1.1.1.1.10.10|2|1
1.3.6.1.4.1.10876.2.1.1.1.1.10.11|2|1
1.3.6.1.4.1.10876.2.1.1.1.1.10.12|2|1
1.3.6.1.4.1.10876.2.1.1.1.1.10.13|2|1
1.3.6.1.4.1.10876.2.1.1.1.1.10.14|2|0
1.3.6.1.4.1.10876.2.1.1.1.1.10.15|2|0
1.3.6.1.4.1.10876.2.1.1.1.1.10.16|2|1
1.3.6.1.4.1.10876.2.1.1.1.1.10.17|2|0
1.3.6.1.4.1.10876.2.1.1.1.1.10.18|2|1
1.3.6.1.4.1.10876.2.1.1.1.1.10.19|2|1
1.3.6.1.4.1.10876.2.1.1.1.1.10.20|2|1
1.3.6.1.4.1.10876.2.1.1.1.1.10.21|2|1
1.3.6.1.4.1.10876.2.1.1.1.1.10.22|2|1
1.3.6.1.4.1.10876.2.1.1.1.1.10.23|2|1
1.3.6.1.4.1.10876.2.1.1.1.1.10.24|2|1
1.3.6.1.4.1.10876.2.1.1.1.1.10.25|2|1
1.3.6.1.4.1.10876.2.1.1.1.1.10.26|2|1
1.3.6.1.4.1.10876.100.1.6.1.11.1|4|X9SRL-F
1.3.6.1.4.1.10876.100.1.6.1.16.1|4|ZM145S015127