[opennms-devel] Thresholds Processing Features

Alejandro Galue <[email protected]> Tue, 19 May 2009 08:16:15 -0430
Newsgroups gmane.network.opennms.bugs,gmane.network.opennms.devel
Message-ID <[email protected]>
--===============7414802692181102935==
Content-Type: multipart/alternative; boundary=Apple-Mail-4-289487002


--Apple-Mail-4-289487002
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed;
	delsp=yes
Content-Transfer-Encoding: 7bit

Hello All,

Today I merged my changes into trunk from branch feature-new-threshold- 
visitor.

This changes solve Bug 3146 and adds a new feature for Pollerd in-line  
thresholding processing.

About the Bug 3146...

The old implementation couldn't maintain threshold's states across  
configuration reloading. The new implementation is more intelligent  
about that and can track:

a) If the configuration change is not related to currently triggered  
thresholds, just simple keep state.
b) If the configuration changes is related to currently triggered  
thresholds, send a special rearm (with NaN as current value, and a new  
event parameter called reason with value: 'Configuration has been  
changed'), in order to keep automations working fine. After that, new  
configuration is merged to old one and new thresholds will use the new  
configuration correctly.
c) If the configuration replaces currently triggered thresholds (for  
example, you change a high threshold for a low threshold), the  
procedure is similar to b).

About the new thresholding processor on Pollerd.

Now, you can add a special parameter called thresholding-enabled (like  
you usually add it on collectd-configuration.xml) on a service  
definition in poller-configuration.xml to enable thresholds  
processing; for example:

<service name="ICMP" interval="300000" user-defined="false" status="on">
   <parameter key="retry" value="2" />
   <parameter key="timeout" value="3000" />
   <parameter key="rrd-repository" value="/opt/opennms/share/rrd/ 
response" />
   <parameter key="rrd-base-name" value="icmp" />
   <parameter key="ds-name" value="icmp" />
   <parameter key="thresholding-enabled" value="true" />
</service>

and then configure thresholds....

thresd-configuration.xml:

<package name="icmp-latency">
   <filter>IPADDR != '0.0.0.0'</filter>
   <include-range begin="1.1.1.1" end="254.254.254.254"/>
   <service name="ICMP" interval="300000" user-defined="false"  
status="on">
     <parameter key="thresholding-group" value="icmp-latency"/>
   </service>
</package>

thresholds.xml:

<group name="icmp-latency" rrdRepository="/opt/opennms/share/rrd/ 
response/">
   <threshold type="high" ds-type="if" value="200.0" rearm="100.0"  
trigger="1" ds-name="icmp"/>
</group>

Please test it and let me know if anyone found something wrong.

Regards,
Alejandro.


--Apple-Mail-4-289487002
Content-Type: text/html;
	charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

<html><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; =
-webkit-line-break: after-white-space; "><div><span =
class=3D"Apple-style-span" style=3D"white-space: pre-wrap; =
-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: =
2px; "><font class=3D"Apple-style-span" face=3D"'Lucida Sans'"><font =
class=3D"Apple-style-span" size=3D"4"><span class=3D"Apple-style-span" =
style=3D"font-size: 14px;">Hello All,

Today I merged my changes into trunk from branch =
feature-new-threshold-visitor.

This changes solve Bug 3146 and adds a new feature for Pollerd in-line =
thresholding processing.

About the Bug 3146...

The old implementation couldn't maintain threshold's states across =
configuration reloading. The new implementation is more intelligent =
about that and can track:

a) If the configuration change is not related to currently triggered =
thresholds, just simple keep state.
b) If the configuration changes is related to currently triggered =
thresholds, send a special rearm (with NaN as current value, and a new =
event parameter called reason with value: 'Configuration has been =
changed'), in order to keep automations working fine. After that, new =
configuration is merged to old one and new thresholds will use the new =
configuration correctly.
c) If the configuration replaces currently triggered thresholds (for =
example, you change a high threshold for a low threshold), the procedure =
is similar to b).

About the new thresholding processor on Pollerd.

Now, you can add a special parameter called thresholding-enabled (like =
you usually add it on collectd-configuration.xml) on a service =
definition in poller-configuration.xml to enable thresholds processing; =
for example:</span></font></font></span></div><div><span =
class=3D"Apple-style-span" style=3D"white-space: pre-wrap; =
-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: =
2px; "><font class=3D"Apple-style-span" face=3D"'Lucida Sans'"><font =
class=3D"Apple-style-span" size=3D"4"><span class=3D"Apple-style-span" =
style=3D"font-size: =
14px;"><br></span></font></font></span></div><div><div><font =
class=3D"Apple-style-span" face=3D"'Lucida Sans'"><font =
class=3D"Apple-style-span" size=3D"4"><span class=3D"Apple-style-span" =
style=3D"font-size: 14px;">&lt;service name=3D"ICMP" interval=3D"300000" =
user-defined=3D"false" status=3D"on"></span></font></font></div><div><font=
 class=3D"Apple-style-span" face=3D"'Lucida Sans'"><font =
