diff --git a/includes/definitions.inc.php b/includes/definitions.inc.php index 741f1c04b3..34704ecd03 100644 --- a/includes/definitions.inc.php +++ b/includes/definitions.inc.php @@ -1466,8 +1466,8 @@ $config['os'][$os]['type'] = 'power'; $config['os'][$os]['over'][0]['graph'] = 'device_current'; $config['os'][$os]['over'][0]['text'] = 'Current'; -$os = 'megatec'; -$config['os'][$os]['text'] = 'Megatec UPS'; +$os = 'netagent2'; +$config['os'][$os]['text'] = 'NET Agent II UPS'; $config['os'][$os]['group'] = 'ups'; $config['os'][$os]['type'] = 'power'; $config['os'][$os]['over'][0]['graph'] = 'device_load'; diff --git a/includes/discovery/os/megatec.inc.php b/includes/discovery/os/netagent2.inc.php similarity index 97% rename from includes/discovery/os/megatec.inc.php rename to includes/discovery/os/netagent2.inc.php index 374db128a9..0d21ca7c10 100644 --- a/includes/discovery/os/megatec.inc.php +++ b/includes/discovery/os/netagent2.inc.php @@ -24,5 +24,5 @@ */ if (starts_with($sysDescr, 'NET Agent II')) { - $os = 'megatec'; + $os = 'netagent2'; } diff --git a/includes/discovery/sensors/charge/megatec.inc.php b/includes/discovery/sensors/charge/netagent2.inc.php similarity index 95% rename from includes/discovery/sensors/charge/megatec.inc.php rename to includes/discovery/sensors/charge/netagent2.inc.php index 72adfcc8ad..671c21687c 100644 --- a/includes/discovery/sensors/charge/megatec.inc.php +++ b/includes/discovery/sensors/charge/netagent2.inc.php @@ -23,12 +23,12 @@ * @author Tony Murray */ -if ($device['os'] == 'megatec') { +if ($device['os'] == 'netagent2') { $charge_oid = '.1.3.6.1.4.1.935.1.1.1.2.2.1.0'; $charge = snmp_get($device, $charge_oid, '-Osqnv'); if (!empty($charge)) { - $type = 'megatec'; + $type = 'netagent2'; $index = 0; $limit = 100; $lowlimit = 0; diff --git a/includes/discovery/sensors/current/megatec.inc.php b/includes/discovery/sensors/current/netagent2.inc.php similarity index 95% rename from includes/discovery/sensors/current/megatec.inc.php rename to includes/discovery/sensors/current/netagent2.inc.php index 7ace52f6f8..d68a5ced16 100644 --- a/includes/discovery/sensors/current/megatec.inc.php +++ b/includes/discovery/sensors/current/netagent2.inc.php @@ -24,12 +24,12 @@ */ -if ($device['os'] == 'megatec') { +if ($device['os'] == 'netagent2') { $battery_current_oid = '.1.3.6.1.4.1.935.1.1.1.3.2.1.0'; $battery_current = snmp_get($device, $battery_current_oid, '-Oqv'); if (!empty($battery_current) || $battery_current == 0) { - $type = 'megatec'; + $type = 'netagent2'; $index = 0; $limit = 30; $warnlimit = null; diff --git a/includes/discovery/sensors/frequencies/megatec.inc.php b/includes/discovery/sensors/frequencies/netagent2.inc.php similarity index 95% rename from includes/discovery/sensors/frequencies/megatec.inc.php rename to includes/discovery/sensors/frequencies/netagent2.inc.php index e798885f6c..ee85c8c815 100644 --- a/includes/discovery/sensors/frequencies/megatec.inc.php +++ b/includes/discovery/sensors/frequencies/netagent2.inc.php @@ -24,12 +24,12 @@ */ -if ($device['os'] == 'megatec') { +if ($device['os'] == 'netagent2') { $in_frequency_oid = '.1.3.6.1.4.1.935.1.1.1.3.2.4.0'; $in_frequency = snmp_get($device, $in_frequency_oid, '-Oqv'); if (!empty($in_frequency) || $in_frequency == 0) { - $type = 'megatec'; + $type = 'netagent2'; $index = 0; $limit = 60; $warnlimit = 51; @@ -61,7 +61,7 @@ if ($device['os'] == 'megatec') { $out_frequency = snmp_get($device, $frequency_oid, '-Oqv'); if (!empty($out_frequency) || $out_frequency == 0) { - $type = 'megatec'; + $type = 'netagent2'; $index = 0; $limit = 60; $warnlimit = 51; diff --git a/includes/discovery/sensors/load/megatec.inc.php b/includes/discovery/sensors/load/netagent2.inc.php similarity index 95% rename from includes/discovery/sensors/load/megatec.inc.php rename to includes/discovery/sensors/load/netagent2.inc.php index 625657fa62..41f920754d 100644 --- a/includes/discovery/sensors/load/megatec.inc.php +++ b/includes/discovery/sensors/load/netagent2.inc.php @@ -24,12 +24,12 @@ */ -if ($device['os'] == 'megatec') { +if ($device['os'] == 'netagent2') { $load_oid = '.1.3.6.1.4.1.935.1.1.1.4.2.3.0'; $output_load = snmp_get($device, $load_oid, '-Oqv'); if (!empty($output_load) || $output_load == 0) { - $type = 'megatec'; + $type = 'netagent2'; $index = 0; $limit = 100; $warnlimit = 80; diff --git a/includes/discovery/sensors/temperatures/megatec.inc.php b/includes/discovery/sensors/temperatures/netagent2.inc.php similarity index 95% rename from includes/discovery/sensors/temperatures/megatec.inc.php rename to includes/discovery/sensors/temperatures/netagent2.inc.php index 833453141a..2835ac7b91 100644 --- a/includes/discovery/sensors/temperatures/megatec.inc.php +++ b/includes/discovery/sensors/temperatures/netagent2.inc.php @@ -24,12 +24,12 @@ */ -if ($device['os'] == 'megatec') { +if ($device['os'] == 'netagent2') { $ups_temperature_oid = '.1.3.6.1.4.1.935.1.1.1.2.2.3.0'; $ups_temperature = snmp_get($device, $ups_temperature_oid, '-Oqv'); if (!empty($ups_temperature) || $ups_temperature == 0) { - $type = 'megatec'; + $type = 'netagent2'; $index = 0; $limit = 50; $warnlimit = 40; diff --git a/includes/discovery/sensors/voltages/megatec.inc.php b/includes/discovery/sensors/voltages/netagent2.inc.php similarity index 95% rename from includes/discovery/sensors/voltages/megatec.inc.php rename to includes/discovery/sensors/voltages/netagent2.inc.php index d5022575a8..c1875d04d4 100644 --- a/includes/discovery/sensors/voltages/megatec.inc.php +++ b/includes/discovery/sensors/voltages/netagent2.inc.php @@ -24,12 +24,12 @@ */ -if ($device['os'] == 'megatec') { +if ($device['os'] == 'netagent2') { $in_voltage_oid = '.1.3.6.1.4.1.935.1.1.1.3.2.1.0'; $in_voltage = snmp_get($device, $in_voltage_oid, '-Oqv'); if (!empty($in_voltage) || $in_voltage == 0) { - $type = 'megatec'; + $type = 'netagent2'; $index = 0; $limit = 300; $warnlimit = 253; @@ -61,7 +61,7 @@ if ($device['os'] == 'megatec') { $out_voltage = snmp_get($device, $out_voltage_oid, '-Oqv'); if (!empty($out_voltage) || $out_voltage == 0) { - $type = 'megatec'; + $type = 'netagent2'; $index = 0; $limit = 300; $warnlimit = 253; diff --git a/includes/polling/os/megatec.inc.php b/includes/polling/os/netagent2.inc.php similarity index 100% rename from includes/polling/os/megatec.inc.php rename to includes/polling/os/netagent2.inc.php diff --git a/tests/OSDiscoveryTest.php b/tests/OSDiscoveryTest.php index 71a5c2568f..4d841cdf8c 100644 --- a/tests/OSDiscoveryTest.php +++ b/tests/OSDiscoveryTest.php @@ -1197,7 +1197,7 @@ class DiscoveryTest extends \PHPUnit_Framework_TestCase public function testMegatec() { - $this->checkOS('megatec'); + $this->checkOS('netagent2'); } public function testSmartax() diff --git a/tests/snmpsim/megatec.snmprec b/tests/snmpsim/netagent2.snmprec similarity index 100% rename from tests/snmpsim/megatec.snmprec rename to tests/snmpsim/netagent2.snmprec