Tarus Balog <tarus <at> opennms.org> writes:
>
>
> On Jun 5, 2008, at 12:41 PM, Patrick Landry wrote:
>
>> I am currently monitoring tempSensorValueIntF.1095346743 directly, for
>> instance, with this entry in datacollection-config.xml:
>>
>> <mibObj oid=".1.3.6.1.4.1.5528.100.4.1.1.1.9" instance="1095346743"
>> alias="netBotz2-temp" type="INTEGER" />
>>
>> I assume that this works because the instance value happens to fit
>> into an integer.
>>
>> I would like to be able to monitor all of these sets of sensors using
>> Indexes rather than monitoring them directly. The leads me to the
>> problem of what MIB variable to use as an index. It seems that
>> tempSensorEntry.10 would be the correct Index variable for the
>> temperature sensors but how do I enter that into
>> datacollection-config.xml?
>>
>> My feeling is that this NetBotz MIB is broken. Is there any hope for
>> me?
>
> The new Netbotz mib is the suck (the version one stuff was amazing). I
> usually use generic indices to get this working. I can't remember
> which client I did this for recently (so I don't have an easy example)
> but by using the generics you can set the instance for everything
> (check the configs for the Net-SNMP disk stuff for an example).
Given that Tarus had made it work I gave it another try and was able to
succeed. (Thanks Tarus.) I agree with Tarus that the new NetBotz MIB is
very poorly designed.
Anyway, I went back and read "Collecting SNMP data from tables with
arbitrary indexes" again. When I read that the "name" attribute in the
resourceType definition "does not need to correlate to a MIB that
OpenNMS has knowledge of" that gave me some hope. I am attaching diffs
which show the changes I made to datacollection-config.xml and
snmp-graph.properties. Since the MIB groups the sensors by sensor type
rather than by the enclosure they are in the presentation of the graphs
in the OpenNMS WebUI is not very neat. But at least the data is there.
Also, I am still seeing lines like this
2008-06-09 16:18:12,062 DEBUG [CollectdScheduler-50 Pool-fiber0]
OneToOnePersister: Storing attribute
node[22].nb2DewIndex[-1677449549].netBotz2-dew-enc
[.1.3.6.1.4.1.5528.100.4.1.3.1.5] = nbHawkEnc_1
in collectd.log. Note that the index here is negative (-1677449549). But
the index in the MIB is not
> NETBOTZV2-MIB::dewPointSensorEncId.2617517747 = STRING: nbHawkEnc_1
So OpenNMS is coping with the fact that the MIB index is a larger value
than will fit in an integer. I assumed this would cause problems.
Apparently it does not. (A happy accident?)
Hopefully the next poor soul who has to deal with this
device will find this in the archives.
--
patrick
Patrick Landry
Asst. V.P., Information Technology
University of Louisiana at Lafayette
--- ORIG/datacollection-config.xml.orig 2008-01-31 18:58:58.000000000 -0600
+++ datacollection-config.xml 2008-06-05 17:01:58.000000000 -0500
@@ -85,6 +85,32 @@
<storageStrategy class="org.opennms.netmgt.dao.support.IndexStorageStrategy"/>
</resourceType>
+ <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>
+
<groups>
<!-- data from standard (mib-2) sources -->
<group name="mib2-interfaces" ifType="all">
@@ -950,6 +976,26 @@
<mibObj oid=".1.3.6.1.4.1.5528.30.10.9" instance="0" alias="netBotz-humid-max" type="INTEGER" />
<mibObj oid=".1.3.6.1.4.1.5528.30.10.10" instance="0" alias="netBotz-air-min" type="INTEGER" />
</group>
+ <group name="netbotz2-airflow" ifType="all">
+ <mibObj oid=".1.3.6.1.4.1.5528.100.4.1.5.1.5" 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.5" 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.5" 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.5" 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.5" 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>
<!-- NORTEL mibs -->
<group name="bay-router" ifType="ignore">
@@ -1590,6 +1636,11 @@
<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>
--- ORIG/snmp-graph.properties.orig 2008-01-31 19:18:11.000000000 -0600
+++ snmp-graph.properties 2008-06-05 16:58:22.000000000 -0500
@@ -95,6 +95,7 @@
netsnmp.hrMemory, netsnmp.hrNumUsers, netsnmp.interrupts, \
netsnmp.hrSystemUptime, netsnmp.loadavg, netsnmp.swapinout, \
netBotz.air, netBotz.humid, netBotz.temp, \
+netBotz2.airflow, netBotz2.audio, netBotz2.dew, netBotz2.humid, netBotz2.temp, \
nortel.kernelmem, nortel.kerneltasks, \
novell.cacheBuffers, novell.codeDataMemory, novell.diskSpaceSys, \
novell.diskSpaceVol2, novell.licensedConnections, novell.numberOfNLMsLoaded, novell.openFiles, \
@@ -4039,6 +4040,61 @@
GPRINT:temp:MIN:"Min \\: %8.2lf %s" \
GPRINT:temp:MAX:"Max \\: %8.2lf %s\\n"
+report.netBotz2.airflow.name=NetBotz2 Airflow Report
+report.netBotz2.airflow.columns=netBotz2-airflow
+report.netBotz2.airflow.type=nb2AirflowIndex
+report.netBotz2.airflow.command=--title="NetBotz Airflow" \
+ DEF:airflow={rrd1}:netBotz2-airflow:AVERAGE \
+ LINE2:airflow#0000ff:"Airflow" \
+ GPRINT:airflow:AVERAGE:" Avg \\: %8.2lf %s" \
+ GPRINT:airflow:MIN:"Min \\: %8.2lf %s" \
+ GPRINT:airflow:MAX:"Max \\: %8.2lf %s\\n"
+
+report.netBotz2.audio.name=NetBotz2 Audio Report
+report.netBotz2.audio.columns=netBotz2-audio
+report.netBotz2.audio.type=nb2AudioIndex
+report.netBotz2.audio.command=--title="NetBotz Audio" \
+ DEF:audio={rrd1}:netBotz2-audio:AVERAGE \
+ LINE2:audio#0000ff:"Audio" \
+ GPRINT:audio:AVERAGE:" Avg \\: %8.2lf %s" \
+ GPRINT:audio:MIN:"Min \\: %8.2lf %s" \
+ GPRINT:audio:MAX:"Max \\: %8.2lf %s\\n"
+
+report.netBotz2.dew.name=NetBotz2 Dewpoint Report
+report.netBotz2.dew.columns=netBotz2-dew
+report.netBotz2.dew.type=nb2DewIndex
+report.netBotz2.dew.command=--title="NetBotz Dewpoint" \
+ DEF:dew={rrd1}:netBotz2-dew:AVERAGE \
+ CDEF:degf=9,5,/,dew,*,32,+ \
+ LINE2:degf#0000ff:"Dewpoint F." \
+ GPRINT:degf:AVERAGE:" Avg \\: %8.2lf %s" \
+ GPRINT:degf:MIN:"Min \\: %8.2lf %s" \
+ GPRINT:degf:MAX:"Max \\: %8.2lf %s\\n" \
+ LINE2:dew#00ff00:"Dewpoint C." \
+ GPRINT:dew:AVERAGE:" Avg \\: %8.2lf %s" \
+ GPRINT:dew:MIN:"Min \\: %8.2lf %s" \
+ GPRINT:dew:MAX:"Max \\: %8.2lf %s\\n"
+
+report.netBotz2.humid.name=NetBotz2 Humidity Report
+report.netBotz2.humid.columns=netBotz2-humid
+report.netBotz2.humid.type=nb2HumidIndex
+report.netBotz2.humid.command=--title="NetBotz Humidity" \
+ 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=NetBotz2 Temp Report
+report.netBotz2.temp.columns=netBotz2-temp
+report.netBotz2.temp.type=nb2TempIndex
+report.netBotz2.temp.command=--title="NetBotz Temp" \
+ DEF:temp={rrd1}:netBotz2-temp:AVERAGE \
+ LINE2:temp#0000ff:"Temp" \
+ GPRINT:temp:AVERAGE:" Avg \\: %8.2lf %s" \
+ GPRINT:temp:MIN:"Min \\: %8.2lf %s" \
+ GPRINT:temp:MAX:"Max \\: %8.2lf %s\\n"
+
######
###### Reports Generated From NORTEL OIDs
######
begin:vcard
fn:Patrick Landry
n:Landry;Patrick
org:University of Louisiana at Lafayette
adr;dom:;;PO Box 42770;Lafayette;LA;70504
email;internet:[EMAIL PROTECTED]
title:Asst. V.P., Information Technology
tel;work:337-482-6402
x-mozilla-html:FALSE
version:2.1
end:vcard
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ
opennms-devel mailing list
To *unsubscribe* or change your subscription options, see the bottom of this
page:
https://lists.sourceforge.net/lists/listinfo/opennms-devel