Brian
2008-04-22 16:59:22 UTC
This is probably a common use for OpenNMS: I need to alert on Windows and Linux disk space percent used, taking into account sometimes we want fixed disks, removable disks, memory, or swap threshold'ed and graphed.
I have read many previous posts and the wiki. I see there is also aucd-snmp config option posted in the wiki, but its super convoluted.
My closest attempt in 1.3.11 so far has been to add the following to datacollection-config.xml:
<group name="mib2-host-resources-storage" ifType="all">
<mibObj oid=".1.3.6.1.2.1.25.2.3.1.2" instance="hrStorageIndex" alias="hrStorageType" type="string" />
<mibObj oid=".1.3.6.1.2.1.25.2.3.1.3" instance="hrStorageIndex" alias="hrStorageDescr" type="string" />
<mibObj oid=".1.3.6.1.2.1.25.2.3.1.4" instance="hrStorageIndex" alias="hrStorageAllocUnits" type="gauge" />
<mibObj oid=".1.3.6.1.2.1.25.2.3.1.5" instance="hrStorageIndex" alias="hrStorageSize" type="gauge" />
<mibObj oid=".1.3.6.1.2.1.25.2.3.1.6" instance="hrStorageIndex" alias="hrStorageUsed" type="gauge" />
</group>
Then add in thresholds.xml
<expression type="high" ds-type="hrStorageIndex" value="80"
rearm="70" trigger="1" ds-label="hrStorageDescr" expression="(hrStorageUsed/hrStorageSize)*100">
<resource-filter field="hrStorageType">\.1\.3\.6\.1\.2\.1\.25\.2\.1\.4</resource-filter>
</expression>
I end up with an endless loop of "high threshold"/"high threshold rearmed" messages indicating eg. partition 1 on a server is over threshold, then partition 2 is found under threshold and it resets the partition 1 threshold.
Questions:
1. I thought the endless loop problem was fixed in a previous version (around December)?
2. How do you know what is valid in the resource-filter field? The above resource-filter example actually doesnt work for me, as it never matches. An older post mentioned \.1\.3\.6\.1\.2\.1\.25\.2\.1\.4 should match permanent disks. What are valid values?
3. How do you get hrStorageDescr into the notification text to know what partition/disk the alert is referencing? My (default) high threshold notifications look like this:
<text-message xmlns="">A Threshold has been exceeded on node: %nodelabel%, interface:%interface%. The parameter %parm[ds]% reached a value of %parm[value]% while the threshold is %parm[threshold]%. This alert will be rearmed when %parm[ds]% reaches %parm[rearm]%.</text-message>
<subject xmlns="">Notice #%noticeid%: High Threshold for %parm[ds]% on node %nodelabel%.</subject>
4. Can an exclude filter be used in snmp-graphs to eg. exclude all removable media graphs?
Brian
__________________________________________________________________
Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com
I have read many previous posts and the wiki. I see there is also aucd-snmp config option posted in the wiki, but its super convoluted.
My closest attempt in 1.3.11 so far has been to add the following to datacollection-config.xml:
<group name="mib2-host-resources-storage" ifType="all">
<mibObj oid=".1.3.6.1.2.1.25.2.3.1.2" instance="hrStorageIndex" alias="hrStorageType" type="string" />
<mibObj oid=".1.3.6.1.2.1.25.2.3.1.3" instance="hrStorageIndex" alias="hrStorageDescr" type="string" />
<mibObj oid=".1.3.6.1.2.1.25.2.3.1.4" instance="hrStorageIndex" alias="hrStorageAllocUnits" type="gauge" />
<mibObj oid=".1.3.6.1.2.1.25.2.3.1.5" instance="hrStorageIndex" alias="hrStorageSize" type="gauge" />
<mibObj oid=".1.3.6.1.2.1.25.2.3.1.6" instance="hrStorageIndex" alias="hrStorageUsed" type="gauge" />
</group>
Then add in thresholds.xml
<expression type="high" ds-type="hrStorageIndex" value="80"
rearm="70" trigger="1" ds-label="hrStorageDescr" expression="(hrStorageUsed/hrStorageSize)*100">
<resource-filter field="hrStorageType">\.1\.3\.6\.1\.2\.1\.25\.2\.1\.4</resource-filter>
</expression>
I end up with an endless loop of "high threshold"/"high threshold rearmed" messages indicating eg. partition 1 on a server is over threshold, then partition 2 is found under threshold and it resets the partition 1 threshold.
Questions:
1. I thought the endless loop problem was fixed in a previous version (around December)?
2. How do you know what is valid in the resource-filter field? The above resource-filter example actually doesnt work for me, as it never matches. An older post mentioned \.1\.3\.6\.1\.2\.1\.25\.2\.1\.4 should match permanent disks. What are valid values?
3. How do you get hrStorageDescr into the notification text to know what partition/disk the alert is referencing? My (default) high threshold notifications look like this:
<text-message xmlns="">A Threshold has been exceeded on node: %nodelabel%, interface:%interface%. The parameter %parm[ds]% reached a value of %parm[value]% while the threshold is %parm[threshold]%. This alert will be rearmed when %parm[ds]% reaches %parm[rearm]%.</text-message>
<subject xmlns="">Notice #%noticeid%: High Threshold for %parm[ds]% on node %nodelabel%.</subject>
4. Can an exclude filter be used in snmp-graphs to eg. exclude all removable media graphs?
Brian
__________________________________________________________________
Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com