Aodh Documentation: Release 13.0.0.0rc2.dev2
Aodh Documentation: Release 13.0.0.0rc2.dev2
Release 13.0.0.0rc2.dev2
OpenStack Foundation
1 Installation Guide 3
1.1 Telemetry Alarming service overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Install and configure for openSUSE and SUSE Linux Enterprise . . . . . . . . . . . . . 3
1.2.1 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2.2 Install and configure components . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2.3 Finalize installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3 Install and configure for Red Hat Enterprise Linux and CentOS . . . . . . . . . . . . . 8
1.3.1 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.3.2 Install and configure components . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.3.3 Finalize installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.4 Install and configure for Ubuntu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.4.1 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.4.2 Install and configure components . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.4.3 Finalize installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.5 Next steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2 Contributor Guide 17
2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.1.1 System Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
High-Level Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Evaluating the data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Alarm Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Alarm Evaluators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Alarm Notifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Alarm Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.1.2 Web API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
V2 Web API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.2 Developer Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
2.2.1 Installing Aodh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Installing development sandbox . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Installing Manually . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Installing the API behind mod_wsgi . . . . . . . . . . . . . . . . . . . . . . . . 33
Installing the API with uwsgi . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
2.2.2 Running the Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
2.2.3 Contributing to Aodh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Project Hosting Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
2.2.4 Event alarm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
i
2.3 Appendix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
2.3.1 Release Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
2.4 Indices and tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
3 Administration Guide 39
3.1 Alarms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
3.1.1 Alarm definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Threshold rule alarms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Composite rule alarms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
3.1.2 Alarm dimensioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
3.1.3 Alarm evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Alarm actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
3.1.4 Using alarms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Alarm creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Alarm retrieval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Alarm update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Alarm deletion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Debug alarms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
3.2 Resource Quota Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
3.2.1 Quota API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
4 Configuration Guide 51
4.1 Aodh Sample Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
4.2 Aodh Configuration Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
4.2.1 aodh: DEFAULT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
4.2.2 aodh: api . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
4.2.3 aodh: coordination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
4.2.4 aodh: database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
4.2.5 aodh: evaluator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
4.2.6 aodh: listener . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
4.2.7 aodh: notifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
4.2.8 aodh: service_credentials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
4.2.9 aodh: service_types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
4.3 Aodh Sample Policy Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . . 57
4.3.1 aodh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
4.4 policy.yaml . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
6 Glossary 67
ii
Aodh Documentation, Release 13.0.0.0rc2.dev2
The Alarming service (aodh) project provides a service that enables the ability to trigger actions based
on defined rules against metric or event data collected by Ceilometer or Gnocchi.
CONTENTS 1
Aodh Documentation, Release 13.0.0.0rc2.dev2
2 CONTENTS
CHAPTER
ONE
INSTALLATION GUIDE
The Telemetry Alarming services trigger alarms when the collected metering or event data break the
defined rules.
The Telemetry Alarming service consists of the following components:
An API server (aodh-api) Runs on one or more central management servers to provide access to the
alarm information stored in the data store.
An alarm evaluator (aodh-evaluator) Runs on one or more central management servers to deter-
mine when alarms fire due to the associated statistic trend crossing a threshold over a sliding time
window.
A notification listener (aodh-listener) Runs on a central management server and determines when
to fire alarms. The alarms are generated based on defined rules against events, which are captured
by the Telemetry Data Collection service’s notification agents.
An alarm notifier (aodh-notifier) Runs on one or more central management servers to allow alarms
to be set based on the threshold evaluation for a collection of samples.
These services communicate by using the OpenStack messaging bus.
1.2 Install and configure for openSUSE and SUSE Linux Enterprise
This section describes how to install and configure the Telemetry Alarming service, code-named aodh,
on the controller node.
This section assumes that you already have a working OpenStack environment with at least the following
components installed: Compute, Image Service, Identity.
3
Aodh Documentation, Release 13.0.0.0rc2.dev2
1.2.1 Prerequisites
Before you install and configure the Telemetry service, you must create a database, service credentials,
and API endpoints.
1. To create the database, complete these steps:
• Use the database access client to connect to the database server as the root user:
$ mysql -u root -p
$ . admin-openrc
1.2. Install and configure for openSUSE and SUSE Linux Enterprise 5
Aodh Documentation, Release 13.0.0.0rc2.dev2
Note: Default configuration files vary by distribution. You might need to add these sections and options
rather than modifying existing sections and options. Also, an ellipsis (...) in the configuration snippets
indicates potential default configuration options that you should retain.
[database]
...
connection = mysql+pymysql://aodh:AODH_DBPASS@controller/aodh
Replace AODH_DBPASS with the password you chose for the Telemetry Alarming module
database. You must escape special characters such as :, /, +, and @ in the connection string
in accordance with RFC2396.
• In the [DEFAULT] section, configure RabbitMQ message queue access:
[DEFAULT]
...
transport_url = rabbit://openstack:RABBIT_PASS@controller
Replace RABBIT_PASS with the password you chose for the openstack account in
RabbitMQ.
• In the [DEFAULT] and [keystone_authtoken] sections, configure Identity service access:
[DEFAULT]
...
auth_strategy = keystone
[keystone_authtoken]
...
www_authenticate_uri = http://controller:5000
auth_url = http://controller:5000
memcached_servers = controller:11211
auth_type = password
project_domain_id = default
user_domain_id = default
project_name = service
username = aodh
password = AODH_PASS
Replace AODH_PASS with the password you chose for the aodh user in the Identity service.
• In the [service_credentials] section, configure service credentials:
[service_credentials]
...
auth_type = password
auth_url = http://controller:5000/v3
project_domain_id = default
user_domain_id = default
project_name = service
username = aodh
password = AODH_PASS
interface = internalURL
region_name = RegionOne
Replace AODH_PASS with the password you chose for the aodh user in the Identity service.
3. In order to initialize the database please run the aodh-dbsync script.
1. Start the Telemetry Alarming services and configure them to start when the system boots:
1.2. Install and configure for openSUSE and SUSE Linux Enterprise 7
Aodh Documentation, Release 13.0.0.0rc2.dev2
1.3 Install and configure for Red Hat Enterprise Linux and CentOS
This section describes how to install and configure the Telemetry Alarming service, code-named aodh,
on the controller node.
This section assumes that you already have a working OpenStack environment with at least the following
components installed: Compute, Image Service, Identity.
1.3.1 Prerequisites
Before you install and configure the Telemetry service, you must create a database, service credentials,
and API endpoints.
1. To create the database, complete these steps:
• Use the database access client to connect to the database server as the root user:
$ mysql -u root -p
$ . admin-openrc
1.3. Install and configure for Red Hat Enterprise Linux and CentOS 9
Aodh Documentation, Release 13.0.0.0rc2.dev2
Note: Default configuration files vary by distribution. You might need to add these sections and options
rather than modifying existing sections and options. Also, an ellipsis (...) in the configuration snippets
indicates potential default configuration options that you should retain.
[database]
...
connection = mysql+pymysql://aodh:AODH_DBPASS@controller/aodh
Replace AODH_DBPASS with the password you chose for the Telemetry Alarming module
database. You must escape special characters such as :, /, +, and @ in the connection string
in accordance with RFC2396.
• In the [DEFAULT] section, configure RabbitMQ message queue access:
[DEFAULT]
...
transport_url = rabbit://openstack:RABBIT_PASS@controller
Replace RABBIT_PASS with the password you chose for the openstack account in
RabbitMQ.
• In the [DEFAULT] and [keystone_authtoken] sections, configure Identity service access:
[DEFAULT]
...
auth_strategy = keystone
[keystone_authtoken]
...
www_authenticate_uri = http://controller:5000
auth_url = http://controller:5000
memcached_servers = controller:11211
auth_type = password
project_domain_id = default
user_domain_id = default
project_name = service
username = aodh
password = AODH_PASS
Replace AODH_PASS with the password you chose for the aodh user in the Identity service.
• In the [service_credentials] section, configure service credentials:
[service_credentials]
...
auth_type = password
auth_url = http://controller:5000/v3
project_domain_id = default
user_domain_id = default
project_name = service
username = aodh
password = AODH_PASS
interface = internalURL
region_name = RegionOne
Replace AODH_PASS with the password you chose for the aodh user in the Identity service.
3. In order to initialize the database please run the aodh-dbsync script.
1.3. Install and configure for Red Hat Enterprise Linux and CentOS 11
Aodh Documentation, Release 13.0.0.0rc2.dev2
1. Start the Telemetry Alarming services and configure them to start when the system boots:
This section describes how to install and configure the Telemetry Alarming service, code-named aodh,
on the controller node.
This section assumes that you already have a working OpenStack environment with at least the following
components installed: Compute, Image Service, Identity.
1.4.1 Prerequisites
Before you install and configure the Telemetry service, you must create a database, service credentials,
and API endpoints.
1. To create the database, complete these steps:
• Use the database access client to connect to the database server as the root user:
$ mysql -u root -p
$ . admin-openrc
Note: Default configuration files vary by distribution. You might need to add these sections and options
rather than modifying existing sections and options. Also, an ellipsis (...) in the configuration snippets
indicates potential default configuration options that you should retain.
[database]
...
connection = mysql+pymysql://aodh:AODH_DBPASS@controller/aodh
Replace AODH_DBPASS with the password you chose for the Telemetry Alarming module
database. You must escape special characters such as :, /, +, and @ in the connection string
in accordance with RFC2396.
• In the [DEFAULT] section, configure RabbitMQ message queue access:
[DEFAULT]
...
transport_url = rabbit://openstack:RABBIT_PASS@controller
Replace RABBIT_PASS with the password you chose for the openstack account in
RabbitMQ.
• In the [DEFAULT] and [keystone_authtoken] sections, configure Identity service access:
[DEFAULT]
...
auth_strategy = keystone
[keystone_authtoken]
...
www_authenticate_uri = http://controller:5000
auth_url = http://controller:5000
memcached_servers = controller:11211
auth_type = password
project_domain_id = default
user_domain_id = default
project_name = service
username = aodh
password = AODH_PASS
Replace AODH_PASS with the password you chose for the aodh user in the Identity service.
• In the [service_credentials] section, configure service credentials:
[service_credentials]
...
auth_type = password
auth_url = http://controller:5000/v3
project_domain_id = default
user_domain_id = default
project_name = service
username = aodh
password = AODH_PASS
interface = internalURL
region_name = RegionOne
Replace AODH_PASS with the password you chose for the aodh user in the Identity service.
3. In order to initialize the database please run the aodh-dbsync script.
TWO
CONTRIBUTOR GUIDE
In the Contributions Guide, you will find documented policies for developing with Aodh. This includes
the processes we use for bugs, contributor onboarding, core reviewer memberships, and other procedural
items.
2.1 Overview
High-Level Architecture
Each of Aodh’s services are designed to scale horizontally. Additional workers and nodes can be added
depending on the expected load. It provides daemons to evaluate and notify based on defined alarming
rules.
Alarming Service
The alarming component of Aodh, first delivered in Ceilometer service during Havana development cycle
then split out to this independent project in Liberty development cycle, allows you to set alarms based on
threshold evaluation for a collection of samples or a dedicate event. An alarm can be set on a single meter,
or on a combination. For example, you may want to trigger an alarm when the memory consumption
reaches 70% on a given instance if the instance has been up for more than 10 min. To setup an alarm,
you will call Aodh’s API server specifying the alarm conditions and an action to take.
Of course, if you are not administrator of the cloud itself, you can only set alarms on meters for your own
components.
There can be multiple form of actions, but only several actions have been implemented so far:
1. HTTP callback: you provide a URL to be called whenever the alarm has been set off. The payload
of the request contains all the details of why the alarm was triggered.
2. log: mostly useful for debugging, stores alarms in a log file.
3. zaqar: Send notification to messaging service via Zaqar API.
17
Aodh Documentation, Release 13.0.0.0rc2.dev2
Alarm Rules
composite
event
gnocchi_aggregation_by_metrics_threshold
gnocchi_aggregation_by_resources_threshold
gnocchi_resources_threshold
loadbalancer_member_health
Alarm Evaluators
composite
gnocchi_aggregation_by_metrics_threshold
gnocchi_aggregation_by_resources_threshold
gnocchi_resources_threshold
loadbalancer_member_health
Alarm Notifiers
http
https
log
test
trust+heat
2.1. Overview 19
Aodh Documentation, Release 13.0.0.0rc2.dev2
trust+http
trust+https
trust+zaqar
zaqar
Zaqar notifier.
This notifier posts alarm notifications either to a Zaqar subscription or to an existing Zaqar queue with a
pre-signed URL.
To create a new subscription in the service project, use a notification URL of the form:
zaqar://?topic=example&subscriber=mailto%3A//test%40example.com&ttl=3600
Multiple subscribers are allowed. ttl is the time to live of the subscription. The queue will be created
automatically, in the service project, with a name based on the topic and the alarm ID.
To use a pre-signed URL for an existing queue, use a notification URL with the scheme zaqar:// and
the pre-signing data from Zaqar in the query string:
zaqar://?queue_name=example&project_id=foo&
paths=/messages&methods=POST&expires=1970-01-01T00:00Z&
signature=abcdefg
Alarm Storage
log
mysql
mysql+pymysql
postgresql
sqlite
V2 Web API
Capabilities
The Capabilities API allows you to directly discover which functions from the V2 API functionality,
including the selectable aggregate functions, are supported by the currently configured storage driver. A
capabilities query returns a flattened dictionary of properties with associated boolean values - a ’False’
or absent value means that the corresponding feature is not available in the backend.
GET /v2/capabilities
Returns a flattened dictionary of API capabilities.
Capabilities supported by the currently configured storage driver.
Return type Capabilities
type Capabilities
A representation of the API and storage capabilities.
Usually constrained by restrictions imposed by the storage driver.
Data samples:
Json
2.1. Overview 21
Aodh Documentation, Release 13.0.0.0rc2.dev2
{
"alarm_storage": {
"storage:production_ready": true
},
"api": {
"alarms:history:query:complex": true,
"alarms:history:query:simple": true,
"alarms:query:complex": true,
"alarms:query:simple": true
}
}
XML
alarm_storage
Type dict(str: bool)
A flattened dictionary of alarm storage capabilities
api
Type dict(str: bool)
A flattened dictionary of API capabilities
Alarms
GET /v2/alarms
Return all alarms, based on the query provided.
Parameters
• q (list(Query)) -- Filter rules for the alarms to be returned.
• sort (list(str)) -- A list of pairs of sort key and sort dir.
• limit (int) -- The maximum number of items to be return.
• marker (str) -- The pagination query marker.
Return type list(Alarm )
POST /v2/alarms
Create a new alarm.
Parameters
{
"alarm_actions": [
"http://site:8000/alarm"
],
"alarm_id": null,
(continues on next page)
2.1. Overview 23
Aodh Documentation, Release 13.0.0.0rc2.dev2
"duration": 10800,
"name": "SampleConstraint",
"start": "0 23 * * *",
"timezone": "Europe/Ljubljana"
}
],
"timestamp": "2015-01-01T12:00:00",
"type": "gnocchi_aggregation_by_metrics_threshold",
"user_id": "c96c887c216949acbdfbd8b494863567"
}
XML
alarm_actions
Type list(str)
The actions to do when alarm state change to alarm
alarm_id
Type str
The UUID of the alarm
property description
The description of the alarm
enabled
Type bool
This alarm is enabled?
evaluate_timestamp
Type datetime
The latest alarm evaluation time
insufficient_data_actions
Type list(str)
The actions to do when alarm state change to insufficient data
name
Type str
The name for the alarm
ok_actions
Type list(str)
The actions to do when alarm state change to ok
project_id
Type str
The ID of the project or tenant that owns the alarm
repeat_actions
Type bool
The actions should be re-triggered on each evaluation cycle
property severity
The severity of the alarm
property state
The state offset the alarm
state_reason
Type str
2.1. Overview 25
Aodh Documentation, Release 13.0.0.0rc2.dev2
{
"comparison_operator": "eq",
"evaluation_periods": 1,
"granularity": 60
}
XML
b'<value>\n <comparison_operator>eq</comparison_operator>\n
,→<evaluation_periods>1</evaluation_periods>\n <granularity>60</
,→granularity>\n</value>'
metric
Type str
The name of the metric
resource_id
Type str
The id of a resource
resource_type
Type str
The resource type
type AggregationMetricByResourcesLookupRule
Data samples:
Json
{
"comparison_operator": "eq",
"evaluation_periods": 1,
"granularity": 60
}
XML
b'<value>\n <comparison_operator>eq</comparison_operator>\n
,→<evaluation_periods>1</evaluation_periods>\n <granularity>60</
,→granularity>\n</value>'
metric
Type str
The name of the metric
query
Type str
The query to filter the metric, Don’t forget to filter out deleted resources (example: {"and":
[{"=": {"ended_at": null}}, ...]}), Otherwise Gnocchi will try to create the aggregate against
obsolete resources
resource_type
Type str
The resource type
type AggregationMetricsByIdLookupRule
Data samples:
Json
{
"comparison_operator": "eq",
"evaluation_periods": 1,
"granularity": 60
}
XML
b'<value>\n <comparison_operator>eq</comparison_operator>\n
,→<evaluation_periods>1</evaluation_periods>\n <granularity>60</
,→granularity>\n</value>'
metrics
Type list(str)
A list of metric Ids
2.1. Overview 27
Aodh Documentation, Release 13.0.0.0rc2.dev2
type AlarmTimeConstraint
Representation of a time constraint on an alarm.
Data samples:
Json
{
"description": "nightly build every night at 23h for 3 hours",
"duration": 10800,
"name": "SampleConstraint",
"start": "0 23 * * *",
"timezone": "Europe/Ljubljana"
}
XML
property description
The description of the constraint
duration
Type integer
How long the constraint should last, in seconds
name
Type str
The name of the constraint
start
Type cron
Start point of the time constraint, in cron format
timezone
Type str
Timezone of the constraint
type AlarmChange
Representation of an event in an alarm’s history.
Data samples:
Json
{
"alarm_id": "e8ff32f772a44a478182c3fe1f7cad6a",
"detail": "{\"threshold\": 42.0, \"evaluation_periods\": 4}",
"on_behalf_of": "92159030020611e3b26dde429e99ee8c",
(continues on next page)
XML
b'<value>\n <alarm_id>e8ff32f772a44a478182c3fe1f7cad6a</alarm_id>\n␣
,→ <type>rule change</type>\n <detail>{"threshold": 42.0,
,→"evaluation_periods": 4}</detail>\n <project_id>
,→b6f16144010811e387e4de429e99ee8c</project_id>\n <user_id>
,→3e5d11fda79448ac99ccefb20be187ca</user_id>\n <on_behalf_of>
,→92159030020611e3b26dde429e99ee8c</on_behalf_of>\n <timestamp>2015-
,→01-01T12:00:00</timestamp>\n</value>'
alarm_id
Type str
The UUID of the alarm
detail
Type str
JSON fragment describing change
event_id
Type str
The UUID of the change event
on_behalf_of
Type str
The tenant on behalf of which the change is being made
project_id
Type str
The project ID of the initiating identity
timestamp
Type datetime
The time/date of the alarm change
type
Type Enum(creation, rule change, state transition, deletion)
The type of change
user_id
Type str
2.1. Overview 29
Aodh Documentation, Release 13.0.0.0rc2.dev2
Filtering Queries
The filter expressions of the query feature operate on the fields of Alarm and AlarmChange. The following
comparison operators are supported: =, !=, <, <=, >, >= and in; and the following logical operators
can be used: and or and not. The field names are validated against the database models.
Complex Query supports defining the list of orderby expressions in the form of [{"field_name": "asc"},
{"field_name2": "desc"}, ...].
The number of the returned items can be bounded using the limit option.
The filter, orderby and limit are all optional fields in a query.
POST /v2/query/alarms
Define query for retrieving Alarm data.
Parameters
• body (ComplexQuery ) -- Query rules for the alarms to be returned.
Return type list(Alarm )
POST /v2/query/alarms/history
Define query for retrieving AlarmChange data.
Parameters
• body (ComplexQuery ) -- Query rules for the alarm history to be returned.
Return type list(AlarmChange)
type ComplexQuery
Holds a sample query encoded in json.
Data samples:
Json
{
"filter": "{\"and\": [{\"and\": [{\"=\": {\"counter_name\": \
,→ "cpu_util\"}}, {\">\": {\"counter_volume\": 0.23}}, {\"<\": {\
,→"counter_volume\": 0.26}}]}, {\"or\": [{\"and\": [{\">\": {\
,→01T18:45:00\"}}]}]}]}",
"limit": 42,
"orderby": "[{\"counter_volume\": \"ASC\"}, {\"timestamp\": \
,→"DESC\"}]"
XML
,→orderby>\n <limit>42</limit>\n</value>'
Aodh Documentation, Release 13.0.0.0rc2.dev2
filter
Type str
The filter expression encoded in json.
limit
Type int
The maximum number of results to be returned.
orderby
Type str
List of single-element dicts for specifing the ordering of the results.
The composite type alarm allows users to specify a composite rule to define an alarm with multiple
triggering conditions, using a combination of and and or relations. A composite rule is composed of
multiple threshold rules or gnocchi rules. A sample composite alarm request form is as follows:
{
"name": "test_composite",
"type": "composite",
"composite_rule": {
"and": [THRESHOLD_RULE1, THRESHOLD_RULE2, {
'or': [THRESHOLD_RULE3, GNOCCHI_RULE1,
GNOCCHI_RULE2, GNOCCHI_RULE3]
}]
}
}
{
"threshold": 0.8,
"meters": [
"f6857d3f-bde6-441a-aa1d-e98fa4ea543f",
"ea1491ca-5309-4b5a-9f05-34409c6e8b6c"
],
"type": "gnocchi_resources_threshold"
}
You can get API version list via request to endpoint root path. For example:
Sample response:
2.1. Overview 31
Aodh Documentation, Release 13.0.0.0rc2.dev2
{
"versions": {
"values": [
{
"id": "v2",
"links": [
{
"href": "http://127.0.0.1:8042/v2",
"rel": "self"
},
{
"href": "https://docs.openstack.org/",
"rel": "describedby",
"type": "text/html"
}
],
"media-types": [
{
"base": "application/json",
"type": "application/vnd.openstack.telemetry-v2+json"
},
{
"base": "application/xml",
"type": "application/vnd.openstack.telemetry-v2+xml"
}
],
"status": "stable",
"updated": "2013-02-13T00:00:00Z"
}
]
}
}
Configuring devstack
1. Download devstack.
2. Create a local.conf file as input to devstack.
Note: local.conf replaces the former configuration file called localrc. If you used localrc
before, remove it to switch to using the new file. For further information see the devstack config-
uration.
3. The aodh services are not enabled by default, so they must be enabled in local.conf before
running stack.sh.
This example local.conf file shows all of the settings required for aodh:
[[local|localrc]]
Installing Manually
Database configuration
You can use any SQLAlchemy-supported DB such as PostgreSQL or MySQL. To use MySQL as the
storage backend, change the ’database’ section in aodh.conf as follows:
[database]
connection = mysql+pymysql://username:password@host/aodh?charset=utf8
Aodh comes with a WSGI application file named aodh/api/app.wsgi for configuring the API service to
run behind Apache with mod_wsgi. This file is installed with the rest of the Aodh application code, and
should not need to be modified.
You can then configure Apache with something like this:
Listen 8042
<VirtualHost *:8042>
WSGIDaemonProcess aodh-api processes=2 threads=10 user=SOMEUSER display-
,→name=%{GROUP}
WSGIProcessGroup aodh-api
WSGIScriptAlias / /usr/lib/python2.7/dist-packages/aodh/api/app
(continues on next page)
WSGISocketPrefix /var/run/httpd
Modify the WSGIDaemonProcess directive to set the user and group values to an appropriate user on
your server. In many installations aodh will be correct.
Aodh comes with a few example files for configuring the API service to run behind Apache with
mod_wsgi.
app.wsgi
The file aodh/api/app.wsgi sets up the V2 API WSGI application. The file is installed with the rest
of the Aodh application code, and should not need to be modified.
[uwsgi]
http = 0.0.0.0:8041
wsgi-file = <path_to_aodh>/aodh/api/app.wsgi
plugins = python
# This is running standalone
master = true
# Set die-on-term & exit-on-reload so that uwsgi shuts down
exit-on-reload = true
die-on-term = true
# uwsgi recommends this to prevent thundering herd on accept.
thunder-lock = true
# Override the default size for headers from the 4k default. (mainly for␣
,→keystone token)
buffer-size = 65535
enable-threads = true
# Set the number of threads usually with the returns of command nproc
threads = 8
# Make sure the client doesn't try to re-use the connection.
add-header = Connection: close
# Set uid and gip to an appropriate user on your server. In many
(continues on next page)
uwsgi ./aodh-uwsgi.ini
uwsgi -d ./aodh-uwsgi.ini
Aodh includes an extensive set of automated unit tests which are run through tox.
1. Install tox:
$ cd /opt/stack/aodh
$ tox -e py27,pep8
As tox is a wrapper around testr, it also accepts the same flags as testr. See the testr documentation
for details about these additional flags.
Use a double hyphen to pass options to testr. For example, to run only tests under
tests/functional/api/v2:
To debug tests (ie. break into pdb debugger), you can use ”debug” tox environment. Here’s an
example, passing the name of a test since you’ll normally only want to run the test that hits your
breakpoint:
For reference, the debug tox environment implements the instructions here: https://wiki.openstack.
org/wiki/Testr#Debugging_.28pdb.29_Tests
4. There is a growing suite of tests which use a tool called gabbi to test and validate the behavior of
the Aodh API. These tests are run when using the usual functional tox target but if desired they
can be run by themselves:
$ tox -e gabbi
The YAML files used to drive the gabbi tests can be found in aodh/tests/functional/gabbi/
gabbits. If you are adding to or adjusting the API you should consider adding tests here.
See also:
• tox
Aodh follows the same workflow as other OpenStack projects. To start contributing to Aodh, please
follow the workflow found here.
Aodh allows users to define alarms which can be evaluated based on events passed from other Open-
Stack services. The events can be emitted when the resources from other OpenStack services have been
updated, created or deleted, such as ’compute.instance.reboot.end’, ’scheduler.select_destinations.end’.
When creating an alarm with type of "event", an event_type can be specified to identify the type of event
that will trigger the alarm. The event_type field support fuzzy matching with wildcard. Additionally,
users can also specify query conditions to filter specific events used to trigger the alarm.
This feature was implemented with proposal event-alarm.
Usage
When creating an alarm of "event" type, the "event_rule" need to be specified, which includes an
"event_type" field and a "query" field, the "event_type" allow users to specify a specific event type used
to match the incoming events when evaluating alarm, and the "query" field includes a list of query con-
ditions used to filter specific events when evaluating the alarm.
The following is an example of event alarm rule:
"event_rule": {
"event_type": "compute.instance.update",
"query" : [
{
"field" : "traits.instance_id",
"type" : "string",
"value" : "153462d0-a9b8-4b5b-8175-9e4b05e9b856",
"op" : "eq",
},
{
"field" : "traits.state",
"type" : "string",
"value" : "error",
"op" : "eq",
},
]
}
Configuration
To enable this functionality, config the Ceilometer to be able to publish events to the queue the aodh-
listener service listen on. The event_alarm_topic config option of Aodh identify which messaging topic
the aodh-listener on, the default value is "alarm.all". In Ceilometer side, a publisher of notifier type need
to be configured in the event pipeline config file(event_pipeline.yaml as default), the notifier should
be with a messaging topic same as the event_alarm_topic option defined. For an example:
---
sources:
- name: event_source
events:
- "*"
sinks:
- event_sink
sinks:
- name: event_sink
transformers:
publishers:
- notifier://
- notifier://?topic=alarm.all
2.3 Appendix
• Liberty
Since Mitaka development cycle, we start to host release notes on: Aodh Release Notes
• genindex
• modindex
• search
THREE
ADMINISTRATION GUIDE
This guide contains information that will help you understand how to deploy, operate, and upgrade Aodh
3.1 Alarms
Alarms provide user-oriented Monitoring-as-a-Service for resources running on OpenStack. This type of
monitoring ensures you can automatically scale in or out a group of instances through the Orchestration
service, but you can also use alarms for general-purpose awareness of your cloud resources’ health.
These alarms follow a tri-state model:
ok The rule governing the alarm has been evaluated as False.
alarm The rule governing the alarm has been evaluated as True.
insufficient data There are not enough datapoints available in the evaluation periods to meaningfully
determine the alarm state.
The definition of an alarm provides the rules that govern when a state transition should occur, and the
actions to be taken thereon. The nature of these rules depend on the alarm type.
39
Aodh Documentation, Release 13.0.0.0rc2.dev2
Composite alarms enable users to define an alarm with multiple triggering conditions, using a combina-
tion of and and or relations.
A key associated concept is the notion of dimensioning which defines the set of matching meters that feed
into an alarm evaluation. Recall that meters are per-resource-instance, so in the simplest case an alarm
might be defined over a particular meter applied to all resources visible to a particular user. More useful
however would be the option to explicitly select which specific resources you are interested in alarming
on.
At one extreme you might have narrowly dimensioned alarms where this selection would have only a
single target (identified by resource ID). At the other extreme, you could have widely dimensioned alarms
where this selection identifies many resources over which the statistic is aggregated. For example all
instances booted from a particular image or all instances with matching user metadata (the latter is how
the Orchestration service identifies autoscaling groups).
Alarms are evaluated by the alarm-evaluator service on a periodic basis, defaulting to once every
minute.
Alarm actions
Any state transition of individual alarm (to ok, alarm, or insufficient data) may have one or more
actions associated with it. These actions effectively send a signal to a consumer that the state transi-
tion has occurred, and provide some additional context. This includes the new and previous states, with
some reason data describing the disposition with respect to the threshold, the number of datapoints in-
volved and most recent of these. State transitions are detected by the alarm-evaluator, whereas the
alarm-notifier effects the actual notification action.
HTTP/HTTPS action These are the de facto notification type used by Telemetry alarming and simply
involve an HTTP(S) POST request being sent to an endpoint, with a request body containing a
description of the state transition encoded as a JSON fragment.
OpenStack Services The user is able to define an alarm that simply trigger some OpenStack ser-
vice by directly specifying the service URL, e.g. trust+http://127.0.0.1:7070/v1/
webhooks/ab91ef39-3e4a-4750-a8b8-0271518cd481/invoke. aodh-notifier will pre-
pare X-Auth-Token header and send HTTP(S) POST request to that URL, containing the alarm
information in the request body.
Heat Autoscaling This notifier works together with loadbalancer_member_health evaluator. Pre-
sumably, 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. How-
ever, this notifier deals with the situation that when some member fails, the Heat stack could be
recovered automatically. More information here
Log actions 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 by admin users.
If none of the above actions satisfy your requirement, you can implement your own alarm actions accord-
ing to the current suppported actions in aodh/notifier folder.
Alarm creation
An example of creating a Gnocchi threshold-oriented alarm, based on an upper bound on the CPU uti-
lization for a particular instance:
This creates an alarm that will fire when the average CPU utilization for an individual instance exceeds
70% for three consecutive 10 minute periods. The notification in this case is simply a log message,
though it could alternatively be a webhook URL.
Note: Alarm names must be unique for the alarms associated with an individual project. Administrator
can limit the maximum resulting actions for three different states, and the ability for a normal user to
create log:// and test:// notifiers is disabled. This prevents unintentional consumption of disk and
memory resources by the Telemetry service.
The sliding time window over which the alarm is evaluated is 30 minutes in this example. This window
is not clamped to wall-clock time boundaries, rather it’s anchored on the current time for each evaluation
cycle, and continually creeps forward as each evaluation cycle rolls around (by default, this occurs every
minute).
Note: The alarm granularity must match the granularities of the metric configured in Gnocchi.
Otherwise the alarm will tend to flit in and out of the insufficient data state due to the mismatch
between the actual frequency of datapoints in the metering store and the statistics queries used to compare
against the alarm threshold. If a shorter alarm period is needed, then the corresponding interval should
be adjusted in the pipeline.yaml file.
3.1. Alarms 41
Aodh Documentation, Release 13.0.0.0rc2.dev2
Other notable alarm attributes that may be set on creation, or via a subsequent update, include:
state The initial alarm state (defaults to insufficient data).
description A free-text description of the alarm (defaults to a synopsis of the alarm rule).
enabled True if evaluation and actioning is to be enabled for this alarm (defaults to True).
repeat-actions True if actions should be repeatedly notified while the alarm remains in the target state
(defaults to False).
ok-action An action to invoke when the alarm state transitions to ok.
insufficient-data-action An action to invoke when the alarm state transitions to insufficient data.
time-constraint Used to restrict evaluation of the alarm to certain times of the day or days of the week
(expressed as cron expression with an optional timezone).
Composite alarm
An example of creating a composite alarm, based on the composite of two basic rules:
This creates an alarm that will fire when either of two basic rules meets the condition. The notification
in this case is a webhook call. Any number of basic rules can be composed into a composite rule this
way, using either and or or. Additionally, composite rules can contain nested conditions:
Note: Observe the underscore in resource_id & resource_type in composite rule as opposed to
--resource-id & --resource-type CLI arguments.
Valid list of event-type and traits can be found in event_definitions.yaml file . --query may
also contain mix of traits for example to create alarm when instance is powered on but went into error
state:
--alarm-action 'log://' \
--ok-action 'log://' \
--insufficient-data-action 'log://'
+---------------------------+-------------------------------------------------
,→--------------+
| Field | Value ␣
,→ |
+---------------------------+-------------------------------------------------
,→--------------+
| alarm_actions | [u'log://'] ␣
,→ |
| alarm_id | 15c0da26-524d-40ad-8fba-3e55ee0ddc91 ␣
,→ |
| description | Instance powered ON but in error state ␣
,→ |
| enabled | True ␣
,→ |
| event_type | compute.instance.power_on.* ␣
,→ |
| insufficient_data_actions | [u'log://'] ␣
,→ |
(continues on next page)
3.1. Alarms 43
Aodh Documentation, Release 13.0.0.0rc2.dev2
| | traits.state = error ␣
,→ |
| repeat_actions | False ␣
,→ |
| severity | low ␣
,→ |
| state | insufficient data ␣
,→ |
| state_timestamp | 2017-07-15T02:28:31.114455 ␣
,→ |
| time_constraints | [] ␣
,→ |
| timestamp | 2017-07-15T02:28:31.114455 ␣
,→ |
| type | event ␣
,→ |
| user_id | 89b4e48bcbdb4816add7800502bd5122 ␣
,→ |
+---------------------------+-------------------------------------------------
,→--------------+
Alarm retrieval
You can display all your alarms via (some attributes are omitted for brevity):
In this case, the state is reported as insufficient data which could indicate that:
• meters have not yet been gathered about this instance over the evaluation window into the recent
past (for example a brand-new instance)
• or, that the identified instance is not visible to the user/project owning the alarm
• or, simply that an alarm evaluation cycle hasn’t kicked off since the alarm was created (by default,
alarms are evaluated once per minute).
Note: The visibility of alarms depends on the role and project associated with the user issuing the query:
• admin users see all alarms, regardless of the owner
• non-admin users see only the alarms associated with their project (as per the normal project seg-
regation in OpenStack)
Alarm update
Once the state of the alarm has settled down, we might decide that we set that bar too low with 70%, in
which case the threshold (or most any other alarm attribute) can be updated thusly:
The change will take effect from the next evaluation cycle, which by default occurs every minute.
Most alarm attributes can be changed in this way, but there is also a convenient short-cut for getting and
setting the alarm state:
Over time the state of the alarm may change often, especially if the threshold is chosen to be close to the
trending value of the statistic. You can follow the history of an alarm over its lifecycle via the audit API:
3.1. Alarms 45
Aodh Documentation, Release 13.0.0.0rc2.dev2
Alarm deletion
An alarm that is no longer required can be disabled so that it is no longer actively evaluated:
Debug alarms
A good place to start is to add --debug flag when creating or updating an alarm. For example:
,→40b4-a3cb-26022a919f5e,event_type=compute.instance.power_off.start> hits␣
,→40b4-a3cb-26022a919f5e,event_type=compute.instance.power_off.start> hits␣
,→-----------------+--------------------------------------+
,→-----------------+--------------------------------------+
,→\"bb912729-fa51 | |
| | | -443b-bac6-bf4c795f081d\"}]>
,→.", "state": "alarm"} ␣
,→ | |
| 2017-07-15T01:31:14.516188 | creation | {"alarm_actions": ["log://
,→"], "user_id": "89b4e48bcbdb4816add7800502bd5122", "name": "instance_off",
,→"state": | fb31f4c2-e357-44c3-9b6a-bd2aaaa4ae68 |
(continues on next page)
3.1. Alarms 47
Aodh Documentation, Release 13.0.0.0rc2.dev2
,→id", "type": | |
| | | "string", "value":
,→"bb912729-fa51-443b-bac6-bf4c795f081d", "op": "eq"}], "event_type":
,→"compute.instance.power_off.*"}, | |
| | | "alarm_id": "85a2942f-a2ec-
,→4310-baea-d58f9db98654", "time_constraints": [], "insufficient_data_actions
,→": ["log://"], | |
| | | "repeat_actions": false,
,→"ok_actions": ["log://"], "project_id": "9ee200732f4c4d10a6530bac746f1b6e",
,→"type": "event", | |
| | | "severity": "low"} ␣
,→ ␣
,→ | |
+----------------------------+------------------+-----------------------------
,→----------------------------------------------------------------------------
,→-----------------+--------------------------------------+
The amount of resources(e.g. alarms) that could be created by each OpenStack project is controlled by
quota. The default resource quota for each project is set in Aodh config file as follows unless changed by
the cloud administrator via Quota API.
[api]
user_alarm_quota = -1
project_alarm_quota = -1
alarm_max_actions = -1
user_alarm_quota The default alarm quota for an openstack user, default is unlimited. Sometimes the
alarm creation request satisfies the project quota but fails the user quota.
project_alarm_quota The default alarm quota for an openstack project, default is unlimited. The cloud
administrator can change project quota using Quota API, see examples below.
alarm_max_actions The maximum number of alarm actions could be created per alarm, default is un-
limited.
Aodh Quota API is aiming for multi-tenancy support. By default, only the admin user is able to change
the resource quota for projects as defined by the default policy rule ’telemetry:update_quotas’. User alarm
quota and alarm action quota are not supported in Quota API.
An HTTP request example using httpie command:
FOUR
CONFIGURATION GUIDE
aodh-config-generator
record_history
Type boolean
Default True
Record alarm change events.
event_alarm_cache_ttl
Type integer
Default 60
TTL of event alarm caches, in seconds. Set to 0 to disable caching.
additional_ingestion_lag
Type integer
Default 0
Minimum Value 0
The number of seconds to extend the evaluation windows to compensate the reporting/ingestion
lag.
member_creation_time
Type integer
Default 120
51
Aodh Documentation, Release 13.0.0.0rc2.dev2
The time in seconds to wait for the load balancer member creation.
rest_notifier_certificate_file
Type string
Default ''
SSL Client certificate file for REST notifier.
rest_notifier_certificate_key
Type string
Default ''
SSL Client private key file for REST notifier.
rest_notifier_ca_bundle_certificate_path
Type string
Default <None>
SSL CA_BUNDLE certificate for REST notifier
rest_notifier_ssl_verify
Type boolean
Default True
Whether to verify the SSL Server certificate when calling alarm action.
rest_notifier_max_retries
Type integer
Default 0
Number of retries for REST notifier
notifier_topic
Type string
Default alarming
The topic that aodh uses for alarm notifier messages.
http_timeout
Type integer
Default 600
Timeout seconds for HTTP requests. Set it to None to disable timeout.
evaluation_interval
Type integer
Default 60
Period of evaluation cycle, should be >= than configured pipeline interval for collection of under-
lying meters.
paste_config
Type string
Default /home/zuul/src/opendev.org/openstack/aodh/aodh/api/
api-paste.ini
Configuration file for WSGI definition of API.
auth_mode
Type string
Default keystone
Authentication mode to use. Unset to disable authentication
gnocchi_external_project_owner
Type string
Default service
Project name of resources creator in Gnocchi. (For example the Ceilometer project name
gnocchi_external_domain_name
Type string
Default Default
Domain name of resources creator in Gnocchi. (For example, default or service_domain
user_alarm_quota
Type integer
Default -1
Maximum number of alarms defined for a user.
project_alarm_quota
Type integer
Default -1
Maximum number of alarms defined for a project.
alarm_max_actions
Type integer
Default -1
Maximum count of actions for each state of an alarm, non-positive number means no limit.
backend_url
Type string
Default <None>
The backend URL to use for distributed coordination. If left empty, alarm evaluation won’t do
workload partitioning and will only function correctly if a single instance of the service is running.
heartbeat
Type floating point
Default 1.0
Number of seconds between heartbeats for distributed coordination.
check_watchers
Type floating point
Default 10.0
Number of seconds between checks to see if group membership has changed
Warning: This option is deprecated for removal. Its value may be silently ignored in the
future.
Reason This parameter is no longer used.
retry_backoff
Type integer
Default 1
Retry backoff factor when retrying to connect with coordination backend
max_retry_interval
Type integer
Default 30
Maximum number of seconds between retry to join partitioning group
alarm_history_time_to_live
Type integer
Default -1
Number of seconds that alarm histories are kept in the database for (<= 0 means forever).
alarm_histories_delete_batch_size
Type integer
Default 0
Minimum Value 0
Number of alarm histories to be deleted in one iteration from the database (0 means all).
workers
Type integer
Default 1
Minimum Value 1
Number of workers for evaluator service. default value is 1.
workers
Type integer
Default 1
Minimum Value 1
Number of workers for listener service. default value is 1.
event_alarm_topic
Type string
Default alarm.all
The topic that aodh uses for event alarm evaluation.
batch_size
Type integer
Default 1
Number of notification messages to wait before dispatching them.
batch_timeout
Type integer
Default <None>
Number of seconds to wait before dispatching samples when batch_size is not reached (None means
indefinitely).
batch_size
Type integer
Default 1
Number of notification messages to wait before dispatching them.
batch_timeout
Type integer
Default <None>
Number of seconds to wait before dispatching samples when batch_size is not reached (None means
indefinitely).
workers
Type integer
Default 1
Minimum Value 1
Number of workers for notifier service. default value is 1.
region_name
Type string
Default <None>
Region name to use for OpenStack service endpoints.
interface
Type string
Default public
Valid Values public, internal, admin, auth, publicURL, internalURL, adminURL
Type of endpoint in Identity service catalog to use for communication with OpenStack services.
zaqar
Type string
Default messaging
Message queue service type.
Warning: JSON formatted policy file is deprecated since Aodh 12.0.0 (Wallaby). This oslopolicy-
convert-json-to-yaml tool will migrate your existing JSON-formatted policy file to YAML in a
backward-compatible way.
The following is an overview of all available policies in Aodh. For a sample configuration file, refer to
policy.yaml.
4.3.1 aodh
context_is_admin
Default role:admin
(no description provided)
segregation
Default rule:context_is_admin
(no description provided)
admin_or_owner
Default rule:context_is_admin or project_id:%(project_id)s
(no description provided)
default
Default rule:context_is_admin or project_id:%(project_id)s
telemetry:delete_quotas
Default role:admin and system_scope:all
Operations
• DELETE /v2/quotas/{project_id}
Scope Types
• system
Delete resources quotas for project.
4.4 policy.yaml
Warning: JSON formatted policy file is deprecated since Aodh 12.0.0 (Wallaby). This oslopolicy-
convert-json-to-yaml tool will migrate your existing JSON-formatted policy file to YAML in a
backward-compatible way.
Use the policy.yaml file to define additional access controls that will be applied to Aodh:
#"context_is_admin": "role:admin"
#"segregation": "rule:context_is_admin"
# Get an alarm.
# GET /v2/alarms/{alarm_id}
# Intended scope(s): system, project
#"telemetry:get_alarm": "(role:reader and system_scope:all) or (role:reader␣
,→and project_id:%(project_id)s)"
# DEPRECATED
# "telemetry:get_alarm":"rule:context_is_admin or
# project_id:%(project_id)s" has been deprecated since W in favor of
# "telemetry:get_alarm":"(role:reader and system_scope:all) or
# (role:reader and project_id:%(project_id)s)".
# The alarm and quota APIs now support system-scope and default roles.
# DEPRECATED
# "telemetry:get_alarms":"rule:context_is_admin or
(continues on next page)
4.4. policy.yaml 61
Aodh Documentation, Release 13.0.0.0rc2.dev2
# DEPRECATED
# "telemetry:get_alarms:all_projects":"rule:context_is_admin" has been
# deprecated since W in favor of
# "telemetry:get_alarms:all_projects":"role:reader and
# system_scope:all".
# The alarm and quota APIs now support system-scope and default roles.
# DEPRECATED
# "telemetry:query_alarm":"rule:context_is_admin or
# project_id:%(project_id)s" has been deprecated since W in favor of
# "telemetry:query_alarm":"(role:reader and system_scope:all) or
# (role:reader and project_id:%(project_id)s)".
# The alarm and quota APIs now support system-scope and default roles.
# DEPRECATED
# "telemetry:create_alarm":"" has been deprecated since W in favor of
# "telemetry:create_alarm":"(role:admin and system_scope:all) or
# (role:member and project_id:%(project_id)s)".
# The alarm and quota APIs now support system-scope and default roles.
# DEPRECATED
(continues on next page)
# DEPRECATED
# "telemetry:delete_alarm":"rule:context_is_admin or
# project_id:%(project_id)s" has been deprecated since W in favor of
# "telemetry:delete_alarm":"(role:admin and system_scope:all) or
# (role:member and project_id:%(project_id)s)".
# The alarm and quota APIs now support system-scope and default roles.
# DEPRECATED
# "telemetry:get_alarm_state":"rule:context_is_admin or
# project_id:%(project_id)s" has been deprecated since W in favor of
# "telemetry:get_alarm_state":"(role:reader and system_scope:all) or
# (role:reader and project_id:%(project_id)s)".
# The alarm and quota APIs now support system-scope and default roles.
# DEPRECATED
# "telemetry:change_alarm_state":"rule:context_is_admin or
# project_id:%(project_id)s" has been deprecated since W in favor of
# "telemetry:change_alarm_state":"(role:admin and system_scope:all) or
# (role:member and project_id:%(project_id)s)".
# The alarm and quota APIs now support system-scope and default roles.
4.4. policy.yaml 63
Aodh Documentation, Release 13.0.0.0rc2.dev2
# DEPRECATED
# "telemetry:alarm_history":"rule:context_is_admin or
# project_id:%(project_id)s" has been deprecated since W in favor of
# "telemetry:alarm_history":"(role:reader and system_scope:all) or
# (role:reader and project_id:%(project_id)s)".
# The alarm and quota APIs now support system-scope and default roles.
# DEPRECATED
# "telemetry:query_alarm_history":"rule:context_is_admin or
# project_id:%(project_id)s" has been deprecated since W in favor of
# "telemetry:query_alarm_history":"(role:reader and system_scope:all)
# or (role:reader and project_id:%(project_id)s)".
# The alarm and quota APIs now support system-scope and default roles.
# DEPRECATED
# "telemetry:update_quotas":"rule:context_is_admin" has been
# deprecated since W in favor of "telemetry:update_quotas":"role:admin
# and system_scope:all".
# The alarm and quota APIs now support system-scope and default roles.
# DEPRECATED
# "telemetry:delete_quotas":"rule:context_is_admin" has been
# deprecated since W in favor of "telemetry:delete_quotas":"role:admin
# and system_scope:all".
# The alarm and quota APIs now support system-scope and default roles.
FIVE
In this section you will find information on Aodhs command line interface.
5.1 aodh-status
Synopsis
Description
aodh-status is a tool that provides routines for checking the status of a Aodh deployment.
Options
aodh-status
Categories are:
• upgrade
Detailed descriptions are below:
You can also run with a category argument such as upgrade to see a list of all commands in that category:
aodh-status upgrade
These sections describe the available categories and arguments for aodh-status.
65
Aodh Documentation, Release 13.0.0.0rc2.dev2
Upgrade
aodh-status upgrade check Performs a release-specific readiness check before restarting services
with new code. For example, missing or changed configuration options, incompatible object states,
or other conditions that could lead to failures while upgrading.
Return Codes
History of Checks
8.0.0 (Stein)
• Sample check to be filled in with checks as they are added in Stein.
SIX
GLOSSARY
67