提供 API 以及客戶端指令,去收集系統上的資料,用於客戶帳單、系統監視或是警告!
遙測技術(telemetry)服務由下列幾個元件組成:
- ceilometer-agent-compute : 運作於每一個計算節點上,做資源使用的統計調查
- ceilometer-agent-central : 運作於中央管理主機上,做非計算節點或實體的資源統計資料調查!
- ceilometer-collector : 運作於一個或多個中央管理主機上,監控訊息佇列!通知訊息將會被處理成遙測技術訊息,並且被儲存起來!
- Mongo database : 收集儲存樣品資料
- API Server: 運作於一個或多個中央管理主機,用來提供存取已收集的資料!
Ceilometer 的基本觀念
Ceilometer 與監測不同的地方
已加入 Ceilometer 的 OpenStack 元件
- Nova
- Neutron
- Glance
- Cinder
- Swift
- 累積式(Cumulative)
- 標準式(Gauge):用於浮動式IP、影像上傳、硬碟I/O等
- 時變式(Delta)
- # source /root/keystonerc_admin
- # yum list installed "ceilometer" mongodb-server mongodb
- # cat /etc/mongodb.conf
- # systemctl status mongod
- # grep 10.1.1.1 /etc/ceilometer/ceilometer.conf
- # keystone user-get ceilometer
- # keystone tenant-get services
- # keystone service-get ceilometer
- # keystone catalog --service metering
- # keystone user-role-list --user ceilometer --tenant services
- # openstack-service restart ceilometer
- # systemctl status openstack-ceilometer-alarm-evaluator.service
- # systemctl status openstack-ceilometer-alarm-notifier.service
- # systemctl status openstack-ceilometer-api.service
- # systemctl status openstack-ceilometer-central.service
- # systemctl status openstack-ceilometer-collector.service
- # systemctl status openstack-ceilometer-compute.service
- # systemctl status openstack-ceilometer-notification.service
ceilometer 指令來自於 python-ceilometerclient RPM套件!
常用指令:
- ceilometer meter-list
- ceilometer sample-list -m image
- ceilometer statistics -m image
- # source /root/keystonerc_admin
- # glance image-create --name ceilometertest --is-public True --disk-format qcow2 --container-format bare --copy-from http://demo.example.com/pub/small.img
- # ceilometer meter-list
- # ceilometer meter-list | grep image
- # ceilometer sample-list -m image
- # ceilometer alarm-threshold-create --name monitor-image --description 'monitor image' --meter-name image.update --threshold 1 --comparison-operator ge --statistic count --period 60 --evaluation-period 1 --alarm-action 'log://'
- # ceilometer alarm-list
- # glance image-update --name ceilometer ceilometertest
- # sleep 1m && ceilometer alarm-list
- # ceilometer alarm-history <上項指出現的ID值>
練習3: