How are alarm periods / evaluation periods calculated?

Asked by Josh

Can you describe, perhaps with an example, how alarm evaluation periods are calculated? I read a previous question that indicated they are somewhat different than Amazon's alarms, but it wasn't clear exactly how evaluation periods are calculated from a set of metric values. Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
Synaps Edit question
Assignee:
No assignee Edit question
Solved by:
Josh
Solved:
Last query:
Last reply:
Revision history for this message
June Yi (gochist) said :
#1

Current concept of evaluation periods has been aligned with AWS CW.

Here's updated example.

Timestamp / Average
2012-10-23 00:00:00 / 12.0
2012-10-23 00:01:00 / 9.0
2012-10-23 00:02:00 / 10.0
2012-10-23 00:03:00 / 10.5
2012-10-23 00:04:00 / 11.0
2012-10-23 00:05:00 / 20.0
2012-10-23 00:06:00 / 16.0

and alarm of which attributes is as below,

- periods: 120 (sec)
- evalutaion periods: 3 (times)

Old version(before 2013.1.2) of Synaps had evaluated following datapoints rolled up at 2012-10-23 00:06:00,

2012-10-23 00:04:00 / 10.75 (= (10.5 + 11.0) / 2)
2012-10-23 00:05:00 / 15.5 (= (11.0 + 20.0) / 2)
2012-10-23 00:06:00 / 18.0 (= (20.0 + 16.0) / 2)

Current WIP version of Synaps evaluates the alarm at 2012-10-23 00:06:00 as CW does.

2012-10-23 00:02:00 / 18.0 (= (9.0 + 10.0) / 2)
2012-10-23 00:04:00 / 15.25 (= (10.5 + 11.0) / 2)
2012-10-23 00:06:00 / 18.0 (= (20.0 + 16.0) / 2)

Cheers,
June

Revision history for this message
Josh (pacesysjosh) said :
#2

Thanks for the info.

How often does Synaps evaluate to determine if they need to be moved to a new state? Does it only evaluate when new metrics arrive or does it evaluate on a timer such as 1 minute? I'm particularly wondering how it evaluates custom metrics that may arrive at irregular intervals.

Thanks,
Josh

Revision history for this message
Josh (pacesysjosh) said :
#3

How often does Synaps evaluate alarms, I meant to say...

Revision history for this message
June Yi (gochist) said :
#4

Current WIP version of Synaps only evaluates based on a 1 minute timer[1].
(Before version 2013.1.2, it evaluated based on both timer and metric data arrival.)

For your information, evaluation algorithm is coded in metric bolt[2].

Thanks,
June

[1] https://github.com/spcs/synaps/blob/master/synaps-storm/multilang/resources/synstorm_check_spout.py
[2] https://github.com/spcs/synaps/blob/2807115bb897ba390a7b3d9740ec7426f8c49e4c/synaps-storm/multilang/resources/synstorm_put_metric_bolt.py#L272

Revision history for this message
Josh (pacesysjosh) said :
#5

Thanks June. I wanted to run through the tests so I can see this in action, but it looks like the tests require a server to be up - or am I missing something? What's the best way to run the tests?

Thanks,
Jonathan

Revision history for this message
June Yi (gochist) said :
#6

Here I updated developer's guide so that you can run the test easily.

http://spcs.github.com/synaps/artifacts/developersguide.html#developersguide

Thanks,
June

Revision history for this message
Josh (pacesysjosh) said :
#7

Thanks June!