1 | <?php |
||
2 | |||
3 | // .1.3.6.1.2.1.33.1.1.2.0 = STRING: "TRIPP LITE PDUMH20HVATNET" |
||
4 | // .1.3.6.1.2.1.33.1.1.4.0 = STRING: "12.04.0052" |
||
5 | // .1.3.6.1.2.1.33.1.1.5.0 = STRING: "sysname.company.com" |
||
6 | // .1.3.6.1.4.1.850.100.1.1.4.0 = STRING: "9942AY0AC796000912" |
||
7 | // .1.3.6.1.4.1.850.10.2.2.1.12.1 = STRING: "This Is My Location" |
||
8 | $hardware = snmp_get($device, 'upsIdentModel.0', '-Ovq', 'UPS-MIB'); |
||
9 | $hardware = preg_split('/TRIPP\ LITE/', $hardware); |
||
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
10 | $hardware = $hardware[1]; |
||
11 | $location = trim(snmp_get($device, '.1.3.6.1.4.1.850.10.2.2.1.12.1', '-Ovq', 'TRIPPLITE-MIB'), '"'); |
||
12 | $sysName = trim(snmp_get($device, '.1.3.6.1.2.1.33.1.1.5.0', '-Ovq', 'TRIPPLITE-MIB'), '"'); |
||
13 | $serial = trim(snmp_get($device, '.1.3.6.1.4.1.850.100.1.1.4.0', '-Ovq', 'TRIPPLITE-MIB'), '"'); |
||
14 | $version = snmp_get($device, 'upsIdentAgentSoftwareVersion.0', '-Ovq', 'UPS-MIB'); |
||
15 |