Calculation in events/notifications

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Calculation in events/notifications

Bill Nelson-2
All

I'm wondering if it's possible to do calculation on parameters in
events?

I'm generating events on StrafePings and putting %parm[value]% and
%parm[threshold]% information into the event description.  Problem is
the threshold and polled value appear to be in microseconds which when
displayed are bit numbers.  For example, a recent notification stated
the value 244650.8 exceeded the threshold of 100000.0.  I would like to
do some math so I could display the value 244.7ms exceeded the threshold
of 100ms.

Is this possible and if yes, can someone give me an example of how to go
about it?

Thanks
Bill Nelson
[hidden email]

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Calculation in events/notifications

Seibold, Michael-2
Hi Bill,

look into the config of thresholds.xml, maybe there are already some examples there.

This one converts the icmp response time to ms:

expression="icmp/1000."

Using this expression, you have to set the thresholds in ms, so they should display in ms without any further math.

-Michael


-----Urspr√ľngliche Nachricht-----
Von: [hidden email] [mailto:[hidden email]]
Gesendet: Montag, 17. Juli 2017 17:47
An: [hidden email]
Betreff: [opennms-discuss] Calculation in events/notifications

All

I'm wondering if it's possible to do calculation on parameters in
events?

I'm generating events on StrafePings and putting %parm[value]% and
%parm[threshold]% information into the event description.  Problem is
the threshold and polled value appear to be in microseconds which when
displayed are bit numbers.  For example, a recent notification stated
the value 244650.8 exceeded the threshold of 100000.0.  I would like to
do some math so I could display the value 244.7ms exceeded the threshold
of 100ms.

Is this possible and if yes, can someone give me an example of how to go
about it?

Thanks
Bill Nelson
[hidden email]

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
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

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
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