class=3D"Apple-style-span" size=3D"4"><span class=3D"Apple-style-span" =
style=3D"font-size: 14px;">&nbsp;&nbsp;&lt;parameter key=3D"retry" =
value=3D"2" /></span></font></font></div><div><font =
class=3D"Apple-style-span" face=3D"'Lucida Sans'"><font =
class=3D"Apple-style-span" size=3D"4"><span class=3D"Apple-style-span" =
style=3D"font-size: 14px;">&nbsp;&nbsp;&lt;parameter key=3D"timeout" =
value=3D"3000" /></span></font></font></div><div><font =
class=3D"Apple-style-span" face=3D"'Lucida Sans'"><font =
class=3D"Apple-style-span" size=3D"4"><span class=3D"Apple-style-span" =
style=3D"font-size: 14px;">&nbsp;&nbsp;&lt;parameter =
key=3D"rrd-repository" value=3D"/opt/opennms/share/rrd/response" =
/></span></font></font></div><div><font class=3D"Apple-style-span" =
face=3D"'Lucida Sans'"><font class=3D"Apple-style-span" size=3D"4"><span =
class=3D"Apple-style-span" style=3D"font-size: =
14px;">&nbsp;&nbsp;&lt;parameter key=3D"rrd-base-name" value=3D"icmp" =
/></span></font></font></div><div><font class=3D"Apple-style-span" =
face=3D"'Lucida Sans'"><font class=3D"Apple-style-span" size=3D"4"><span =
class=3D"Apple-style-span" style=3D"font-size: =
14px;">&nbsp;&nbsp;&lt;parameter key=3D"ds-name" value=3D"icmp" =
/></span></font></font></div><div><font class=3D"Apple-style-span" =
face=3D"'Lucida Sans'"><font class=3D"Apple-style-span" size=3D"4"><span =
class=3D"Apple-style-span" style=3D"font-size: =
14px;">&nbsp;&nbsp;&lt;parameter key=3D"thresholding-enabled" =
value=3D"true" /></span></font></font></div><div><font =
class=3D"Apple-style-span" face=3D"'Lucida Sans'"><font =
class=3D"Apple-style-span" size=3D"4"><span class=3D"Apple-style-span" =
style=3D"font-size: =
14px;">&lt;/service></span></font></font></div><div><font =
class=3D"Apple-style-span" face=3D"'Lucida Sans'"><font =
class=3D"Apple-style-span" size=3D"4"><span class=3D"Apple-style-span" =
style=3D"font-size: 14px;"><br></span></font></font></div><div><font =
class=3D"Apple-style-span" face=3D"'Lucida Sans'"><font =
class=3D"Apple-style-span" size=3D"4"><span class=3D"Apple-style-span" =
style=3D"font-size: 14px;">and then configure =
thresholds....</span></font></font></div><div><font =
class=3D"Apple-style-span" face=3D"'Lucida Sans'"><font =
class=3D"Apple-style-span" size=3D"4"><span class=3D"Apple-style-span" =
style=3D"font-size: 14px;"><br></span></font></font></div><div><font =
class=3D"Apple-style-span" face=3D"'Lucida Sans'"><font =
class=3D"Apple-style-span" size=3D"4"><span class=3D"Apple-style-span" =
style=3D"font-size: =
14px;">thresd-configuration.xml:</span></font></font></div><div><font =
class=3D"Apple-style-span" face=3D"'Lucida Sans'"><font =
class=3D"Apple-style-span" size=3D"4"><span class=3D"Apple-style-span" =
style=3D"font-size: =
14px;"><br></span></font></font></div><div><div><font =
class=3D"Apple-style-span" face=3D"'Lucida Sans'"><font =
class=3D"Apple-style-span" size=3D"4"><span class=3D"Apple-style-span" =
style=3D"font-size: 14px;">&lt;package =
name=3D"icmp-latency"></span></font></font></div><div><font =
class=3D"Apple-style-span" face=3D"'Lucida Sans'"><font =
class=3D"Apple-style-span" size=3D"4"><span class=3D"Apple-style-span" =
style=3D"font-size: 14px;">&nbsp;&nbsp;&lt;filter>IPADDR !=3D =
'0.0.0.0'&lt;/filter></span></font></font></div><div><font =
class=3D"Apple-style-span" face=3D"'Lucida Sans'"><font =
class=3D"Apple-style-span" size=3D"4"><span class=3D"Apple-style-span" =
style=3D"font-size: 14px;">&nbsp;&nbsp;&lt;include-range begin=3D"1.1.1.1"=
 end=3D"254.254.254.254"/></span></font></font></div><div><font =
