安装Aodh
Aodh是提供监控告警的服务。请在控制节点安装Aodh。
- 创建数据库。
- 以root用户登录数据库。
mysql -u root -p
- 在数据库中,创建Aodh数据库并授权。
CREATE DATABASE aodh; GRANT ALL PRIVILEGES ON aodh.* TO 'aodh'@'localhost' IDENTIFIED BY 'AODH_DBPASS'; GRANT ALL PRIVILEGES ON aodh.* TO 'aodh'@'%' IDENTIFIED BY 'AODH_DBPASS';
将AODH_DBPASS替换为aodh数据库用户的密码,请根据实际情况进行设置。密码中请勿包含字符“#@$”,支持特殊字符“&=- _ . + ! * ()”
- 退出数据库。
exit
- 以root用户登录数据库。
- 创建对应Keystone资源对象。
openstack user create --domain default --password-prompt aodh openstack role add --project service --user aodh admin openstack service create --name aodh --description "Telemetry" alarming openstack endpoint create --region RegionOne alarming public http://controller:8042 openstack endpoint create --region RegionOne alarming internal http://controller:8042 openstack endpoint create --region RegionOne alarming admin http://controller:8042
密码中请勿包含字符“#@$”,支持特殊字符“&=- _ . + ! * ()”
- 安装Aodh。
yum install openstack-aodh-api openstack-aodh-evaluator openstack-aodh-notifier openstack-aodh-listener openstack-aodh-expirer python3-aodhclient
- 修改配置文件。
- 打开文件。
vi /etc/aodh/aodh.conf
- 按“i”进入编辑模式,修改如下内容。
[database] connection = mysql+pymysql://aodh:AODH_DBPASS@controller/aodh [DEFAULT] transport_url = rabbit://openstack:RABBIT_PASSWORD@controller 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_PASSWORD [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_PASSWORD interface = internalURL region_name = RegionOne
将AODH_DBPASS替换为Aodh数据库密码,将RABBIT_PASSWORD替换为OpenStack RABBITMQ密码,将AODH_PASSWORD替换为Aodh用户密码,请根据实际需求进行设置。密码中请勿包含字符“#@$”,支持特殊字符“&=- _ . + ! * ()”。
- 按“Esc”键退出编辑模式,输入:wq!,按“Enter”键保存并退出文件。
- 打开文件。
- 初始化数据库。
aodh-dbsync
- 启动Aodh服务。
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
父主题: 部署并验证