Ceilometer項(xiàng)目創(chuàng)建時(shí)最初的目的是實(shí)現(xiàn)一個(gè)能為計(jì)費(fèi)系統(tǒng)采集數(shù)據(jù)的框架。在G版的開發(fā)中,社區(qū)已經(jīng)更新了他們的目標(biāo),新目標(biāo)是希望Ceilometer成為OpenStack里數(shù)據(jù)采集(監(jiān)控?cái)?shù)據(jù)、計(jì)費(fèi)數(shù)據(jù))的唯一基礎(chǔ)設(shè)施,采集到的數(shù)據(jù)提供給監(jiān)控、計(jì)費(fèi)、面板等項(xiàng)目使用。
Project Goal
For Grizzly, the new objective is The project aims to become the infrastructure to collect measurements within OpenStack so that no two agents would need to be written to collect the same data. It's primary targets are monitoring and metering, but the framework should be easily expandable to collect for other needs. To that effect, Ceilometer should be able to share collected data with a variety of consumers .
In the 0.1 (folsom) release its goal was just to deliver a unique point of contact for billing systems to aquire all meters they need to establish customer billing, across all current and future OpenStack core components.
Wiki地址
:
https://wiki.openstack.org/wiki/Ceilometer
代碼地址
:
https://github.com/openstack/ceilometer
文檔地址
:
http://docs.openstack.org/developer/ceilometer/
社區(qū)現(xiàn)狀
目前Ceilometer項(xiàng)目有11000+ lines代碼,16位貢獻(xiàn)者,最近的活躍貢獻(xiàn)者有7位。社區(qū)的Roadmap如下:
- v1 delivered with Folsom with all functions required to collect base metering info and provide standard API access
-
v2 delivered with G as an incubated project with (subject to variation)
End-User API access to own metering information
Integration of information summary as an Horizon plugin
New agents for other OpenStack components (Quantum Engines? Heat? etc...)
Multi publisher to handle other usage for data collection
Individual frequency per meter - Move to core for H
Ceilometer架構(gòu)介紹
Ceilometer項(xiàng)目主要由Agent,Collector,DataStore,API和消息隊(duì)列組成。
Agent
Agent的主要職責(zé)是周期性的從它管理的Plugin中輪詢,觸發(fā)查詢,Plugin中有具體獲取數(shù)據(jù)的邏輯。Ceilometer中的Agent分為Central Agent和Compute Agent。
Central Agent負(fù)責(zé)管理除了Compute(Nova)之外所有的Plugin,例如Swift,Cinder的Plugin。這些Plugin通過(guò)RPC調(diào)用相關(guān)服務(wù)的API并獲取數(shù)據(jù),然后將數(shù)據(jù)publish到Message Queue。Central Agent作為一個(gè)中心的數(shù)據(jù)采集調(diào)度器,之需要部署一個(gè)即可。
Compute Agent負(fù)責(zé)Compute節(jié)點(diǎn)的數(shù)據(jù)采集,在每一個(gè)Compute節(jié)點(diǎn)都需要部署一個(gè)Compute Agent。它一方主要負(fù)責(zé)周期性的采集Compute相關(guān)的數(shù)據(jù)并發(fā)布到MQ。
目前所規(guī)劃的監(jiān)控指標(biāo):
http://docs.openstack.org/developer/ceilometer/measurements.html
Plugin
Ceilometer實(shí)現(xiàn)的Plugin框架依賴setuptools的
Dynamic Discovery of Services and Plugins
實(shí)現(xiàn)。這是Ceilometer能進(jìn)行擴(kuò)展的基礎(chǔ)。Ceilometer中有四種類型的Plugin:Poller,Publisher,Notification和Transformer。
- Poller主要負(fù)責(zé)被Agent調(diào)用去查詢數(shù)據(jù),返回Counter類型的結(jié)果給Agent框架;
- Notification負(fù)責(zé)在MQ中監(jiān)聽相關(guān)topic的消息(虛擬機(jī)創(chuàng)建等),并把他轉(zhuǎn)換成Counter類型的結(jié)果給Agent框架。
- Transformer負(fù)責(zé)轉(zhuǎn)換Counter(目前在代碼中還沒有發(fā)現(xiàn)具體用li)
- Publisher負(fù)責(zé)將Agent框架中Counter類型的結(jié)果轉(zhuǎn)換成消息(包括簽名),并將消息發(fā)送到MQ;
Agent的Pipeline定義了這些插件之間的數(shù)據(jù)流。Agent的Plugin框架就向一個(gè)流水線,每個(gè)Plugin就像流水線上的工人。
Collector
Collector負(fù)責(zé)監(jiān)聽消息隊(duì)列,將Publisher發(fā)布的消息(Meter Message)存儲(chǔ)到DataStore。
DataStore
由MongoDB實(shí)現(xiàn)。
API
負(fù)責(zé)為其它項(xiàng)目提供數(shù)據(jù),例如計(jì)費(fèi)、面板等。
總結(jié)
Ceilometer和Kanyun很像(kanyun我只聽過(guò)幾次分享),能滿足計(jì)費(fèi)數(shù)據(jù)的采集的需求。從架構(gòu)上來(lái)看,他的擴(kuò)展性很強(qiáng),實(shí)現(xiàn)方式也很優(yōu)美。
更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主
微信掃碼或搜索:z360901061

微信掃一掃加我為好友
QQ號(hào)聯(lián)系: 360901061
您的支持是博主寫作最大的動(dòng)力,如果您喜歡我的文章,感覺我的文章對(duì)您有幫助,請(qǐng)用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點(diǎn)擊下面給點(diǎn)支持吧,站長(zhǎng)非常感激您!手機(jī)微信長(zhǎng)按不能支付解決辦法:請(qǐng)將微信支付二維碼保存到相冊(cè),切換到微信,然后點(diǎn)擊微信右上角掃一掃功能,選擇支付二維碼完成支付。
【本文對(duì)您有幫助就好】元
