NetBotz v2 Monitoring How-To
Subscribe

From OpenNMS

Jump to: navigation, search

Credit needs to be primarily to Patrick Landry as I used information collected from the opennms-devel mailing list.

Tested and running on OpenNMS 1.7.0-SNAPSHOT and 1.6.5-1

Tested Netbotz Wall Monitor 355 running OS 3.2.1 Build: 20091021)1401(9/26/2010)

Edit datacollection-config.xml

Add the following below the last "resource" entry.

    <resourceType name="nb2AirflowIndex" label="Netbotz2 Airflow Sensor"
                  resourceLabel="${netBotz2-airflow-enc}">
       <persistenceSelectorStrategy class="org.opennms.netmgt.collectd.PersistAllSelectorStrategy"/>
       <storageStrategy class="org.opennms.netmgt.dao.support.IndexStorageStrategy"/>
    </resourceType>
    <resourceType name="nb2AudioIndex" label="Netbotz2 Audio Sensor"
                  resourceLabel="${netBotz2-audio-enc}">
       <persistenceSelectorStrategy class="org.opennms.netmgt.collectd.PersistAllSelectorStrategy"/>
       <storageStrategy class="org.opennms.netmgt.dao.support.IndexStorageStrategy"/>
    </resourceType>
    <resourceType name="nb2DewIndex" label="Netbotz2 Dewpoint Sensor"
                  resourceLabel="${netBotz2-dew-enc}">
       <persistenceSelectorStrategy class="org.opennms.netmgt.collectd.PersistAllSelectorStrategy"/>
       <storageStrategy class="org.opennms.netmgt.dao.support.IndexStorageStrategy"/>
    </resourceType>
    <resourceType name="nb2HumidIndex" label="Netbotz2 Humidity Sensor"
                  resourceLabel="${netBotz2-humid-enc}">
       <persistenceSelectorStrategy class="org.opennms.netmgt.collectd.PersistAllSelectorStrategy"/>
       <storageStrategy class="org.opennms.netmgt.dao.support.IndexStorageStrategy"/>
    </resourceType>
    <resourceType name="nb2TempIndex" label="Netbotz2 Temp Sensor"
                  resourceLabel="${netBotz2-temp-enc}">
       <persistenceSelectorStrategy class="org.opennms.netmgt.collectd.PersistAllSelectorStrategy"/>
       <storageStrategy class="org.opennms.netmgt.dao.support.IndexStorageStrategy"/>
    </resourceType>

At the end of the add the following

     <group name="netbotz2-airflow" ifType="all">
       <mibObj oid=".1.3.6.1.4.1.5528.100.4.1.5.1.1" instance="nb2AirflowIndex" alias="netBotz2-airflow-enc" type="string" />
       <mibObj oid=".1.3.6.1.4.1.5528.100.4.1.5.1.8" instance="nb2AirflowIndex" alias="netBotz2-airflow" type="INTEGER" />
     </group>
     <group name="netbotz2-audio" ifType="all">
       <mibObj oid=".1.3.6.1.4.1.5528.100.4.1.4.1.1" instance="nb2AudioIndex" alias="netBotz2-audio-enc" type="string" />
       <mibObj oid=".1.3.6.1.4.1.5528.100.4.1.4.1.8" instance="nb2AudioIndex" alias="netBotz2-audio" type="INTEGER" />
     </group>
     <group name="netbotz2-dewpoint" ifType="all">
       <mibObj oid=".1.3.6.1.4.1.5528.100.4.1.3.1.1" instance="nb2DewIndex" alias="netBotz2-dew-enc" type="string" />
       <mibObj oid=".1.3.6.1.4.1.5528.100.4.1.3.1.8" instance="nb2DewIndex" alias="netBotz2-dew" type="INTEGER" />
     </group>
     <group name="netbotz2-humidity" ifType="all">
       <mibObj oid=".1.3.6.1.4.1.5528.100.4.1.2.1.1" instance="nb2HumidIndex" alias="netBotz2-humid-enc" type="string" />
       <mibObj oid=".1.3.6.1.4.1.5528.100.4.1.2.1.8" instance="nb2HumidIndex" alias="netBotz2-humid" type="INTEGER" />
     </group>
     <group name="netbotz2-temp" ifType="all">
       <mibObj oid=".1.3.6.1.4.1.5528.100.4.1.1.1.1" instance="nb2TempIndex" alias="netBotz2-temp-enc" type="string" />
       <mibObj oid=".1.3.6.1.4.1.5528.100.4.1.1.1.9" instance="nb2TempIndex" alias="netBotz2-temp" type="INTEGER" />
     </group>

Edit the Netbotz systemDef to look like the following

     <systemDef name="Netbotz">
       <sysoidMask>.1.3.6.1.4.1.5528.</sysoidMask>
       <collect>
         <includeGroup>netbotz</includeGroup>
         <includeGroup>netbotz2-airflow</includeGroup>
         <includeGroup>netbotz2-audio</includeGroup>
         <includeGroup>netbotz2-dewpoint</includeGroup>
         <includeGroup>netbotz2-humidity</includeGroup>
         <includeGroup>netbotz2-temp</includeGroup>
       </collect>
     </systemDef>

Edit snmp-graph.properties

Under the Line

    netBotz.air, netBotz.humid, netBotz.temp, \

Add the following

    netBotz2.air, netBotz2.humid, netBotz2.temp, netBotz2.audio, netBotz2.dewpoint, \

After this entry

