Alarm's transition from 'insufficient data' state is calculated based on last value in evaluation periods

Bug #1540395 reported by Yurii Prokulevych
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Aodh
Fix Released
Medium
Mehdi Abaakouk

Bug Description

Alarm transitions from 'insufficient data' state to new one based on the value of last sample in the configured evaluation periods.

E.g:

ceilometer alarm-show 14f014a3-cea1-4491-a323-9cd91d8cada7
+---------------------------+--------------------------------------+
| Property | Value |
+---------------------------+--------------------------------------+
| alarm_actions | [u'log://'] |
| alarm_id | 14f014a3-cea1-4491-a323-9cd91d8cada7 |
| comparison_operator | ge |
| description | Yurii Test Coordination |
| enabled | True |
| evaluation_periods | 3 |
| exclude_outliers | False |
| insufficient_data_actions | [u'log://'] |
| meter_name | MyAlarmMeter1 |
| name | RHOSP-7331 |
| ok_actions | [u'log://'] |
| period | 60 |
| project_id | 63c2e37b0dae4edba33b39c627277da2 |
| query | resource_id == MyFakeResource1 |
| repeat_actions | False |
| severity | moderate |
| state | insufficient data |
| statistic | avg |
| threshold | 3.0 |
| type | threshold |
| user_id | 21c76f98274e43648b8601c9ad280299 |
+---------------------------+--------------------------------------+

2016-02-01 11:14:00.895 5185 DEBUG aodh.coordination [req-c939bbc0-f2e3-472c-b949-b59f76ce5833 - - - - -] Members of group: ['8d4bc0b5-7dad-417a-aeee-477e321f40bb', 'c07a75b8-d89c-4de5-b561-65d439688729'] extract_my_subset /usr/lib/python2.7/site-packages/aodh/coordination.py:169
2016-02-01 11:14:00.923 5185 DEBUG aodh.coordination [req-c939bbc0-f2e3-472c-b949-b59f76ce5833 - - - - -] My subset: [<aodh.storage.models.Alarm object at 0x222df50>] extract_my_subset /usr/lib/python2.7/site-packages/aodh/coordination.py:173
2016-02-01 11:14:00.924 5185 INFO aodh.evaluator [req-c939bbc0-f2e3-472c-b949-b59f76ce5833 - - - - -] initiating evaluation cycle on 1 alarms
2016-02-01 11:14:00.924 5185 DEBUG aodh.evaluator [req-c939bbc0-f2e3-472c-b949-b59f76ce5833 - - - - -] evaluating alarm 14f014a3-cea1-4491-a323-9cd91d8cada7 _evaluate_alarm /usr/lib/python2.7/site-packages/aodh/evaluator/__init__.py:218
2016-02-01 11:14:00.925 5185 DEBUG aodh.evaluator.threshold [req-c939bbc0-f2e3-472c-b949-b59f76ce5833 - - - - -] query stats from 2016-02-01 11:10:00.925082 to 2016-02-01 11:14:00.925082 _bound_duration /usr/lib/python2.7/site-packages/aodh/evaluator/threshold.py:80
2016-02-01 11:14:00.925 5185 DEBUG aodh.evaluator.threshold [req-c939bbc0-f2e3-472c-b949-b59f76ce5833 - - - - -] stats query [{u'field': u'resource_id', u'type': u'', u'value': u'MyFakeResource1', u'op': u'eq'},
 {'field': 'timestamp', 'value': '2016-02-01T11:14:00.925082', 'op': 'le'}, {'field': 'timestamp', 'value': '2016-02-01T11:10:00.925082', 'op': 'ge'}] _statistics /usr/lib/python2.7/site-packages/aodh/evaluator/
