Skip to content

Commit

Permalink
tripplite support from falz
Browse files Browse the repository at this point in the history
git-svn-id: http://www.observium.org/svn/observer/trunk@2036 61d68cd4-352d-0410-923a-c4978735b2b8
  • Loading branch information
adama committed Apr 8, 2011
1 parent af0054a commit e159595
Show file tree
Hide file tree
Showing 7 changed files with 2,654 additions and 10 deletions.
Binary file added html/images/os/tripplite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions includes/discovery/current/rfc1628.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
global $valid_sensor;

## RFC1628 UPS
if ($device['os'] == "netmanplus" || $device['os'] == "deltaups")
if ($device['os'] == "netmanplus" || $device['os'] == "deltaups" || $device['os'] == "poweralert")
{
echo("RFC1628 ");

Expand Down Expand Up @@ -75,4 +75,4 @@
}
}

?>
?>
4 changes: 2 additions & 2 deletions includes/discovery/frequencies/rfc1628.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
global $valid_sensor;

## RFC1628
if ($device['os'] == "netmanplus" || $device['os'] == "deltaups")
if ($device['os'] == "netmanplus" || $device['os'] == "deltaups" || $device['os'] == "poweralert")
{
echo("RFC1628 ");

Expand Down Expand Up @@ -38,4 +38,4 @@
discover_sensor($valid_sensor, 'freq', $device, $freq_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
}

?>
?>
4 changes: 2 additions & 2 deletions includes/discovery/temperatures/rfc1628.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

global $valid_sensor;

if ($device['os'] == "netmanplus" || $device['os'] == 'deltaups')
if ($device['os'] == "netmanplus" || $device['os'] == "deltaups" || $device['os'] == "poweralert")
{
$oids = snmp_walk($device, "1.3.6.1.2.1.33.1.2.7", "-Osqn", "UPS-MIB");
if ($debug) { echo($oids."\n"); }
Expand All @@ -25,4 +25,4 @@
}
}

?>
?>
12 changes: 8 additions & 4 deletions includes/discovery/voltages/rfc1628.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
global $valid_sensor;

## RFC1628 UPS Voltages
if ($device['os'] == "netmanplus" || $device['os'] == "deltaups")
#if ($device['os'] == "netmanplus" || $device['os'] == "deltaups")
if ($device['os'] == "netmanplus" || $device['os'] == "deltaups" || $device['os'] == "poweralert")
{
echo("RFC1628 ");

Expand All @@ -20,6 +21,7 @@
$volt_id = $split_oid[count($split_oid)-1];
$volt_oid = "1.3.6.1.2.1.33.1.2.5.$volt_id";
$divisor = 10;
if ($device['os'] == "poweralert") { $divisor = 1; };
$volt = snmp_get($device, $volt_oid, "-O vq") / $divisor;
$descr = "Battery" . (count(explode("\n",$oids)) == 1 ? '' : ' ' . ($volt_id+1));
$type = "rfc1628";
Expand Down Expand Up @@ -52,7 +54,8 @@
$volt_oid = "1.3.6.1.2.1.33.1.3.3.1.3.$i";
$descr = "Input"; if ($numPhase > 1) $descr .= " Phase $i";
$type = "rfc1628";
$divisor = 10; if ($device['os'] == "netmanplus") { $divisor = 1; };
$divisor = 10;
if ($device['os'] == "netmanplus" || $device['os'] == "poweralert") { $divisor = 1; };
$current = snmp_get($device, $volt_oid, "-Oqv") / $divisor;
$index = 100+$i;

Expand All @@ -67,12 +70,13 @@
$volt_oid = "1.3.6.1.2.1.33.1.5.3.1.2.$i";
$descr = "Bypass"; if ($numPhase > 1) $descr .= " Phase $i";
$type = "rfc1628";
$divisor = 10; if ($device['os'] == "netmanplus") { $divisor = 1; };
$divisor = 10;
if ($device['os'] == "netmanplus" || $device['os'] == "poweralert") { $divisor = 1; };
$current = snmp_get($device, $volt_oid, "-Oqv") / $divisor;
$index = 200+$i;

discover_sensor($valid_sensor, 'voltage', $device, $volt_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
}
}

?>
?>
7 changes: 7 additions & 0 deletions includes/static-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,13 @@
$config['os'][$os]['type'] = "network";
$config['os'][$os]['icon'] = "mrv";

$os = "poweralert";
$config['os'][$os]['text'] = "Tripp Lite PowerAlert";
$config['os'][$os]['type'] = "power";
$config['os'][$os]['over'][0]['graph'] = "device_current";
$config['os'][$os]['over'][0]['text'] = "Current";
$config['os'][$os]['icon'] = "poweralert";


$device_types = array('server', 'network', 'firewall', 'workstation', 'printer', 'power', 'environment');

Expand Down
Loading

0 comments on commit e159595

Please sign in to comment.