report.netBotz.temp.name=NetBotz Temp Report
report.netBotz.temp.columns=netBotz-temp, netBotz-temp-min, netBotz-temp-max
report.netBotz.temp.type=nodeSnmp
report.netBotz.temp.command=--title="NetBotz Temp" \
DEF:temp={rrd1}:netBotz-temp:AVERAGE \
DEF:tempmin={rrd2}:netBotz-temp-min:AVERAGE \
DEF:tempmax={rrd3}:netBotz-temp-max:AVERAGE \
LINE2:temp#0000ff:"Temperature" \
LINE2:tempmin#ff0000:"Temp (min)" \
LINE2:tempmax#ff0000:"Temp (max)" \
GPRINT:temp:AVERAGE:" Avg  \\: %8.2lf %s" \
GPRINT:temp:MIN:"Min  \\: %8.2lf %s" \
GPRINT:temp:MAX:"Max  \\: %8.2lf %s\\n"

Add the following

######
###### NetBotz v2 Reports
######
report.netBotz2.air.name=NetBotz V2 Air Report
report.netBotz2.air.columns=netBotz2-airflow
report.netBotz2.air.type=nb2AirflowIndex
report.netBotz2.air.command=--title="NetBotz Air" \
--vertical-label "Air Per Minute" \
DEF:air={rrd1}:netBotz2-airflow:AVERAGE \
CDEF:ftair=3.280839,air,* \
LINE2:ftair#0000ff:"Feet  " \
GPRINT:ftair:AVERAGE:" Avg  \\: %8.2lf %s" \
GPRINT:ftair:MIN:"Min  \\: %8.2lf %s" \
GPRINT:ftair:MAX:"Max  \\: %8.2lf %s\\n" \
LINE2:air#ff0000:"Meters" \
GPRINT:air:AVERAGE:" Avg  \\: %8.2lf %s" \
GPRINT:air:MIN:"Min  \\: %8.2lf %s" \
GPRINT:air:MAX:"Max  \\: %8.2lf %s\\n"
report.netBotz2.humid.name=NetBotz V2 Humidity Report
report.netBotz2.humid.columns=netBotz2-humid
report.netBotz2.humid.type=nb2HumidIndex
report.netBotz2.humid.command=--title="NetBotz Humidity" \
--vertical-label Percent \
DEF:humid={rrd1}:netBotz2-humid:AVERAGE \
LINE2:humid#0000ff:"Humidity" \
GPRINT:humid:AVERAGE:" Avg  \\: %8.2lf %s" \
GPRINT:humid:MIN:"Min  \\: %8.2lf %s" \
GPRINT:humid:MAX:"Max  \\: %8.2lf %s\\n"
report.netBotz2.temp.name=NetBotz V2 Temp Report
report.netBotz2.temp.columns=netBotz2-temp
report.netBotz2.temp.type=nb2TempIndex
report.netBotz2.temp.command=--title="NetBotz Temp" \
--vertical-label Temperature \
DEF:temp={rrd1}:netBotz2-temp:AVERAGE \
CDEF:tempcel=5,9,/,temp,*,32,- \
LINE2:temp#ff0000:"Fahrenheit" \
GPRINT:temp:AVERAGE:" Avg  \\: %8.2lf %s" \
GPRINT:temp:MIN:"Min  \\: %8.2lf %s" \
GPRINT:temp:MAX:"Max  \\: %8.2lf %s\\n" \
LINE2:tempcel#0000ff:"Celsius   " \
GPRINT:tempcel:AVERAGE:" Avg  \\: %8.2lf %s" \
GPRINT:tempcel:MIN:"Min  \\: %8.2lf %s" \
GPRINT:tempcel:MAX:"Max  \\: %8.2lf %s\\n" 
report.netBotz2.audio.name=NetBotz V2 Audio Report
report.netBotz2.audio.columns=netBotz2-audio
report.netBotz2.audio.type=nb2AudioIndex
report.netBotz2.audio.command=--title="NetBotz Audio" \
--vertical-label Decibels \
DEF:temp={rrd1}:netBotz2-audio:AVERAGE \
LINE2:temp#0000ff:"Audio" \
GPRINT:temp:AVERAGE:" Avg  \\: %8.2lf %s" \
GPRINT:temp:MIN:"Min  \\: %8.2lf %s" \
GPRINT:temp:MAX:"Max  \\: %8.2lf %s\\n"
report.netBotz2.dewpoint.name=NetBotz V2 Dewpoint Report
report.netBotz2.dewpoint.columns=netBotz2-dew
report.netBotz2.dewpoint.type=nb2DewIndex
report.netBotz2.dewpoint.command=--title="NetBotz Dewpoint" \
--vertical-label Temperature \
DEF:temp={rrd1}:netBotz2-dew:AVERAGE \
CDEF:dewtempfar=9,5,/,temp,*,32,+ \
LINE2:dewtempfar#ff0000:"Fahrenheit" \
GPRINT:dewtempfar:AVERAGE:" Avg  \\: %8.2lf %s" \
GPRINT:dewtempfar:MIN:"Min  \\: %8.2lf %s" \
GPRINT:dewtempfar:MAX:"Max  \\: %8.2lf %s\\n" \
LINE2:temp#0000ff:"Celsius   " \
GPRINT:temp:AVERAGE:" Avg  \\: %8.2lf %s" \
GPRINT:temp:MIN:"Min  \\: %8.2lf %s" \
GPRINT:temp:MAX:"Max  \\: %8.2lf %s\\n" 

Restart opennms

Below are sample graphs of how it would look.

<will upload when images will be allowed from me...its broken for me for some reason>