Skip to content

Commit fb65e04

Browse files
author
Carl Chang
committed
add optional argument: category;
add more information for HP; add option to use a separate config file; update readme;
1 parent a0851c6 commit fb65e04

File tree

6 files changed

+492
-163
lines changed

6 files changed

+492
-163
lines changed

.idea/check_snmp.iml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/deployment.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 46 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22
#### Python script that checks components status against Dell or HPE servers with snmpwalk command
33

44
```
5-
usage: check_snmp.py [-h] [-v VERSION] [-c COMMUNITY] [-r] [-f] host
5+
usage: check_snmp.py [-h] [-v VERSION] [-c COMMUNITY] [-r] [-f]
6+
host [config] [category [category ...]]
67
78
positional arguments:
89
host The host to connect to.
10+
config The configuration file to load.
11+
category One or more of the categories from the configuration separated by spaces.
912
1013
optional arguments:
1114
-h, --help show this help message and exit
@@ -78,34 +81,59 @@ OID (numeric format) | OID Translation | Description
7881
1.3.6.1.4.1.674.10892.5.4.200.10.1.58 | systemStateIDSDMCardUnitStatusCombined
7982
1.3.6.1.4.1.674.10892.5.4.200.10.1.60 | systemStateIDSDMCardDeviceStatusCombined
8083
1.3.6.1.4.1.674.10892.5.4.200.10.1.63 | systemStateTemperatureStatisticsStatusCombined
81-
1.3.6.1.4.1.674.10892.5.4.300.40.1.7.1 | eventLogSeverityStatus
82-
1.3.6.1.4.1.674.10892.5.2.1 | globalSystemStatus | Overall system status
83-
1.3.6.1.4.1.674.10892.5.4.1100.50.1.5 | memoryDeviceStatus | Memory status
84-
1.3.6.1.4.1.674.10892.5.5.1.20.130.4.1.4 | physicalDiskState | Physical disk status
85-
1.3.6.1.4.1.674.10892.5.5.1.20.130.1.1.38 | controllerComponentStatus | Storage controller status
86-
1.3.6.1.4.1.674.10892.5.4.700.10.1.8 | coolingUnitStatus | Cooling status
87-
1.3.6.1.4.1.674.10892.5.4.700.20.1.5 | temperatureProbeStatus | Temperature status
88-
1.3.6.1.4.1.674.10892.5.4.600.12.1.5 | powerSupplyStatus | Power supply status
84+
1.3.6.1.4.1.674.10892.5.4.300.40.1.7 | eventLogSeverityStatus
85+
1.3.6.1.4.1.674.10892.5.1.3.12 | systemModelName
86+
1.3.6.1.4.1.674.10892.5.1.3.2 | systemServiceTag
87+
1.3.6.1.4.1.674.10892.5.2.1 | globalSystemStatus
88+
1.3.6.1.4.1.674.10892.5.4.1100.30.1.23 | processorDeviceBrandName
89+
1.3.6.1.4.1.674.10892.5.4.1100.30.1.5 | processorDeviceStatus
90+
1.3.6.1.4.1.674.10892.5.4.1100.50.1.8 | memoryDeviceLocationName
91+
1.3.6.1.4.1.674.10892.5.4.1100.50.1.5 | memoryDeviceStatus
92+
1.3.6.1.4.1.674.10892.5.5.1.20.130.4.1.55 | physicalDiskDisplayName
93+
1.3.6.1.4.1.674.10892.5.5.1.20.130.4.1.4 | physicalDiskState
94+
1.3.6.1.4.1.674.10892.5.5.1.20.140.1.1.36 | virtualDiskDisplayName
95+
1.3.6.1.4.1.674.10892.5.5.1.20.140.1.1.4 | virtualDiskState
96+
1.3.6.1.4.1.674.10892.5.5.1.20.130.1.1.2 | controllerName
97+
1.3.6.1.4.1.674.10892.5.5.1.20.130.1.1.38 | controllerComponentStatus
98+
1.3.6.1.4.1.674.10892.5.4.700.10.1.7 | coolingUnitName
99+
1.3.6.1.4.1.674.10892.5.4.700.10.1.8 | coolingUnitStatus
100+
1.3.6.1.4.1.674.10892.5.4.700.20.1.8 | temperatureProbeLocationName
101+
1.3.6.1.4.1.674.10892.5.4.700.20.1.5 | temperatureProbeStatus
102+
1.3.6.1.4.1.674.10892.5.4.600.12.1.8 | powerSupplyLocationName
103+
1.3.6.1.4.1.674.10892.5.4.600.12.1.5 | powerSupplyStatus
104+
1.3.6.1.4.1.674.10892.5.4.600.50.1.7 | systemBatteryLocationName
105+
1.3.6.1.4.1.674.10892.5.4.600.50.1.5 | systemBatteryStatus
89106

90107
#### HPE
91-
HPE OIDs are much harder to collect since they are scattered into multiple MIBs and there are few clear support documents online.
108+
HPE OIDs are much harder to collect since they are scattered into multiple MIBs and there are fewer clear support documents online.
92109

93110
OID (numeric format) | OID Translation | Description
94111
---| --- | ---
95112
1.3.6.1.4.1.232.6.1.3.0 | cpqHeMibCondition | Overall system condition
96-
1.3.6.1.4.1.232.6.2.6.5.0 | cpqHeThermalCpuFanStatus | CPU fan condition
97-
1.3.6.1.4.1.232.6.2.6.4.0 | cpqHeThermalSystemFanStatus | System fan condition
98113
1.3.6.1.4.1.232.3.1.3.0 | cpqDaMibCondition | Disk array condition
99-
1.3.6.1.4.1.232.3.2.2.1.1.6.0 | cpqDaCntlrCondition | Disk controller condition
100-
1.3.6.1.4.1.232.3.2.2.2.1.9.0 | cpqDaAccelCondition | Disk accelerator condition
101-
1.3.6.1.4.1.232.6.2.9.3.1.4.0 | cpqHeFltTolPowerSupplyCondition | Power supply condition
102-
1.3.6.1.4.1.232.6.2.6.3.0 | cpqHeThermalTempStatus | Temperature condition
103-
1.3.6.1.4.1.232.6.2.6.1.0 | cpqHeThermalCondition | Thermal condition
104114
1.3.6.1.4.1.232.6.2.11.2.0 | cpqHeEventLogCondition | Integrated Management Log condition
105115
1.3.6.1.4.1.232.18.1.3.0 | cpqNicMibCondition | NIC condition
106-
1.3.6.1.4.1.232.1.1.3.0 | cpqSeMibCondition | CPU?
107116
1.3.6.1.4.1.232.9.1.3.0 | cpqSm2MibCondition | iLO condition
108117
1.3.6.1.4.1.232.2.1.3.0 | cpqSiMibCondition | System information condition
118+
1.3.6.1.4.1.232.2.2.4.2 | cpqSiProductName | Model
119+
1.3.6.1.4.1.232.2.2.2.1 | cpqSiSysSerialNum | Serial number
120+
1.3.6.1.4.1.232.6.1.3.0 | cpqHeMibCondition | Overall health condition
121+
1.3.6.1.4.1.232.1.2.2.1.1.3 | cpqSeCpuName | CPU Model
122+
1.3.6.1.4.1.232.1.2.2.1.1.6 | cpqSeCpuStatus | CPU status
123+
1.3.6.1.4.1.232.6.2.14.13.1.13 | cpqHeResMem2ModuleHwLocation | Memory location
124+
1.3.6.1.4.1.232.6.2.14.13.1.20 | cpqHeResMem2ModuleCondition | Memory condition
125+
1.3.6.1.4.1.232.3.2.5.1.1.64 | cpqDaPhyDrvLocationString | Physical disk location
126+
1.3.6.1.4.1.232.3.2.5.1.1.37 | cpqDaPhyDrvCondition | Physical disk condition
127+
1.3.6.1.4.1.232.3.2.3.1.1.11 | cpqDaLogDrvCondition | Virtual disk condition
128+
1.3.6.1.4.1.232.3.2.2.1.1.2 | cpqDaCntlrModel | Storage controller model
129+
1.3.6.1.4.1.232.3.2.2.1.1.6.0 | cpqDaCntlrCondition | Storage controller condition
130+
1.3.6.1.4.1.232.3.2.2.2.1.9.0 | cpqDaAccelCondition | Disk accelerator condition
131+
1.3.6.1.4.1.232.6.2.6.7.1.3 | cpqHeFltTolFanLocale | Fan location
132+
1.3.6.1.4.1.232.6.2.6.7.1.9 | cpqHeFltTolFanCondition | Fan condition
133+
1.3.6.1.4.1.232.6.2.6.8.1.3 | cpqHeTemperatureLocale | Temperature probe location
134+
1.3.6.1.4.1.232.6.2.6.8.1.6 | cpqHeTemperatureCondition | Temperature condition
135+
1.3.6.1.4.1.232.6.2.9.3.1.10 | cpqHeFltTolPowerSupplyModel | Power supply model
136+
1.3.6.1.4.1.232.6.2.9.3.1.4.0 | cpqHeFltTolPowerSupplyCondition | Power supply condition
109137

110138
### Links
111139
[OID repository - HPE root (Compaq)](http://www.oid-info.com/get/1.3.6.1.4.1.232)

0 commit comments

Comments
 (0)