class=3D"Apple-style-span" face=3D"'Lucida Sans'"><font =
class=3D"Apple-style-span" size=3D"4"><span class=3D"Apple-style-span" =
style=3D"font-size: 14px;">&nbsp;&nbsp;&lt;service name=3D"ICMP" =
interval=3D"300000" user-defined=3D"false" =
status=3D"on"></span></font></font></div><div><font =
class=3D"Apple-style-span" face=3D"'Lucida Sans'"><font =
class=3D"Apple-style-span" size=3D"4"><span class=3D"Apple-style-span" =
style=3D"font-size: 14px;">&nbsp;&nbsp; &nbsp;&lt;parameter =
key=3D"thresholding-group" =
value=3D"icmp-latency"/></span></font></font></div><div><font =
class=3D"Apple-style-span" face=3D"'Lucida Sans'"><font =
class=3D"Apple-style-span" size=3D"4"><span class=3D"Apple-style-span" =
style=3D"font-size: =
14px;">&nbsp;&nbsp;&lt;/service></span></font></font></div><div><font =
class=3D"Apple-style-span" face=3D"'Lucida Sans'"><font =
class=3D"Apple-style-span" size=3D"4"><span class=3D"Apple-style-span" =
style=3D"font-size: =
14px;">&lt;/package></span></font></font></div><div><font =
class=3D"Apple-style-span" face=3D"'Lucida Sans'"><font =
class=3D"Apple-style-span" size=3D"4"><span class=3D"Apple-style-span" =
style=3D"font-size: 14px;"><br></span></font></font></div><div><font =
class=3D"Apple-style-span" face=3D"'Lucida Sans'"><font =
class=3D"Apple-style-span" size=3D"4"><span class=3D"Apple-style-span" =
style=3D"font-size: =
14px;">thresholds.xml:</span></font></font></div><div><font =
class=3D"Apple-style-span" face=3D"'Lucida Sans'"><font =
class=3D"Apple-style-span" size=3D"4"><span class=3D"Apple-style-span" =
style=3D"font-size: =
14px;"><br></span></font></font></div><div><div><font =
class=3D"Apple-style-span" face=3D"'Lucida Sans'"><font =
class=3D"Apple-style-span" size=3D"4"><span class=3D"Apple-style-span" =
style=3D"font-size: 14px;">&lt;group name=3D"icmp-latency" =
rrdRepository=3D"/opt/opennms/share/rrd/response/"></span></font></font></=
div><div><font class=3D"Apple-style-span" face=3D"'Lucida Sans'"><font =
class=3D"Apple-style-span" size=3D"4"><span class=3D"Apple-style-span" =
style=3D"font-size: 14px;">&nbsp;&nbsp;&lt;threshold type=3D"high" =
ds-type=3D"if" value=3D"200.0" rearm=3D"100.0"&nbsp;trigger=3D"1" =
ds-name=3D"icmp"/></span></font></font></div><div><font =
class=3D"Apple-style-span" face=3D"'Lucida Sans'"><font =
class=3D"Apple-style-span" size=3D"4"><span class=3D"Apple-style-span" =
style=3D"font-size: =
14px;">&lt;/group></span></font></font></div><div><font =
class=3D"Apple-style-span" face=3D"'Lucida Sans'"><font =
class=3D"Apple-style-span" size=3D"4"><span class=3D"Apple-style-span" =
style=3D"font-size: 14px;"><br></span></font></font></div><div><font =
class=3D"Apple-style-span" face=3D"'Lucida Sans'"><font =
class=3D"Apple-style-span" size=3D"4"><span class=3D"Apple-style-span" =
style=3D"font-size: 14px;">Please test it and let me know if anyone =
found something wrong.</span></font></font></div><div><font =
class=3D"Apple-style-span" face=3D"'Lucida Sans'"><font =
class=3D"Apple-style-span" size=3D"4"><span class=3D"Apple-style-span" =
style=3D"font-size: 14px;"><br></span></font></font></div><div><font =
class=3D"Apple-style-span" face=3D"'Lucida Sans'"><font =
class=3D"Apple-style-span" size=3D"4"><span class=3D"Apple-style-span" =
style=3D"font-size: 14px;">Regards,</span></font></font></div><div><font =
class=3D"Apple-style-span" face=3D"'Lucida Sans'"><font =
class=3D"Apple-style-span" size=3D"4"><span class=3D"Apple-style-span" =
style=3D"font-size: =
14px;">Alejandro.</span></font></font></div><div><br></div></div></div></d=
iv></body></html>=

--Apple-Mail-4-289487002--


--===============7414802692181102935==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
--===============7414802692181102935==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
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
--===============7414802692181102935==--