Some minor improvements for doc and log
Change-Id: I7901f9a4d871a20d833049db11c39f0270ccc098
This commit is contained in:
parent
beb2896a4b
commit
3bb8de94f7
2
.gitignore
vendored
2
.gitignore
vendored
@ -21,3 +21,5 @@ releasenotes/build
|
||||
/doc/source/contributor/api/
|
||||
doc/source/_static/aodh.policy.yaml.sample
|
||||
doc/source/_static/aodh.conf.sample
|
||||
|
||||
.vscode/
|
||||
|
@ -41,7 +41,7 @@ class CompositeRule(wtypes.UserType):
|
||||
threshold_plugins = None
|
||||
|
||||
def __init__(self):
|
||||
threshold_rules = ('ceilometer',
|
||||
threshold_rules = ('threshold',
|
||||
'gnocchi_resources_threshold',
|
||||
'gnocchi_aggregation_by_metrics_threshold',
|
||||
'gnocchi_aggregation_by_resources_threshold')
|
||||
|
@ -237,10 +237,14 @@ class EventAlarmEvaluator(evaluator.Evaluator):
|
||||
|
||||
for condition in alarm.query:
|
||||
if not _compare(condition):
|
||||
LOG.debug('Aborting evaluation of the alarm due to '
|
||||
'unmet condition=%s .', condition)
|
||||
LOG.info('Aborting evaluation of the alarm %s due to '
|
||||
'unmet condition=%s .', alarm.id, condition)
|
||||
return
|
||||
|
||||
LOG.info('Triggering the alarm %s by event for project %s, '
|
||||
'event_type: %s',
|
||||
alarm.id, event.project, event.obj.get('event_type'))
|
||||
|
||||
self._fire_alarm(alarm, event)
|
||||
|
||||
def _fire_alarm(self, alarm, event):
|
||||
|
@ -2586,13 +2586,9 @@ class TestAlarmsCompositeRule(TestAlarmsBase):
|
||||
expect_errors=True,
|
||||
headers=self.auth_headers)
|
||||
|
||||
err = ("Unsupported sub-rule type :non-type in composite "
|
||||
"rule, should be one of: "
|
||||
"['gnocchi_aggregation_by_metrics_threshold', "
|
||||
"'gnocchi_aggregation_by_resources_threshold', "
|
||||
"'gnocchi_resources_threshold']")
|
||||
err = "Unsupported sub-rule type"
|
||||
faultstring = response.json['error_message']['faultstring']
|
||||
self.assertEqual(err, faultstring)
|
||||
self.assertIn(err, faultstring)
|
||||
|
||||
def test_post_with_sub_rule_with_only_required_params(self):
|
||||
sub_rulea = {
|
||||
|
@ -43,9 +43,13 @@ governed by:
|
||||
* A sliding time window to indicate how far back into the recent past
|
||||
you want to look.
|
||||
|
||||
Valid threshold alarms are: ``gnocchi_resources_threshold``,
|
||||
``gnocchi_aggregation_by_metrics_threshold``, or
|
||||
``gnocchi_aggregation_by_resources_threshold``.
|
||||
Both Ceilometer and Gnocchi are supported as data source of the threshold rule
|
||||
alarm. Valid threshold alarms are:
|
||||
|
||||
* threshold
|
||||
* gnocchi_resources_threshold
|
||||
* gnocchi_aggregation_by_metrics_threshold
|
||||
* gnocchi_aggregation_by_resources_threshold
|
||||
|
||||
Composite rule alarms
|
||||
---------------------
|
||||
@ -105,6 +109,18 @@ These are a lightweight alternative to webhooks, whereby the state
|
||||
transition is simply logged by the ``alarm-notifier``, and are
|
||||
intended primarily for testing purposes.
|
||||
|
||||
**heat**
|
||||
|
||||
This notifier works together with ``loadbalancer_member_health`` evaluator.
|
||||
Presumably, the end user defines a Heat template which contains an autoscaling
|
||||
group and all the members in the group are joined in an Octavia load balancer
|
||||
in order to expose highly available service to the outside, so that when the
|
||||
stack scales up or scales down, Heat makes sure the new members are joining the
|
||||
load balancer automatically and the old members are removed. However, this
|
||||
notifier deals with the situation that when some member fails, the Heat stack
|
||||
could be recovered automatically.
|
||||
|
||||
|
||||
Workload partitioning
|
||||
---------------------
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user