云资源的使用主要分为3类:
计算资源、存储资源、网络资源
telemetry
-
Ceilometer:Ceilometer是一个数据采集服务,负责采集资源使用量相关数据,并将其推送到Gnocchi;同时,它还采集操作事件数据,并推送到Panko。Ceilometer是整个体系中不可或缺的一部分,因为它负责收集和传递原始数据。
-
Gnocchi:Gnocchi是一个时间序列数据库服务,主要负责保存计量数据。它接收来自Ceilometer的原始计量数据,进行聚合运算后保存到持久化后端。Gnocchi的出现使计量服务在性能和空间消耗上都有了质的飞跃。
-
Panko:Panko是一个事件数据库,负责保存事件数据。它能够保存Ceilometer采集的操作事件数据。
-
Aodh:Aodh是一个告警服务,基于计量和事件数据提供告警通知功能。它可以根据收集到的数据设置阈值,当超过阈值时发送告警通知。
ceilometer
docs.openstack.org/ceilometer/…
Ceilometer is nowadays trying to achieve two different things:
- Store metrics, that is a list of (timestamp, value) for a given entity, this entity being anything from the temperature in your datacenter to the CPU usage of a VM.
- Store events, that is a list of things that happens in your OpenStack installation: an API request has been received, a VM has been started, an image has been uploaded, a server fell of the roof, whatever
These two things are both very useful for all the use cases Ceilometer tries to achieve. Metrics are useful for monitoring, billing and alarming, where events are useful to do audit, performance analysis, debugging, etc.
How is data collected
The Ceilometer project created 2 methods to collect data:
- notification agent which takes messages generated on the notification bus and transforms them into Ceilometer samples or events.
- polling agent, will poll some API or other tool to collect information at a regular interval. The polling approach may impose significant on the API services so should only be used on optimised endpoints.
Notification Agent: Listening for data
The heart of the system is the notification daemon (agent-notification) which monitors the message queue for data sent by other OpenStack components
The notification daemon loads one or more listener plugins, using the namespace ceilometer.notification. Each plugin can listen to any topic, but by default, will listen to notifications.info, notifications.sample, and notifications.error. The listeners grab messages off the configured topics and redistributes them to the appropriate plugins(endpoints) to be processed into Events and Samples.
Polling Agent: Asking for data
Polling for compute resources is handled by a polling agent running on the compute node (where communication with the hypervisor is more efficient), often referred to as the compute-agent.
Gnocchi
Gnocchi使用了两个不同的后端存储数据:一个用于存储时间序列(存储驱动程序),另一个用于索引数据(索引驱动程序)。
存储器负责存储所创建的度量的计量值measurement。它接收时间戳和值,并根据定义的归档策略预先计算聚合。
索引器负责存储所有资源的索引,以及它们的类型和属性。