Skip to main content
IMHCloud Logo
Back to glossary

Gnocchi

Gnocchi is a time-series database for OpenStack that aggregates metrics during ingestion rather than at query time, providing fast retrieval of pre-computed monitoring and telemetry data.

What is Gnocchi in cloud hosting?

Gnocchi is a time-series database designed for OpenStack environments. It stores and indexes metrics such as CPU usage, network traffic, and disk I/O over time. Gnocchi aggregates metric data at ingestion rather than during queries, which produces fast retrieval of pre-computed results.

Gnocchi belongs to the OpenStack Telemetry project. It works with Ceilometer (OpenStack's metering service) to collect, store, and query resource metrics. Cloud administrators use Gnocchi to track resource consumption, identify performance trends, and generate billing data based on actual usage.

Why Gnocchi exists

OpenStack environments generate massive volumes of metrics from hundreds or thousands of instances, volumes, and networks. Storing every raw data point becomes expensive and slow. Traditional time-series databases compute aggregations during queries, which creates latency when users request hourly, daily, or monthly summaries.

Without Gnocchi, cloud operators face two problems. First, querying raw metrics for large time ranges takes too long. Second, storing every individual data point requires enormous amounts of disk space. Gnocchi solves both by aggregating metrics during ingestion and storing only the computed summaries.

What does Gnocchi actually do?

  • Aggregates metrics during ingestion using predefined archival policies (e.g., store 5-minute averages for one month, hourly averages for one year)
  • Stores aggregated metrics in scalable backends such as Ceph, Swift, or file systems
  • Indexes resources and their associated metrics in a SQL database (PostgreSQL or MySQL)
  • Retrieves pre-computed aggregations quickly without recalculating during queries
  • Supports multiple tenants with resource isolation
  • Provides a REST API for creating metrics, submitting data points, and querying aggregations
  • Integrates with monitoring tools such as Grafana, Prometheus exporters, and Collectd

When would I use Gnocchi?

You use Gnocchi when you deploy OpenStack with Ceilometer for metering and monitoring. If you need to track resource usage for billing, capacity planning, or performance analysis, Gnocchi stores that data efficiently.

You also use Gnocchi when your cloud environment generates high metric volumes. Aggregating data at ingestion rather than query time keeps dashboards and reports responsive even with years of historical data.

You use Gnocchi when you need multi-tenant metric storage. Each project's metrics remain isolated, so tenants cannot see metrics from other projects.

When would I NOT use Gnocchi?

You do not use Gnocchi if you are not running OpenStack. Gnocchi is purpose-built for OpenStack telemetry. Other cloud platforms use different metric systems.

You do not use Gnocchi if you need to store raw, unaggregated data points for every second. Gnocchi's archival policies define aggregation intervals. If you require millisecond-level granularity indefinitely, you need a different time-series database.

You do not use Gnocchi if you want to query arbitrary time ranges with custom aggregation functions after data collection. Gnocchi stores only the aggregations defined by your archival policy. You cannot retroactively change how data was aggregated.

Real-world example

Company A operates a public OpenStack cloud with 500 tenants. Each tenant runs dozens of instances. Company A needs to bill tenants based on actual resource usage and provide performance dashboards.

Company A deploys Ceilometer to collect metrics from every instance (CPU, RAM, disk, network). Without Gnocchi, storing every metric every 10 seconds for 500 tenants creates billions of data points per month. Queries for monthly usage reports take minutes.

Company A adds Gnocchi with an archival policy that stores 1-minute aggregates for 7 days, 1-hour aggregates for 90 days, and daily aggregates for 2 years. Ceilometer sends metrics to Gnocchi, which aggregates and stores them immediately. When tenants view their usage dashboards, Gnocchi retrieves pre-computed hourly averages in milliseconds. Company A generates monthly bills by querying daily aggregates without recalculating raw data.

Frequently Asked Questions

Do I need Ceilometer to use Gnocchi?

No. Gnocchi provides a standalone time-series database with a REST API. Any application can send metrics to Gnocchi directly. However, most OpenStack deployments use Ceilometer to collect metrics automatically from OpenStack services and forward them to Gnocchi.

Can I change the aggregation policy after metrics are stored?

No. Gnocchi applies archival policies during ingestion. Once metrics are aggregated and stored, you cannot retroactively apply different aggregation intervals or functions. You must define your archival policy before collecting data. If you need different aggregations later, you will need to collect new metrics under the new policy.

What happens if Gnocchi runs out of storage?

Gnocchi automatically deletes old aggregates based on your archival policy. For example, if your policy stores 1-minute aggregates for 7 days, Gnocchi removes 1-minute data older than 7 days. If you exhaust storage before automatic cleanup occurs, Gnocchi will reject new metric submissions until space becomes available. You will need to expand storage or adjust your archival policy to retain fewer historical aggregates.

Can Gnocchi store metrics from non-OpenStack systems?

Yes. Gnocchi's REST API accepts metrics from any source. You can send metrics from applications, network devices, or external monitoring tools. However, Gnocchi does not provide built-in metric collection. You must implement metric submission logic or use collectors such as Collectd or Telegraf that support Gnocchi as a backend.

Does Gnocchi replace monitoring tools like Prometheus or Grafana?

No. Gnocchi stores time-series data but does not provide alerting, visualization, or advanced query languages. You typically integrate Gnocchi with tools such as Grafana for dashboards or Prometheus exporters for alerting. Gnocchi handles storage and aggregation; monitoring tools handle presentation and alerting logic.

Summary

  • Gnocchi is a time-series database for OpenStack that aggregates metrics during ingestion rather than at query time.
  • It solves the performance and storage problems caused by storing raw metric data points from large cloud environments.
  • Archival policies define how Gnocchi aggregates data (e.g., 1-minute averages for 7 days, hourly averages for 1 year).
  • Gnocchi integrates with Ceilometer for automatic metric collection but also provides a REST API for direct metric submission.
  • Pre-computed aggregations enable fast queries for dashboards, billing reports, and capacity planning even with years of historical data.

Related terms

  • Ceilometer: OpenStack's metering and monitoring service that collects resource usage metrics and sends them to backends such as Gnocchi for storage and aggregation.
  • Telemetry: The OpenStack project responsible for collecting, storing, and querying metrics and events from cloud resources, which includes services such as Ceilometer, Gnocchi, and Aodh (alarming).
  • Time-Series Database: A database optimized for storing and querying data points indexed by timestamp, such as performance metrics, sensor readings, and application logs.

Related Terms

Read definition

Usage-Based Billing

Usage-based billing is a pricing model where customers pay only for the cloud resources they actually consume rather than a fixed monthly fee.

Cost Management
Learn more