[prev in list] [next in list] [prev in thread] [next in thread] 

List:       opennms-discuss
Subject:    [opennms-discuss] Having problems getting thresholding to work with snmp logmatch
From:       JohnD Blackburn <johnd.blackburn () au ! abb ! com>
Date:       2018-11-22 3:24:11
Message-ID: AM6PR0602MB3381262D31E1D7B08E9FC3C2CBDB0 () AM6PR0602MB3381 ! eurprd06 ! prod ! outlook ! com
[Download RAW message or body]

Hi All

I've been trying to set up a notification using the snmp logmatch feature which I \
want to raise a notification if a specific message appears in an application log

I have the following code set up in snmpd.conf on the client:

   logmatch batchFailure /appliance/data/efs/dev/batch/batch.log 600 \
c.m.b.n.NotificationPollingService - Unable to read/process new notification requests

and in collectd-configuration I have:

   <package name="ABBCS-logmatch" remote="false">
      <filter>(IPADDR != '0.0.0.0') &amp; (catincRFIntegration | catincBatchFailures \
)</filter>  <include-range begin="1.1.1.1" end="254.254.254.254"/>
      <include-range begin="::1" end="ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"/>
      <service name="SNMP" interval="300000" user-defined="false" status="on">
         <parameter key="collection" value="ABBCS-logmatch"/>
         <parameter key="thresholding-enabled" value="true"/>
         <parameter key="port" value="161"/>
         <parameter key="retry" value="1"/>
         <parameter key="timeout" value="30000"/>
         <parameter key="oid" value=".1.3.6.1.4.1.2021.16.2.1.1.1"/>
      </service>
   </package>

In datacollection/ABBCS-logmatch.xml, I have the following:
<datacollection-group name="ABBCS-logmatch">
    <group name="ABBCS-logmatch-batch" ifType="ignore">
        <mibObj oid=".1.3.6.1.4.1.2021.16.2.1.5" instance="1" alias="batchfailure" \
type="Counter32" />  </group>
    <systemDef name="ABBCS-batch">
        <sysoidMask>.1.3.6.1.4.1.8072.3.2.10</sysoidMask>
        <collect>
           <includeGroup>ABBCS-logmatch-batch</includeGroup>
        </collect>
    </systemDef>
</datacollection-group>


Threshd-configuration.xml:
   <package name="ABBCS-logmatch">
      <filter>IPADDR != '0.0.0.0'</filter>
      <include-range begin="1.1.1.1" end="254.254.254.254"/>
      <include-range begin="::1" end="ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"/>
      <service name="ABBCS-logmatch" interval="300000" user-defined="false" \
status="on">  <parameter key="thresholding-group" value="ABBCS-logmatch"/>
      </service>
   </package>

Thresholds.xml:
   <group name="ABBCS-logmatch" rrdRepository="/opt/opennms/share/rrd/snmp/">
      <threshold description="Trigger an alert for batch failures" type="high" \
ds-type="node" value="1" rearm="0.9" trigger="1" ds-label="batchfailure" \
triggeredUEI="uei.opennms.org/ABBCS/Batch/failure-crit" \
rearmedUEI="uei.opennms.org/ABBCS/Batch/failure-rearm" filterOperator="OR" \
ds-name="batchfailure"/>  </group>


I know OpenNMS is successfully fetching the data from snmp because of this entry in \
the collectd.log:

2018-11-22 08:02:42,359 INFO  [Collectd-Thread-29-of-50] \
o.o.n.c.p.r.RrdPersistOperationBuilder: updateRRD: updating RRD file \
/opt/opennms/share/rrd/snmp/fs/Servers/ellbat0-dev-n03-kum/batchfailure.jrb with \
values '1542852162:8'

But I'm getting the following error in my collectd.log:

2018-11-22 08:02:42,360 DEBUG [Collectd-Thread-29-of-50] o.o.n.t.ThresholdingSet: \
applyThresholds: Ignoring resource node[537].interfaceSnmp[eth0-000d3a3992e3] because \
required attributes map is empty.


What am I missing to get this threshold to work?

Regards,
John


