下列操做在控制節點上進行:python
在配置OpenStack Telemetry服務以前,你必須建立數據庫、服務憑證和API端點。mysql
以root用戶鏈接數據庫服務器,建立glance數據庫,並賦予適當的權限:sql
$ mysql -u root -p MariaDB [(none)]> CREATE DATABASE aodh; MariaDB [(none)]> GRANT ALL PRIVILEGES ON aodh.* TO 'aodh'@'controller3' \ IDENTIFIED BY 'pass123456'; MariaDB [(none)]> GRANT ALL PRIVILEGES ON aodh.* TO 'aodh'@'%' \ IDENTIFIED BY 'pass123456'; MariaDB [(none)]> exit
建立aodh
服務實體:數據庫
$ . admin-openrc $ openstack user create --domain default \ --password-prompt aodh User Password: Repeat User Password: $ openstack role add --project service --user aodh admin $ openstack service create --name aodh \ --description "Telemetry" alarming
建立網絡服務API端點:api
$ openstack endpoint create --region RegionOne \ alarming public http://controller3:8042 $ openstack endpoint create --region RegionOne \ alarming internal http://controller3:8042 $ openstack endpoint create --region RegionOne \ alarming admin http://controller3:8042
# yum install -y openstack-aodh-api \ openstack-aodh-evaluator openstack-aodh-notifier \ openstack-aodh-listener openstack-aodh-expirer \ python-aodhclient
編輯配置文件/etc/aodh/aodh.conf
:bash
[DEFAULT] ... transport_url = rabbit://openstack:pass123456@controller3 auth_strategy = keystone [database] ... connection = mysql+pymysql://aodh:pass123456@controller3/aodh [keystone_authtoken] ... auth_uri = http://controller3:5000 auth_url = http://controller3:35357 memcached_servers = controller3:11211 auth_type = password project_domain_name = default user_domain_name = default project_name = service username = aodh password = pass123456 [service_credentials] ... auth_type = password auth_url = http://controller3:5000/v3 project_domain_name = default user_domain_name = default project_name = service username = aodh password = pass123456 interface = internalURL region_name = RegionOne
aodh-dbsync
啓動Telemetry Alarming服務,並配置隨系統啓動:服務器
# systemctl enable openstack-aodh-api.service \ openstack-aodh-evaluator.service \ openstack-aodh-notifier.service \ openstack-aodh-listener.service # systemctl start openstack-aodh-api.service \ openstack-aodh-evaluator.service \ openstack-aodh-notifier.service \ openstack-aodh-listener.service