[freeside-commits] branch master updated. 0c4d2f8b768b5eb6ed51c27c5f9c482c2c2e96aa

Ivan ivan at 420.am
Sat Mar 10 17:54:57 PST 2012


The branch, master has been updated
       via  0c4d2f8b768b5eb6ed51c27c5f9c482c2c2e96aa (commit)
      from  8f155ea8e7013a3876033b1ccf8d3099fce5cfc1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 0c4d2f8b768b5eb6ed51c27c5f9c482c2c2e96aa
Author: Ivan Kohler <ivan-debian at 420.am>
Date:   Sat Mar 10 17:54:56 2012 -0800

    add preliminary Torrus config for Ractivity PDU devices, RT#14601

diff --git a/torrus/FREESIDE_MODIFIED b/torrus/FREESIDE_MODIFIED
index 3e3f27b..194dbe6 100644
--- a/torrus/FREESIDE_MODIFIED
+++ b/torrus/FREESIDE_MODIFIED
@@ -18,3 +18,6 @@ perllib/Torrus/Devdiscover/Arbor_E.pm
 perllib/Torrus/Devdiscover/F5BigIP.pm
 perllib/Torrus/Devdiscover/FTPS.pm
 
+#a new device for dacentec
+xmlconfig/vendor/ractivity.xml
+perllib/Torrus/DevDiscover/Ractivity.pm
diff --git a/torrus/perllib/Torrus/DevDiscover/Ractivity.pm b/torrus/perllib/Torrus/DevDiscover/Ractivity.pm
new file mode 100644
index 0000000..7c704f2
--- /dev/null
+++ b/torrus/perllib/Torrus/DevDiscover/Ractivity.pm
@@ -0,0 +1,125 @@
+#  Copyright (C) 2012 Freeside Internet Services, Inc.
+#
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+
+# Ractivity Power Distribution Unit
+
+package Torrus::DevDiscover::Ractivity;
+
+use strict;
+use Torrus::Log;
+
+$Torrus::DevDiscover::registry{'Ractivity'} = {
+    'sequence'     => 500,
+    'checkdevtype' => \&checkdevtype,
+    'discover'     => \&discover,
+    'buildConfig'  => \&buildConfig
+};
+
+our %oiddef =
+(
+    #'racktivity'           => '1.3.6.1.4.1.34097',
+    'product'              => '1.3.6.1.4.1.34097.1',
+    'name'                 => '1.3.6.1.4.1.34097.1.1',
+    'version'              => '1.3.6.1.4.1.34097.1.2',
+    'date'                 => '1.3.6.1.4.1.34097.1.3',
+    'general'              => '1.3.6.1.4.1.34097.2',
+    'Voltage'              => '1.3.6.1.4.1.34097.2.1',
+    'MaxTotCurentTime'     => '1.3.6.1.4.1.34097.2.10',
+    'TotKwh'               => '1.3.6.1.4.1.34097.2.11',
+    'Intrusion'            => '1.3.6.1.4.1.34097.2.12',
+    'Airflow'              => '1.3.6.1.4.1.34097.2.13',
+    'Beep'                 => '1.3.6.1.4.1.34097.2.14',
+    'ControllerName'       => '1.3.6.1.4.1.34097.2.15',
+    'RackPosition'         => '1.3.6.1.4.1.34097.2.16',
+    'Frequency'            => '1.3.6.1.4.1.34097.2.2',
+    'TotCurrent'           => '1.3.6.1.4.1.34097.2.3',
+    'TotPower'             => '1.3.6.1.4.1.34097.2.4',
+    'TemperatureInside'    => '1.3.6.1.4.1.34097.2.5',
+    'HumidityInside'       => '1.3.6.1.4.1.34097.2.6',
+    'MaxTotCurrentWarning' => '1.3.6.1.4.1.34097.2.7',
+    'MaxTotCurentOff'      => '1.3.6.1.4.1.34097.2.8',
+    'MaxTotCurrent'        => '1.3.6.1.4.1.34097.2.9',
+    'port'                 => '1.3.6.1.4.1.34097.3',
+    'portTable'            => '1.3.6.1.4.1.34097.3.1',
+    'portEntry'            => '1.3.6.1.4.1.34097.3.1.1',
+    'PortNr'               => '1.3.6.1.4.1.34097.3.1.1.1',
+    'MaxCurrent'           => '1.3.6.1.4.1.34097.3.1.1.10',
+    'MaxCurrentTime'       => '1.3.6.1.4.1.34097.3.1.1.11',
+    'MaxCurrentWarning'    => '1.3.6.1.4.1.34097.3.1.1.12',
+    'MaxCurrentOff'        => '1.3.6.1.4.1.34097.3.1.1.13',
+    'Priority'             => '1.3.6.1.4.1.34097.3.1.1.14',
+    'DelayOn'              => '1.3.6.1.4.1.34097.3.1.1.15',
+    'PortName'             => '1.3.6.1.4.1.34097.3.1.1.2',
+    'Current'              => '1.3.6.1.4.1.34097.3.1.1.3',
+    'RealPower'            => '1.3.6.1.4.1.34097.3.1.1.4',
+    'ApparentPower'        => '1.3.6.1.4.1.34097.3.1.1.5',
+    'PowerFactor'          => '1.3.6.1.4.1.34097.3.1.1.6',
+    'State'                => '1.3.6.1.4.1.34097.3.1.1.7',
+    'kWh'                  => '1.3.6.1.4.1.34097.3.1.1.8', #the important one
+    'kWhTime'              => '1.3.6.1.4.1.34097.3.1.1.9',
+    'temp'                 => '1.3.6.1.4.1.34097.4',
+    'tempTable'            => '1.3.6.1.4.1.34097.4.1',
+    'tempEntry'            => '1.3.6.1.4.1.34097.4.1.1',
+    'TempNr'               => '1.3.6.1.4.1.34097.4.1.1.1',
+    'Temperature'          => '1.3.6.1.4.1.34097.4.1.1.2',
+    'MaxTemp'              => '1.3.6.1.4.1.34097.4.1.1.3',
+    'MaxTempTime'          => '1.3.6.1.4.1.34097.4.1.1.4',
+    'TempWarning'          => '1.3.6.1.4.1.34097.4.1.1.5',
+);
+
+sub checkdevtype
+{
+    shift->checkSnmpOID('product');
+}
+
+sub discover
+{
+    my $dd = shift;
+    my $devdetails = shift;
+
+    my $data = $devdetails->data();
+
+    my $info = $dd->retrieveSnmpOIDs( 'product',
+                                      'name',
+                                      'version',
+                                      'date',
+                                    );
+
+
+    $data->{'param'}{'comment'} = join(' ', map $info->{$_},
+                                            qw( product name version )
+                                       );
+
+    $data->{'param'}{'legend'} = "Product: ". $info->{'product'}. ";\n".
+                                 "Name:    ". $info->{'name'}. ";\n".
+                                 "Version: ". $info->{'version'}. ";\n".
+                                 "Date:    ". $info->{'date'}. ";";
+
+    return 1;
+}
+
+sub buildConfig
+{
+    my $devdetails = shift;
+    my $cb = shift;
+    my $devNode = shift;
+
+    $cb->addTemplateApplication( $devNode, 'Ractivity::PDU');
+
+}
+
+1;
+
diff --git a/torrus/xmlconfig/vendor/ractivity.xml b/torrus/xmlconfig/vendor/ractivity.xml
new file mode 100644
index 0000000..64b32b6
--- /dev/null
+++ b/torrus/xmlconfig/vendor/ractivity.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0"?>
+<!--
+   Copyright (C) 2012  Freeside Internet Services, Inc.
+
+   File: ractivity.xml
+   Description: Ractivity Power Distribution Unit monitor example for Torrus.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+-->
+<configuration>
+
+  <definitions>
+    <def name="product" value="1.3.6.1.4.1.34097.1"/>,
+    <def name="name" value="1.3.6.1.4.1.34097.1.1"/>,
+    <def name="version" value="1.3.6.1.4.1.34097.1.2"/>,
+    <def name="date" value="1.3.6.1.4.1.34097.1.3"/>,
+    <def name="general" value="1.3.6.1.4.1.34097.2"/>,
+    <def name="Voltage" value="1.3.6.1.4.1.34097.2.1"/>,
+    <def name="MaxTotCurentTime" value="1.3.6.1.4.1.34097.2.10"/>,
+    <def name="TotKwh" value="1.3.6.1.4.1.34097.2.11"/>,
+    <def name="Intrusion" value="1.3.6.1.4.1.34097.2.12"/>,
+    <def name="Airflow" value="1.3.6.1.4.1.34097.2.13"/>,
+    <def name="Beep" value="1.3.6.1.4.1.34097.2.14"/>,
+    <def name="ControllerName" value="1.3.6.1.4.1.34097.2.15"/>,
+    <def name="RackPosition" value="1.3.6.1.4.1.34097.2.16"/>,
+    <def name="Frequency" value="1.3.6.1.4.1.34097.2.2"/>,
+    <def name="TotCurrent" value="1.3.6.1.4.1.34097.2.3"/>,
+    <def name="TotPower" value="1.3.6.1.4.1.34097.2.4"/>,
+    <def name="TemperatureInside" value="1.3.6.1.4.1.34097.2.5"/>,
+    <def name="HumidityInside" value="1.3.6.1.4.1.34097.2.6"/>,
+    <def name="MaxTotCurrentWarning" value="1.3.6.1.4.1.34097.2.7"/>,
+    <def name="MaxTotCurentOff" value="1.3.6.1.4.1.34097.2.8"/>,
+    <def name="MaxTotCurrent" value="1.3.6.1.4.1.34097.2.9"/>,
+    <def name="port" value="1.3.6.1.4.1.34097.3"/>,
+    <def name="portTable" value="1.3.6.1.4.1.34097.3.1"/>,
+    <def name="portEntry" value="1.3.6.1.4.1.34097.3.1.1"/>,
+    <def name="PortNr" value="1.3.6.1.4.1.34097.3.1.1.1"/>,
+    <def name="MaxCurrent" value="1.3.6.1.4.1.34097.3.1.1.10"/>,
+    <def name="MaxCurrentTime" value="1.3.6.1.4.1.34097.3.1.1.11"/>,
+    <def name="MaxCurrentWarning" value="1.3.6.1.4.1.34097.3.1.1.12"/>,
+    <def name="MaxCurrentOff" value="1.3.6.1.4.1.34097.3.1.1.13"/>,
+    <def name="Priority" value="1.3.6.1.4.1.34097.3.1.1.14"/>,
+    <def name="DelayOn" value="1.3.6.1.4.1.34097.3.1.1.15"/>,
+    <def name="PortName" value="1.3.6.1.4.1.34097.3.1.1.2"/>,
+    <def name="Current" value="1.3.6.1.4.1.34097.3.1.1.3"/>,
+    <def name="RealPower" value="1.3.6.1.4.1.34097.3.1.1.4"/>,
+    <def name="ApparentPower" value="1.3.6.1.4.1.34097.3.1.1.5"/>,
+    <def name="PowerFactor" value="1.3.6.1.4.1.34097.3.1.1.6"/>,
+    <def name="State" value="1.3.6.1.4.1.34097.3.1.1.7"/>,
+    <def name="kWh" value="1.3.6.1.4.1.34097.3.1.1.8"/>,
+    <def name="kWhTime" value="1.3.6.1.4.1.34097.3.1.1.9"/>,
+    <def name="temp" value="1.3.6.1.4.1.34097.4"/>,
+    <def name="tempTable" value="1.3.6.1.4.1.34097.4.1"/>,
+    <def name="tempEntry" value="1.3.6.1.4.1.34097.4.1.1"/>,
+    <def name="TempNr" value="1.3.6.1.4.1.34097.4.1.1.1"/>,
+    <def name="Temperature" value="1.3.6.1.4.1.34097.4.1.1.2"/>,
+    <def name="MaxTemp" value="1.3.6.1.4.1.34097.4.1.1.3"/>,
+    <def name="MaxTempTime" value="1.3.6.1.4.1.34097.4.1.1.4"/>,
+    <def name="TempWarning" value="1.3.6.1.4.1.34097.4.1.1.5"/>,
+  </definitions>
+
+  <datasources>
+
+    <template name="PDU">
+
+      <param name="data-file" value="%system-id%_power.rrd" />
+      <param name="data-dir" value="XXX" />
+
+      <leaf name="kWh">
+        <param name="comment" value="KiloWatt Hours" />
+        <param name="comment" value="KiloWatt Hours" />
+        <param name="vertical-label" value="kWh" />
+        <param name="ds-type" value="collector" />
+        <param name="collector-type" value="snmp" />
+        <param name="storage-type" value="rrd" />
+        <param name="collector-period" value="300" />
+        <param name="collector-timeoffset" value="0" />
+      </leaf>
+
+  </datasources>
+
+</configuration>

-----------------------------------------------------------------------

Summary of changes:
 torrus/FREESIDE_MODIFIED                       |    3 +
 torrus/perllib/Torrus/DevDiscover/Ractivity.pm |  125 ++++++++++++++++++++++++
 torrus/xmlconfig/vendor/ractivity.xml          |   94 ++++++++++++++++++
 3 files changed, 222 insertions(+), 0 deletions(-)
 create mode 100644 torrus/perllib/Torrus/DevDiscover/Ractivity.pm
 create mode 100644 torrus/xmlconfig/vendor/ractivity.xml




More information about the freeside-commits mailing list