threshold.py:115
2016-02-01 11:14:01.275 5185 DEBUG aodh.evaluator.threshold [req-c939bbc0-f2e3-472c-b949-b59f76ce5833 - - - - -] sanitize stats [<Statistics {u'count': 1, u'duration_start': u'2016-02-01T11:11:25.029000', u'min'
: 1.0, u'max': 1.0, u'duration_end': u'2016-02-01T11:11:25.029000', u'period': 60, u'groupby': None, u'period_end': u'2016-02-01T11:12:00.925082', u'duration': 0.0, u'period_start': u'2016-02-01T11:11:00.925082', u'avg': 1.0, u'sum': 1.0, u'unit': u'UnitAlarm1'}>, <Statistics {u'count': 1, u'duration_start': u'2016-02-01T11:12:29.949000', u'min': 2.0, u'max': 2.0, u'duration_end': u'2016-02-01T11:12:29.949000', u'perio
d': 60, u'groupby': None, u'period_end': u'2016-02-01T11:13:00.925082', u'duration': 0.0, u'period_start': u'2016-02-01T11:12:00.925082', u'avg': 2.0, u'sum': 2.0, u'unit': u'UnitAlarm1'}>, <Statistics {u'count': 1, u'duration_start': u'2016-02-01T11:13:36.991000', u'min': 3.0, u'max': 3.0, u'duration_end': u'2016-02-01T11:13:36.991000', u'period': 60, u'groupby': None, u'period_end': u'2016-02-01T11:14:00.925082', u'd
uration': 0.0, u'period_start': u'2016-02-01T11:13:00.925082', u'avg': 3.0, u'sum': 3.0, u'unit': u'UnitAlarm1'}>] _sanitize /usr/lib/python2.7/site-packages/aodh/evaluator/threshold.py:86
2016-02-01 11:14:01.275 5185 DEBUG aodh.evaluator.threshold [req-c939bbc0-f2e3-472c-b949-b59f76ce5833 - - - - -] pruned statistics to 3 _sanitize /usr/lib/python2.7/site-packages/aodh/evaluator/threshold.py:106
2016-02-01 11:14:01.276 5185 DEBUG aodh.evaluator.threshold [req-c939bbc0-f2e3-472c-b949-b59f76ce5833 - - - - -] comparing value 1.0 against threshold 3.0 _compare /usr/lib/python2.7/site-packages/aodh/evaluator/threshold.py:216
2016-02-01 11:14:01.276 5185 DEBUG aodh.evaluator.threshold [req-c939bbc0-f2e3-472c-b949-b59f76ce5833 - - - - -] comparing value 2.0 against threshold 3.0 _compare /usr/lib/python2.7/site-packages/aodh/evaluator
/threshold.py:216
2016-02-01 11:14:01.277 5185 DEBUG aodh.evaluator.threshold [req-c939bbc0-f2e3-472c-b949-b59f76ce5833 - - - - -] comparing value 3.0 against threshold 3.0 _compare /usr/lib/python2.7/site-packages/aodh/evaluator
/threshold.py:216
2016-02-01 11:14:01.278 5185 INFO aodh.evaluator [req-c939bbc0-f2e3-472c-b949-b59f76ce5833 - - - - -] alarm 14f014a3-cea1-4491-a323-9cd91d8cada7 transitioning to alarm because Transition to alarm due to 3 sample
s outside threshold, most recent: 3.0

Packages:
aodh*-1.1.0-1.el7ost.noarch

---
Regards,
Yurii

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to aodh (master)

Reviewed: https://review.openstack.org/274615
Committed: https://git.openstack.org/cgit/openstack/aodh/commit/?id=30a3e52773ba6f5f699e66f415bc00e93e967c96
Submitter: Jenkins
Branch: master

commit 30a3e52773ba6f5f699e66f415bc00e93e967c96
Author: Mehdi Abaakouk <email address hidden>
Date: Mon Feb 1 12:42:18 2016 +0100

    Fix alarm reason

    Alarm reason reports "transitioning to alarm because Transition to alarm due to 3
    samples outside threshold, most recent: 3.0" when only one samples is
    outside the threshold.

    This change fixes that.

    Related-bug: #1540395

    Change-Id: I70be9a4e832655efe83e414bd220a9aaa4869247

Liusheng (liusheng)
Changed in aodh:
assignee: nobody → Mehdi Abaakouk (sileht)
status: New → Fix Committed
importance: Undecided → Medium
Mehdi Abaakouk (sileht)
Changed in aodh:
status: Fix Committed → Confirmed
status: Confirmed → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to aodh (stable/liberty)

Related fix proposed to branch: stable/liberty
Review: https://review.openstack.org/281179

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to aodh (stable/liberty)

Reviewed: https://review.openstack.org/281179
Committed: https://git.openstack.org/cgit/openstack/aodh/commit/?id=62b18d667064506b3f8f62653fc0b8662b41ebf5
Submitter: Jenkins
Branch: stable/liberty

commit 62b18d667064506b3f8f62653fc0b8662b41ebf5
Author: Mehdi Abaakouk <email address hidden>
Date: Mon Feb 1 12:42:18 2016 +0100

    Fix alarm reason

    Alarm reason reports "transitioning to alarm because Transition to alarm due to 3
    samples outside threshold, most recent: 3.0" when only one samples is
    outside the threshold.

    This change fixes that.

    Related-bug: #1540395

    Conflicts:
     aodh/evaluator/threshold.py
     aodh/tests/evaluator/test_gnocchi.py

    Change-Id: I70be9a4e832655efe83e414bd220a9aaa4869247

tags: added: in-stable-liberty
ZhiQiang Fan (aji-zqfan)
Changed in aodh:
milestone: none → mitaka-rc1
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.