In Openstack Ceilometer is the component that gathers data from the cloud and pre-processes it. It distinguishes between samples (CPU time) and events (creation of an instance). Resources, Meters and Samples are fundamental concepts in Ceilometer.
Samples are retrieved at regular intervals and if Ceilometar fails to get the sample it can be estimated by interpolation. Events are retrieved as they happen and cannot be estimated.
Ceilometer sends events to the a storage service, while samples are sent to a service named Gnocchi, which is optimized to handle large amount of time-series data.
Aodh gets measures from Gnocchi, checks whether certain conditions are met and triggers actions. This is the foundation for application auto-scaling.
Other uses for Gnocchi data are monitoring the health of the cloud and billing.
Ceilometer has three ways retrieving samples and events:
- Services may voluntarily provide them by sending Ceilometer notification via Openstack’s messaging system. This is preferred way since it is based on internal knowledge that the service has about it’s resources and it is fast without much overhead and stress on the systems.
- Ceilometer actively retrieves data via APIs which is a costly method for billing and alarming.
- Ceilometer can get data by accessing sub-components of services such as the hypervisor that run the instances.
Second and third method are referred also as methods where Ceilometer “polls” the samples.
More details on Openstack telemetry can be found on this link:
While Ceilometer has resources, meters and samples Gnocchi has resources, metrics and measures. Gnocchi resource corresponds to Ceilometer resource. Metric is roughly equivalent to a meter in Ceilometer. Gnocchi does not store every metric value it receives from Ceilomter, but rather it combines values and stores the results at regular intervals according to Archive policy.
|Listing gnocchi resources, metrics, measures:|
|Listing resources, metrics, measures with openstack client:|
|Listing Ceilometer Events:|
|Event types are defined in a YAML type:|
|List event types, events and event details:|
** There is no option in horizon GUI to view events or statictics, but gnocchi visualisation can be provided by Grafana.
|Example generating CPU and disk load and showing gnocchi measures:|
|Create two instances:|
|Let the instances finish creating and leave them running for a while:|
|Show cpu usage measures from cpu-user server:|
|Show disk usage measures from disk-user server:|
** Don’t forget to stop cpu-server and disk-server after you have finished, since they will continue to generate CPU and disk load.
|An alarm has:|
|Single Resource Threshold Alarm:|
|Alarm based on resource aggregates:|