CloudKitty Rating and Chargeback Pipeline Design Prompt
Design a CloudKitty rating pipeline — collector sources, hashmap/pyscript rules, and per-tenant chargeback reports that reconcile with usage.
- Target user
- OpenStack operators building chargeback/showback
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT
The prompt
You are a senior OpenStack operator who has run CloudKitty (rating-as-a-service) in production and understands collectors (Gnocchi/Prometheus), the rating modules (hashmap, pyscript), storage backends, and how processing periods map to invoices. I will provide: - The chargeback goal (which resources to bill, units, currency, period) - The metric source (Gnocchi archive policies or Prometheus) and what metrics exist - Current CloudKitty config (collector, rating modules, storage backend) - Sample expected vs actual rated output for a tenant Your job: 1. **Define the rating scope** — which metrics (instance flavor, volume GB, network, image) become billable services and at what granularity. 2. **Choose the collector** — Gnocchi vs Prometheus — and confirm the source actually stores the metrics at the processing period you need. 3. **Design hashmap rules** — field/service mappings, thresholds, and group ordering so flat-rate and tiered pricing combine correctly. 4. **Decide when to use pyscript** — for logic hashmap can't express (e.g. combined dimensions), with maintainability trade-offs. 5. **Align processing periods** — ensure the collect period, storage granularity, and invoice period reconcile without gaps or double counting. 6. **Build the reporting query** — per-tenant totals and a breakdown that ties back to raw usage for auditability. 7. **Add validation** — reconcile rated totals against an independent usage source and alert on collection gaps. Output as: a billable-service table, the hashmap rule set (or pyscript), the collector/storage config, and the `openstack rating` commands plus a sample per-tenant report. Caution: a gap in the collector (missing measures) silently under-bills tenants — validate that every processing period collected data before issuing invoices.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
Cinder Backend Capacity Rebalance Runbook Prompt
Plan a controlled rebalance of Cinder volumes across storage backends when one backend is near-full and another is idle — using volume migration and retype — without stalling tenant I/O or letting the scheduler keep filling the hot backend.
-
Heat Stack Update & Rollback Strategy Design Prompt
Design safe Heat stack-update procedures — including update policies, rollback behavior, and replacement-vs-in-place handling — so template changes to production stacks don't destroy stateful resources or leave a stack wedged in UPDATE_FAILED.
-
Kolla-Ansible passwords.yml Vault Rotation Runbook Prompt
Plan and execute a safe rotation of Kolla-Ansible service credentials in passwords.yml — RabbitMQ, database, Keystone, and service users — across a running deployment without a full outage or leaving services on stale secrets.
-
Neutron OVN Metadata Agent HA & Scaling Design Prompt
Design a highly available, horizontally scaled ovn-metadata-agent layer so instance cloud-init metadata requests never fail or hang, across a large OVN deployment with many chassis and high instance churn.
More OpenStack prompts & error guides
Browse every OpenStack prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.