[Attachment #3 (text/html)]

<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Verdana;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
	{font-family:ABBvoice;
	panose-1:2 13 6 3 2 5 3 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;
	mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:#0563C1;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:#954F72;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Verdana",sans-serif;
	color:windowtext;
	font-weight:normal;
	font-style:normal;
	text-decoration:none none;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri",sans-serif;
	mso-fareast-language:EN-US;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-AU" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,sans-serif">Hi \
All<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Verdana&quot;,sans-serif"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,sans-serif">I&#8217;ve \
been trying to set up a notification using the snmp logmatch feature which I want to \
raise a notification if a specific message appears in an application \
log<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Verdana&quot;,sans-serif"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,sans-serif">I have the \
following code set up in snmpd.conf on the client:<o:p></o:p></span></p> <p \
class="MsoNormal"><span \
style="font-family:&quot;Verdana&quot;,sans-serif"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">&nbsp;&nbsp; \
logmatch batchFailure /appliance/data/efs/dev/batch/batch.log 600 \
c.m.b.n.NotificationPollingService - Unable to read/process new notification \
requests<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Verdana&quot;,sans-serif"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,sans-serif">and in \
collectd-configuration I have:<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Verdana&quot;,sans-serif"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">&nbsp;&nbsp; \
&lt;package name=&quot;ABBCS-logmatch&quot; \
remote=&quot;false&quot;&gt;<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier New&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&lt;filter&gt;(IPADDR != '0.0.0.0') &amp;amp; (catincRFIntegration | \
catincBatchFailures )&lt;/filter&gt;<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier New&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&lt;include-range begin=&quot;1.1.1.1&quot; \
end=&quot;254.254.254.254&quot;/&gt;<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier New&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&lt;include-range begin=&quot;::1&quot; \
end=&quot;ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff&quot;/&gt;<o:p></o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;service name=&quot;SNMP&quot; \
interval=&quot;300000&quot; user-defined=&quot;false&quot; \
status=&quot;on&quot;&gt;<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier \
New&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;parameter \
key=&quot;collection&quot; \
value=&quot;ABBCS-logmatch&quot;/&gt;<o:p></o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;parameter \
key=&quot;thresholding-enabled&quot; \
value=&quot;true&quot;/&gt;<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier \
New&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;parameter \
key=&quot;port&quot; value=&quot;161&quot;/&gt;<o:p></o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;parameter \
key=&quot;retry&quot; value=&quot;1&quot;/&gt;<o:p></o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;parameter \
key=&quot;timeout&quot; value=&quot;30000&quot;/&gt;<o:p></o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;parameter \
key=&quot;oid&quot; value=&quot;.1.3.6.1.4.1.2021.16.2.1.1.1&quot;/&gt;<o:p></o:p></span></p>
 <p class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/service&gt;<o:p></o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">&nbsp;&nbsp; \
&lt;/package&gt;<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Verdana&quot;,sans-serif"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,sans-serif">In \
datacollection/ABBCS-logmatch.xml, I have the following:<o:p></o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;">&lt;datacollection-group \
name=&quot;ABBCS-logmatch&quot;&gt;<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier New&quot;">&nbsp;&nbsp;&nbsp; &lt;group \
name=&quot;ABBCS-logmatch-batch&quot; \
ifType=&quot;ignore&quot;&gt;<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier \
New&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;mibObj \
oid=&quot;.1.3.6.1.4.1.2021.16.2.1.5&quot; instance=&quot;1&quot; \
alias=&quot;batchfailure&quot; type=&quot;Counter32&quot; /&gt;<o:p></o:p></span></p> \
<p class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;">&nbsp;&nbsp;&nbsp; &lt;/group&gt;<o:p></o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;">&nbsp;&nbsp;&nbsp; &lt;systemDef \
name=&quot;ABBCS-batch&quot;&gt;<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier \
New&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&lt;sysoidMask&gt;.1.3.6.1.4.1.8072.3.2.10&lt;/sysoidMask&gt;<o:p></o:p></span></p> \
<p class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&lt;collect&gt;<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier \
New&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&lt;includeGroup&gt;ABBCS-logmatch-batch&lt;/includeGroup&gt;<o:p></o:p></span></p> \
<p class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&lt;/collect&gt;<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier New&quot;">&nbsp;&nbsp;&nbsp; \
&lt;/systemDef&gt;<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier \
New&quot;">&lt;/datacollection-group&gt;<o:p></o:p></span></p> <p \
class="MsoNormal"><span \
style="font-family:&quot;Verdana&quot;,sans-serif"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span \
style="font-family:&quot;Verdana&quot;,sans-serif"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span \
style="font-family:&quot;Verdana&quot;,sans-serif">Threshd-configuration.xml:<o:p></o:p></span></p>
 <p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">&nbsp;&nbsp; \
&lt;package name=&quot;ABBCS-logmatch&quot;&gt;<o:p></o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;filter&gt;IPADDR != \
'0.0.0.0'&lt;/filter&gt;<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier New&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&lt;include-range begin=&quot;1.1.1.1&quot; \
end=&quot;254.254.254.254&quot;/&gt;<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier New&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&lt;include-range begin=&quot;::1&quot; \
end=&quot;ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff&quot;/&gt;<o:p></o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;service name=&quot;ABBCS-logmatch&quot; \
interval=&quot;300000&quot; user-defined=&quot;false&quot; \
status=&quot;on&quot;&gt;<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier \
New&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;parameter \
key=&quot;thresholding-group&quot; \
value=&quot;ABBCS-logmatch&quot;/&gt;<o:p></o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/service&gt;<o:p></o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">&nbsp;&nbsp; \
&lt;/package&gt;<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Verdana&quot;,sans-serif"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span \
style="font-family:&quot;Verdana&quot;,sans-serif">Thresholds.xml:<o:p></o:p></span></p>
 <p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">&nbsp;&nbsp; \
&lt;group name=&quot;ABBCS-logmatch&quot; \
rrdRepository=&quot;/opt/opennms/share/rrd/snmp/&quot;&gt;<o:p></o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;threshold description=&quot;Trigger an \
alert for batch failures&quot; type=&quot;high&quot; ds-type=&quot;node&quot; \
value=&quot;1&quot; rearm=&quot;0.9&quot; trigger=&quot;1&quot; \
ds-label=&quot;batchfailure&quot; \
triggeredUEI=&quot;uei.opennms.org/ABBCS/Batch/failure-crit&quot;  \
rearmedUEI=&quot;uei.opennms.org/ABBCS/Batch/failure-rearm&quot; \
filterOperator=&quot;OR&quot; \
ds-name=&quot;batchfailure&quot;/&gt;<o:p></o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">&nbsp;&nbsp; \
&lt;/group&gt;<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Verdana&quot;,sans-serif"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span \
style="font-family:&quot;Verdana&quot;,sans-serif"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,sans-serif">I know \
OpenNMS is successfully fetching the data from snmp because of this entry in the \
collectd.log:<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Verdana&quot;,sans-serif"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">2018-11-22 \
08:02:42,359 INFO&nbsp; [Collectd-Thread-29-of-50] \
o.o.n.c.p.r.RrdPersistOperationBuilder: updateRRD: updating RRD file \
/opt/opennms/share/rrd/snmp/fs/Servers/ellbat0-dev-n03-kum/batchfailure.jrb  with \
values '1542852162:8'<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Verdana&quot;,sans-serif"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,sans-serif">But \
I&#8217;m getting the following error in my collectd.log:<o:p></o:p></span></p> <p \
class="MsoNormal"><span \
style="font-family:&quot;Verdana&quot;,sans-serif"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">2018-11-22 \
08:02:42,360 DEBUG [Collectd-Thread-29-of-50] o.o.n.t.ThresholdingSet: \
applyThresholds: Ignoring resource node[537].interfaceSnmp[eth0-000d3a3992e3] because \
required attributes map is empty.<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Verdana&quot;,sans-serif"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span \
style="font-family:&quot;Verdana&quot;,sans-serif"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,sans-serif">What am I \
missing to get this threshold to work?<o:p></o:p></span></p> <p \
class="MsoNormal"><span \
style="font-family:&quot;Verdana&quot;,sans-serif"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span \
style="font-family:&quot;Verdana&quot;,sans-serif">Regards,<o:p></o:p></span></p> <p \
class="MsoNormal"><span \
style="font-family:&quot;Verdana&quot;,sans-serif">John<o:p></o:p></span></p> <p \
class="MsoNormalCxSpMiddle" style="mso-margin-bottom-alt:auto;mso-add-space:auto"> \
<span style="font-size:9.0pt;font-family:&quot;ABBvoice&quot;,sans-serif;mso-fareast-language:EN-AU"><o:p>&nbsp;</o:p></span></p>
 <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</body>
</html>


[Attachment #4 (--===============8226636507307028484==)]


_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-discuss mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-discuss

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic