mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* added functionality to set sysLocation override in $os.inc.php files
* php styling fixes
* updated docs for location override in $os.inc.php
* patch poweralert.inc.php to use $location override
* added location override for enexus (Eltek)
* update phpdoc for set_device_location()
* converged location code in core.inc.php to use set_device_location()
* added new snmprec test data for enexus os
* Travis test data
* remove enexus_smartpacks2 test data
* Revert "remove enexus_smartpacks2 test data"
This reverts commit 36c8fc7036
.
* updated enexus_smartpacks2 test data with generic syslocation
* kick travis CI
* kick travis CI
15 lines
856 B
PHP
15 lines
856 B
PHP
<?php
|
|
|
|
// .1.3.6.1.2.1.33.1.1.2.0 = STRING: "TRIPP LITE PDUMH20HVATNET"
|
|
// .1.3.6.1.2.1.33.1.1.4.0 = STRING: "12.04.0052"
|
|
// .1.3.6.1.2.1.33.1.1.5.0 = STRING: "sysname.company.com"
|
|
// .1.3.6.1.4.1.850.100.1.1.4.0 = STRING: "9942AY0AC796000912"
|
|
// .1.3.6.1.4.1.850.10.2.2.1.12.1 = STRING: "This Is My Location"
|
|
$hardware = snmp_get($device, 'upsIdentModel.0', '-Ovq', 'UPS-MIB');
|
|
$hardware = preg_split('/TRIPP\ LITE/', $hardware);
|
|
$hardware = $hardware[1];
|
|
$location = trim(snmp_get($device, '.1.3.6.1.4.1.850.10.2.2.1.12.1', '-Ovq', 'TRIPPLITE-MIB'), '"');
|
|
$sysName = trim(snmp_get($device, '.1.3.6.1.2.1.33.1.1.5.0', '-Ovq', 'TRIPPLITE-MIB'), '"');
|
|
$serial = trim(snmp_get($device, '.1.3.6.1.4.1.850.100.1.1.4.0', '-Ovq', 'TRIPPLITE-MIB'), '"');
|
|
$version = snmp_get($device, 'upsIdentAgentSoftwareVersion.0', '-Ovq', 'UPS-MIB');
|