<?xml version="1.0"?>
<!--
  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 name="zxtm">
  <property name="MIBS"
            value="/usr/share/snmp/mibs/ZXTM-MIB.txt"/>

  <!-- index to get tabular virtual server data -->
  <filter name="vserver.config"
          value="snmpIndexName=virtualserverName,snmpIndexValue=%server.name%"/>

  <platform name="Zeus ZXTM">

    <config>
      <option name="snmpIp"
              description="ZXTM IP address"
              type="ipaddress"
              default="10.0.0.11"/>

      <option name="snmpPort"
              description="ZXTM SNMP port"
              type="port"
              default="161"/>

      <option name="snmpVersion"
              description="SNMP Version"
              default="v1"
              type="enum">
        <include name="v1"/>
        <include name="v2c"/>
      </option>

      <option name="snmpCommunity"
              description="SNMP Community"
              default="public"/>
    </config>

    <plugin type="measurement"
            class="net.hyperic.hq.product.SNMPMeasurementPlugin"/>

    <server name="ZXTM Virtual Server">
      <config>
        <option name="server.name"
                description="Virtual Server name"
                default="www"/>
      </config>

      <plugin type="measurement"
              class="org.hyperic.hq.product.SNMPMeasurementPlugin"/>

      <metric name="Availability"
              template="${snmp.template},Avail=true:virtualserverProtocol:${vserver.config}"
              indicator="true"/>

      <metric name="Current Connections"
              template="${snmp.template}:virtualserverCurrentConn:${vserver.config}"
              indicator="true"/>

      <metric name="Total Conn"
              template="${snmp.template}:virtualserverTotalConn:${vserver.config}"
              collectionType="trendsup"
              indicator="true"/>

      <metric name="Bytes In"
              template="${snmp.template}:virtualserverBytesInLo:${vserver.config}"
              category="THROUGHPUT"
              units="B"
              collectionType="trendsup"
              indicator="true"/>

      <metric name="Bytes Out"
              template="${snmp.template}:virtualserverBytesOutLo:${vserver.config}"
              category="THROUGHPUT"
              units="B"
              collectionType="trendsup"
              indicator="true"/>
    </server>

    <metric name="Availability"
            template="${snmp.template},Avail=true:upTime"
            indicator="true"/>

    <metric name="Uptime"
            template="${snmp.template}:upTime"
            category="AVAILABILITY"
            units="jiffys"
            defaultOn="true"
            collectionType="static"/>

    <metric name="Last Config Update"
            template="${snmp.template}:timeLastConfigUpdate"
            category="AVAILABILITY"
            units="jiffys"
            defaultOn="true"
            collectionType="static"/>

    <metric name="Number of Child Processes"
            template="${snmp.template}:numberChildProcesses"/>

    <metric name="Current Connections"
            template="${snmp.template}:totalCurrentConn"
            indicator="true"/>

    <metric name="Total Connections"
            template="${snmp.template}:totalConn"
            indicator="true"
            collectionType="trendsup"/>

  </platform>
</plugin>
