Discussion:
[opennms-discuss] Calculation in events/notifications
i***@1150.cc
2017-07-17 15:47:20 UTC
Permalink
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
***@taactech.com

------------------------------------------------------------------------------
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
Seibold, Michael
2017-07-18 16:06:47 UTC
Permalink
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: ***@1150.cc [mailto:***@1150.cc]
Gesendet: Montag, 17. Juli 2017 17:47
An: opennms-***@lists.sourceforge.net
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
***@taactech.com

------------------------------------------------------------------------------
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

Loading...