CloudKitty
CloudKitty is an OpenStack rating service that collects cloud resource usage metrics, applies pricing rules to that data, and produces cost information for chargeback and showback reporting.
What is CloudKitty in cloud hosting?
CloudKitty is a rating service for OpenStack that calculates the cost of cloud resource usage. It collects metrics about your cloud resources, applies pricing rules to that usage data, and produces rated information that shows how much each resource costs over time.
CloudKitty bridges the gap between metrics collection systems like Gnocchi and actual billing systems. It does not generate invoices or process payments. Instead, it takes raw usage metrics and applies your pricing rules to produce cost data that you can use for chargeback, showback, or feeding into a billing system.
Why CloudKitty exists
OpenStack collects detailed metrics about every resource in your cloud. Metrics tell you how many instances are running, how much storage is allocated, and how much network traffic flows through your environment. But metrics alone do not tell you what that usage costs.
Without CloudKitty, you need to build custom scripts to pull metrics from multiple sources, apply your pricing structure, track costs over time, and generate reports. This creates extra work and makes it difficult to provide accurate cost allocation to different teams or customers.
CloudKitty solves this problem by automatically collecting metrics, applying your pricing rules, and producing cost data that you can use for internal chargeback or external billing purposes.
What does CloudKitty actually do?
- Polls endpoints like Gnocchi or Prometheus to retrieve usage metrics about cloud resources
- Applies rating rules that define how much each unit of resource usage costs
- Stores rated data showing the calculated cost of each resource over time
- Provides an API that lets you retrieve cost information organized by project, user, or resource type
- Supports custom rating modules written in Python for complex pricing logic
- Generates reports showing resource usage and associated costs for chargeback or showback purposes
When would I use CloudKitty?
You would use CloudKitty when you need to track and allocate cloud costs in an OpenStack environment.
A common situation is when you run a private cloud that serves multiple departments or business units. Each team uses shared infrastructure, and you need to charge them based on what they actually consume. CloudKitty collects usage data, applies your internal pricing, and produces reports that show each team their share of the total cost.
Another situation is when you operate a cloud service and need to bill customers based on their resource usage. CloudKitty rates the usage and provides cost data that you can feed into your billing system.
You would also use CloudKitty for showback, where you do not charge departments but want to show them what their cloud usage would cost. This helps teams understand their resource consumption and make informed decisions about right-sizing or cost optimization.
When would I NOT use CloudKitty?
You would not use CloudKitty if you do not need cost allocation or billing for your cloud resources. If your organization treats cloud infrastructure as shared overhead and does not track costs per team or project, the complexity of running a rating service adds no value.
You would not use CloudKitty if you need a complete billing system that generates invoices, applies taxes, processes payments, or handles currency conversion. CloudKitty only performs rating. You need additional billing software to turn rated data into customer invoices.
You would not use CloudKitty outside of OpenStack if you do not have Gnocchi or Prometheus metrics available. While CloudKitty can run standalone, it still requires a metrics source. If you only have basic resource data without detailed usage metrics, the rating will lack accuracy.
You would not use CloudKitty if your pricing model requires real-time enforcement of spending limits. CloudKitty calculates costs after usage occurs. It does not prevent users from launching resources when they reach a budget threshold.
Real-world example
Company A runs an OpenStack private cloud that serves their engineering, QA, and product teams. Each team launches instances, creates storage volumes, and uses network resources on the shared infrastructure. Finance wants to allocate cloud costs to each team based on their actual usage, but OpenStack only provides raw metrics like instance hours and gigabytes of storage.
The cloud operations team deploys CloudKitty and configures rating rules that assign a cost per vCPU-hour, per gigabyte of storage, and per gigabyte of network transfer. CloudKitty polls Gnocchi every hour to collect usage metrics for all projects. It applies the pricing rules and stores the rated data showing the cost of each resource.
At the end of each month, finance retrieves a cost report from CloudKitty that breaks down spending by team. Engineering's development instances cost $12,000, QA's test environments cost $8,000, and product's demo systems cost $3,000. Finance uses these numbers to allocate the $50,000 total infrastructure cost across the teams based on their proportional usage. Each team sees their costs in the Horizon dashboard and can adjust their resource usage to stay within budget.
Frequently Asked Questions
Do I need more than one CloudKitty service?
You typically run a single CloudKitty service per OpenStack deployment. CloudKitty polls metrics for all projects and applies rating rules centrally. If you operate multiple separate OpenStack clouds, you would deploy CloudKitty in each environment. Running multiple CloudKitty instances for the same cloud creates duplicate rating data and requires additional coordination to merge results.
Does deploying CloudKitty affect existing resources?
No. CloudKitty only reads usage metrics and calculates costs. It does not modify, stop, or delete any existing instances, volumes, or networks. Your workloads continue running unchanged. CloudKitty observes what resources exist and how much they are used, then applies pricing rules to that data.
What happens if I delete CloudKitty?
Deleting CloudKitty removes the rating service and stops producing cost data. Your OpenStack environment continues operating normally because CloudKitty does not control resources. You lose the ability to track costs going forward, and historical rated data in CloudKitty's storage becomes inaccessible. Metrics collection through Gnocchi or Prometheus continues, so you can redeploy CloudKitty later and resume rating from that point.
Can I change pricing rules after CloudKitty has already rated past usage?
Yes, but CloudKitty does not automatically recalculate historical data when you change rules. The service applies current rules to new metrics as it collects them. If you need to adjust costs for a previous period, you would either manually recalculate that data or accept that the old rating reflects the rules that were active at that time. Some organizations treat rating rule changes like price adjustments that only apply to future usage.
Does CloudKitty require Gnocchi to work?
CloudKitty originally required Gnocchi for metrics collection in OpenStack environments. Recent versions also support Prometheus as a metrics source, allowing CloudKitty to run standalone without OpenStack. You need one of these metrics backends to provide the usage data that CloudKitty rates. Without a metrics source, CloudKitty has no data to apply pricing rules to.
Summary
- CloudKitty is an OpenStack rating service that applies pricing rules to cloud resource usage metrics
- It collects metrics from systems like Gnocchi or Prometheus and produces cost data for chargeback and showback reporting
- CloudKitty bridges the gap between metrics collection and billing systems by performing rating but not invoicing
- Use it when you need to allocate cloud costs to teams, departments, or customers based on actual resource consumption
- CloudKitty observes usage and calculates costs but does not enforce spending limits or generate customer invoices
Related Terms
- Instance (virtual machine): CloudKitty rates the cost of running instances by tracking metrics such as uptime, flavor size, and resource consumption over time.
- Gnocchi (metrics storage system): CloudKitty retrieves usage metrics from Gnocchi or Prometheus to calculate costs based on actual resource consumption patterns.
- Horizon (OpenStack dashboard): CloudKitty integrates with Horizon to display rated usage information directly in the OpenStack web interface for administrators and users to review.
- Cinder (block storage service): CloudKitty tracks storage volumes created through Cinder and applies pricing rules based on volume size, type, and duration of use.
Related Terms
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.
