<!--
  NOTE: This copyright does *not* cover user programs that use HQ
  program services by normal system calls through the application
  program interfaces provided as part of the Hyperic Plug-in Development
  Kit or the Hyperic Client Development Kit - this is merely considered
  normal use of the program, and does *not* fall under the heading of
  "derived work".
  
  Copyright (C) [2004, 2005, 2006], Hyperic, Inc.
  This file is part of HQ.
  
  HQ is free software; you can redistribute it and/or modify
  it under the terms version 2 of the GNU General Public License as
  published by the Free Software Foundation. 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.
 -->

<plugin>
  <!-- extract from http://www.weathergoose.com/mib-itw.zip -->
  <property name="MIBS"
            value="/usr/local/share/snmp/mibs/itw_mib.mib"/>

  <!-- each service uses a serial number for the index -->
  <config name="serial">
    <option name="snmpIndexValue"
            description="Serial Number"/>
  </config>

  <!-- index to get table data -->
  <filter name="index"
          value="snmpIndexName=${snmpIndexName},snmpIndexValue=%snmpIndexValue%"/>

  <filter name="template"
          value="${snmp.template}:${object}:${index}"/>

  <!-- Create services under the "Network Device" platform -->
  <service name="WxGoos Climate Monitor" platform="Network Device">
    <config include="serial"/>

    <plugin type="autoinventory"/>

    <property name="AUTOINVENTORY_NAME"
              value="Climate Monitor (%snmpIndexValue%)"/>

    <property name="snmpIndexName" value="climateSerial"/>

    <property name="snmpDescription" value="climateName"/>

    <metric name="Availability"
            object="climateAvail"
            indicator="true"/>

    <metric name="Tempature"
            object="climateTempC"
            indicator="true"/>

    <metric name="Relative Humidity"
            object="climateHumidity"
            units="percent"
            indicator="true"/>

    <metric name="Air Flow"
            object="climateAirflow"/>

    <metric name="Light Level"
            object="climateLight"/>

    <metric name="Sound Level"
            object="climateSound"/>

    <metric name="Air Pollution Sensor"
            object="climateIO1"/>

    <metric name="IO-2"
            object="climateIO2"/>

    <metric name="-48V Monitor"
            object="climateIO3"/>
  </service>

  <service name="WxGoos Power Monitor" platform="Network Device">
    <config include="serial"/>

    <plugin type="autoinventory"/>

    <property name="AUTOINVENTORY_NAME"
              value="Power Monitor (%snmpIndexValue%)"/>

    <property name="snmpIndexName" value="powMonSerial"/>

    <property name="snmpDescription" value="powMonName"/>

    <metric name="Availability"
            object="powMonAvail"
            indicator="true"/>

    <metric name="KWatt Hours"
            object="powMonKWattHrs"/>

    <metric name="Volts"
            object="powMonVolts"
            indicator="true"/>

    <metric name="Volts Max"
            object="powMonVoltMax"/>

    <metric name="Volts Min"
            object="powMonVoltMin"/>

    <metric name="Volts Peak"
            object="powMonVoltPk"/>

    <metric name="Amps x 10"
            object="powMonAmpsX10"/>

    <metric name="Real Power"
            object="powMonRealPow"
            indicator="true"/>

    <metric name="Apparent Power"
            object="powMonAppPow"
            indicator="true"/>

    <metric name="Power Factor"
            object="powMonPwrFact"/>

    <metric name="Outlet 1"
            object="powMonOutlet1"/>

    <metric name="Outlet 2"
            object="powMonOutlet2"/>
  </service>

  <service name="WxGoos Temperature Sensor" platform="Network Device">
    <config include="serial"/>

    <plugin type="autoinventory"/>

    <property name="AUTOINVENTORY_NAME"
              value="Temerature Sensor (%snmpIndexValue%)"/>

    <property name="snmpIndexName" value="tempSensorSerial"/>

    <property name="snmpDescription" value="tempSensorName"/>

    <metric name="Availability"
            object="tempSensorAvail"
            indicator="true"/>

    <metric name="Temperature"
            object="tempSensorTempC"
            indicator="true"/>
  </service>
</plugin>
