OpenStack Ceilometer簡介


Ceilometer項目創建時最初的目的是實現一個能為計費系統采集數據的框架。在G版的開發中,社區已經更新了他們的目標,新目標是希望Ceilometer成為OpenStack里數據采集(監控數據、計費數據)的唯一基礎設施,采集到的數據提供給監控、計費、面板等項目使用。

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/

社區現狀

目前Ceilometer項目有11000+ lines代碼,16位貢獻者,最近的活躍貢獻者有7位。社區的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架構介紹

Ceilometer項目主要由Agent,Collector,DataStore,API和消息隊列組成。

Agent

Agent的主要職責是周期性的從它管理的Plugin中輪詢,觸發查詢,Plugin中有具體獲取數據的邏輯。Ceilometer中的Agent分為Central Agent和Compute Agent。
Central Agent負責管理除了Compute(Nova)之外所有的Plugin,例如Swift,Cinder的Plugin。這些Plugin通過RPC調用相關服務的API並獲取數據,然后將數據publish到Message Queue。Central Agent作為一個中心的數據采集調度器,之需要部署一個即可。
Compute Agent負責Compute節點的數據采集,在每一個Compute節點都需要部署一個Compute Agent。它一方主要負責周期性的采集Compute相關的數據並發布到MQ。
目前所規划的監控指標:http://docs.openstack.org/developer/ceilometer/measurements.html

Plugin

Ceilometer實現的Plugin框架依賴setuptools的Dynamic Discovery of Services and Plugins實現。這是Ceilometer能進行擴展的基礎。Ceilometer中有四種類型的Plugin:Poller,Publisher,Notification和Transformer。

  • Poller主要負責被Agent調用去查詢數據,返回Counter類型的結果給Agent框架;
  • Notification負責在MQ中監聽相關topic的消息(虛擬機創建等),並把他轉換成Counter類型的結果給Agent框架。
  • Transformer負責轉換Counter(目前在代碼中還沒有發現具體用li)
  • Publisher負責將Agent框架中Counter類型的結果轉換成消息(包括簽名),並將消息發送到MQ;

Agent的Pipeline定義了這些插件之間的數據流。Agent的Plugin框架就向一個流水線,每個Plugin就像流水線上的工人。

Collector

Collector負責監聽消息隊列,將Publisher發布的消息(Meter Message)存儲到DataStore。

DataStore

由MongoDB實現。

API

負責為其它項目提供數據,例如計費、面板等。

總結

Ceilometer和Kanyun很像(kanyun我只聽過幾次分享),能滿足計費數據的采集的需求。從架構上來看,他的擴展性很強,實現方式也很優美。

原文地址 http://alexyang.sinaapp.com/?p=300


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM