On-Prem Billing: mERU cost model, 0.2.0 ERU config and deployment_tags#17167
Merged
JohannesMahne merged 64 commits intowip-johannes-chargebackfrom Feb 9, 2026
Merged
On-Prem Billing: mERU cost model, 0.2.0 ERU config and deployment_tags#17167JohannesMahne merged 64 commits intowip-johannes-chargebackfrom
JohannesMahne merged 64 commits intowip-johannes-chargebackfrom
Conversation
…m_color_blind palate. Add ECU rate to the dashboard.
…cater for large organisations.
…ow exactly what the output be.
…Also added explanation about the rest of the config.
- Add TO_DOUBLE() wrapper to all division operations in ESQL queries - Prevents integer division from returning zero - Fixes tier_sum_indexing_time / deployment_sum_indexing_time - Fixes tier_sum_query_time / deployment_sum_query_time - Fixes tier_sum_data_set_store_size / deployment_sum_data_set_store_size - Fixes tier_sum_store_size / deployment_sum_store_size - Bump version to 0.2.10 Fixes: elastic/elasticsearch-chargeback#69
- Add bootstrap transform that creates chargeback_conf_lookup index with default config - Uses cluster_deployment_contribution_lookup as source - Sets default values: ECU rate 0.85 EUR, weights 20/20/40 - Date range: 2010-01-01 (ES birthdate) to 2046-12-31 - Eliminates need for manual index creation
- Update pipeline references from 0.2.9 to 0.2.10 - Revert billing_cluster_cost sync field to event.ingested (was temporarily @timestamp)
Initial release of the On-Premises Billing integration that generates ESS Billing-compatible metrics for on-premises, ECE, and ECK deployments, enabling the Chargeback integration to work in non-cloud environments. Features: - Fixed daily ECU model per deployment - Bootstrap transform for auto-discovery of deployments - Configurable deployment_tags for Chargeback grouping - Manual enrich policy setup for deployment configuration - Output to metrics-ess_billing.billing-onprem index Requires manual post-installation setup (enrich policy, pipeline, transform start).
Introduces milli-ERU as the internal cost unit (1 ERU = 1000 mERU) to handle fractional ERU allocations cleanly. This allows deployments ranging from 0.25 ERU to 10+ ERU without awkward decimals or large rate multipliers. Changes: - Add organization-level config (license cost, total ERUs, ERU-to-RAM ratio) - Support per-deployment config via direct ERU input OR RAM-based calculation - Update config_bootstrap transform for mERU defaults - Comprehensive documentation on gathering config data and calculations WIP: Preliminary implementation - needs testing
There was a problem hiding this comment.
Pull request overview
This PR integrates on-premises billing with the Chargeback integration by introducing a milli-ERU (mERU) cost model and aligning with version 0.2.0. It adds support for ERU-based and RAM-based deployment configuration, deployment tags for grouping, and comprehensive documentation for setup and usage.
Changes:
- Introduces new
onprem_billingintegration package (v0.2.0) with mERU cost model - Adds
chargeback_conf_lookuptransform for automated configuration bootstrap - Updates Chargeback dashboard ESQL queries to fix integer division issues with
TO_DOUBLEconversion - Removes manual setup script in favor of automated transform-based configuration
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/onprem_billing/manifest.yml | Defines new integration metadata for on-premises billing with version 0.2.0 |
| packages/onprem_billing/elasticsearch/transform/config_bootstrap/transform.yml | Bootstrap transform that discovers deployments and creates mERU-based config records |
| packages/onprem_billing/elasticsearch/transform/billing/transform.yml | Aggregates daily billing data from Stack Monitoring to ESS-compatible format |
| packages/onprem_billing/docs/README.md | Comprehensive documentation for mERU model, configuration, and troubleshooting |
| packages/chargeback/manifest.yml | Version bump to 0.2.10 |
| packages/chargeback/pre-setup.sh | Deleted manual setup script replaced by automated transform |
| packages/chargeback/kibana/dashboard/chargeback-39a39857-746c-4a29-adca-3c2fcb6bcfb6.json | Fixes ESQL queries with TO_DOUBLE to prevent integer division |
| packages/chargeback/elasticsearch/transform/chargeback_conf_lookup/transform.yml | New transform for automated chargeback configuration bootstrap |
Comments suppressed due to low confidence (1)
packages/onprem_billing/docs/README.md:1
- Corrected spelling of 'birthdate' to 'birth date' for better readability.
# On-Premises Billing Integration
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/chargeback/elasticsearch/transform/chargeback_conf_lookup/fields/base-fields.yml
Outdated
Show resolved
Hide resolved
packages/chargeback/elasticsearch/transform/cluster_tier_contribution/transform.yml
Outdated
Show resolved
Hide resolved
packages/chargeback/elasticsearch/transform/cluster_tier_and_ds_contribution/transform.yml
Outdated
Show resolved
Hide resolved
packages/chargeback/elasticsearch/transform/cluster_deployment_contribution/transform.yml
Outdated
Show resolved
Hide resolved
packages/chargeback/elasticsearch/transform/cluster_datastream_contribution/transform.yml
Outdated
Show resolved
Hide resolved
…okup/fields/base-fields.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…_contribution/transform.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ibution/transform.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…s_contribution/transform.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…_contribution/transform.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
💔 Build Failed
Failed CI StepsHistory
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Target
Merges into
wip-johannes-chargeback-chargable-units(Chargeback WIP branch).Testing
run_e2e_tests.sh(On-Prem Billing + Chargeback)