OpenStack Mitaka Ceilometer-Aodh

最近公司从Kilo升级到Mitaka,发现ceilometer组件变了很多。原先的ceilometer-alarm组件全部被砍掉,由aodh来代替。

今天对aodh进行了部署,没想到竟然不像之前存mongodb而是存进了mysql,具体步骤如下:

#aodh config


aodh_DB_PWD=openstack


mysql -uroot -pvscloud < drop database if exists aodh;
create database aodh;
grant all privileges on aodh.* to "aodh"@"localhost" identified by "$aodh_DB_PWD";
grant all privileges on aodh.* to "aodh"@"%" identified by "$aodh_DB_PWD";
flush privileges;
EOF


source ~/admin_rc


openstack user create --domain default --project service --password openstack 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




yum -y install openstack-aodh-api \
openstack-aodh-evaluator openstack-aodh-notifier \
openstack-aodh-listener openstack-aodh-expirer \
python-ceilometerclient


sed -i -E -e '/^#.*?$/d' -e '/^$/d'  /etc/aodh/aodh.conf


/etc/aodh/aodh.conf
[DEFAULT]
rpc_backend = rabbit
auth_strategy = keystone
[alarm]
[api]
[coordination]
[database]
connection = mysql+pymysql://aodh:openstack@controller/aodh
[keystone_authtoken]
memcached_servers = controller:11211
auth_uri = http://controller:5000
auth_url = http://controller:35357
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = aodh
password = openstack
[matchmaker_redis]
[matchmaker_ring]
[oslo_messaging_amqp]
[oslo_messaging_qpid]
[oslo_messaging_rabbit]
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = openstack
[oslo_policy]
[service_credentials]
os_auth_url = http://controller:5000/v3
os_username = aodh
os_tenant_name = service
os_password = openstack
interface = internalURL
region_name = RegionOne


最後編輯/etc/aodh/api_paste.ini,在[filter:authtoken]修改以下內容:
[filter:authtoken]
...
oslo_config_project = aodh


aodh-dbsync




systemctl enable openstack-aodh-evaluator.service \
openstack-aodh-notifier.service \
openstack-aodh-listener.service


systemctl enable openstack-aodh-api.service 


之后就可以创建告警了


你可能感兴趣的:(openstack)