Skip to content

On-Prem Billing: mERU cost model, 0.2.0 ERU config and deployment_tags#17167

Merged
JohannesMahne merged 64 commits intowip-johannes-chargebackfrom
wip/onprem-billing-integration
Feb 9, 2026
Merged

On-Prem Billing: mERU cost model, 0.2.0 ERU config and deployment_tags#17167
JohannesMahne merged 64 commits intowip-johannes-chargebackfrom
wip/onprem-billing-integration

Conversation

@JohannesMahne
Copy link
Copy Markdown

Summary

  • On-Prem Billing integration: mERU (milli-ERU) cost model and 0.2.0 alignment
  • ERU-based config (organization + deployment config), deployment_tags in config_bootstrap
  • Docs and transform updates for ERU/deployment_tags

Target

Merges into wip-johannes-chargeback-chargable-units (Chargeback WIP branch).

Testing

  • E2E tested with elasticsearch-chargeback run_e2e_tests.sh (On-Prem Billing + Chargeback)

JohannesMahne and others added 30 commits December 2, 2025 12:16
…m_color_blind palate. Add ECU rate to the dashboard.
…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
@JohannesMahne JohannesMahne requested review from a team as code owners January 30, 2026 10:35
@JohannesMahne JohannesMahne requested review from Copilot and elastic-abhi and removed request for a team January 30, 2026 10:37
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_billing integration package (v0.2.0) with mERU cost model
  • Adds chargeback_conf_lookup transform for automated configuration bootstrap
  • Updates Chargeback dashboard ESQL queries to fix integer division issues with TO_DOUBLE conversion
  • 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.

JohannesMahne and others added 5 commits January 30, 2026 12:44
…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>
@elasticmachine
Copy link
Copy Markdown

💔 Build Failed

Failed CI Steps

History

@JohannesMahne JohannesMahne changed the base branch from wip-johannes-chargeback-chargable-units to wip-johannes-chargeback January 30, 2026 12:04
@andrewkroh andrewkroh added New Integration Issue or pull request for creating a new integration package. dashboard Relates to a Kibana dashboard bug, enhancement, or modification. documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. labels Jan 30, 2026
Copy link
Copy Markdown

@elastic-abhi elastic-abhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks perfect.

@JohannesMahne JohannesMahne merged commit 3d24e27 into wip-johannes-chargeback Feb 9, 2026
11 of 12 checks passed
@JohannesMahne JohannesMahne deleted the wip/onprem-billing-integration branch February 9, 2026 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dashboard Relates to a Kibana dashboard bug, enhancement, or modification. documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. New Integration Issue or pull request for creating a new integration package.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants