OpenStack Aodh
上一篇有提到如何收集資料,但其實真的這樣就好了嗎?
當事件來的時候該要做出相對應的回應,那這就是今天的主角了
胎會接收資料而做出警告
1.登入資料庫
sudo mysql -u root -p
2.建立資料庫
CREATE DATABASE aodh;
3.安全性設定
GRANT ALL PRIVILEGES ON aodh.* TO 'aodh'@'localhost' IDENTIFIED BY 'AODH資料庫密碼';
GRANT ALL PRIVILEGES ON aodh.* TO 'aodh'@'%' IDENTIFIED BY 'AODH資料庫密碼';
1.登入admin管理員指令模式
2.建立使用者
openstack user create --domain default --password-prompt aodh
3.將使用者加入管理群組
openstack role add --project service --user aodh admin
4.建立服務
openstack service create --name aodh --description "Telemetry" alarming
5.建立API
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
1.安裝套件
sudo apt-get install aodh-api aodh-evaluator aodh-notifier \
aodh-listener aodh-expirer python-aodhclient -y
2.編輯aodh.conf設定檔
sudo vim /etc/aodh/aodh.conf
[DEFAULT]
#訊息服務
transport_url = rabbit://openstack:RABBIT密碼@controller
#認證模式
auth_strategy = keystone
[database]
connection = mysql+pymysql://aodh:AODH資料庫密碼@controller/aodh
[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = aodh
password = AODH密碼
[service_credentials]
auth_type = password
auth_url = http://controller:5000/v3
project_domain_name = default
user_domain_name = default
project_name = service
username = aodh
password = AODH密碼
interface = internalURL
region_name = RegionOne
3.編輯api_paste.ini設定檔
sudo vim /etc/aodh/api_paste.ini
[filter:authtoken]
oslo_config_project = aodh
4.重啟服務
sudo service aodh-api restart
sudo service aodh-evaluator restart
sudo service aodh-notifier restart
sudo service aodh-listener restart
大家可以自行試試看這樣的服務帶給大家的方便程度喔喔
希望大家可以在這一個月中讀到非常多的應用技巧,那如果有問題可以以私訊我的方式是使用問題回復,我會盡可能地回答問題,那會在後面統一做回覆,或者如果有想知道的相關的應用也可以提出討論喔。