Skip to content

Chargeback: chargeable units (ECU/ERU), visualizations, config lookup, deployment groups#17170

Merged
JohannesMahne merged 59 commits intowip-johannes-chargebackfrom
wip-johannes-chargeback-chargable-units
Feb 9, 2026
Merged

Chargeback: chargeable units (ECU/ERU), visualizations, config lookup, deployment groups#17170
JohannesMahne merged 59 commits intowip-johannes-chargebackfrom
wip-johannes-chargeback-chargable-units

Conversation

@JohannesMahne
Copy link
Copy Markdown

Summary

Chargeback integration: chargeable-units work including ECU/ERU support, dashboard updates, and config lookup.

Highlights

  • ECU/ERU wording: Dashboard Configuration Information section supports both ECU (Elastic Consumption Units) and ERU (Elastic Resource Units)
  • Visualizations: Dashboard and related visualizations
  • Config lookup: Chargeback config lookup transform and pipeline
  • Deployment groups: Deployment group support and related transforms
  • Package: Chargeback package structure, transforms, ingest pipelines, alerting rules

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.
sholzhauer-es and others added 9 commits December 2, 2025 12:16
* adding sku and cost_type to billing data for node granularity

* working on sku with pipeline to do parsing

* downplaying version

* transform

* merge

* dashboard

* setting version
* Add observability alerts for chargeback integration

- Add two ES|QL alerting rules: detect new chargeback groups and detect deployments missing usage data
- Add comprehensive documentation for alert setup and configuration
- Update Elasticsearch version requirement to 9.2.0+ for smart lookup join support
- Add transform startup and monitoring instructions to README

* Update changelog with PR #16205

* Remove wrong information

* Update chargeback README documentation

* Improve observability alert action message formatting

* Clarify configuration update vs add new period documentation
* Add alerting rule templates and enable auto-start for all transforms

- Add 3 Kibana alerting rule templates:
  - Transform health monitoring for all Chargeback transforms
  - New chargeback group detection
  - Deployment with missing usage data detection
- Enable auto-start for all transforms (start: true in manifests)
- Update transform pipeline references to version 0.2.8
- Add performance warning about initial transform execution
- Update README with alerting documentation
- Bump package version to 0.2.8

* Fix: Revert transform frequencies back to 60m

* Update PR number in changelog
* WIP: early chargeback code for review

* Working config integration - 0.0.2

* Version 0.0.3: working from Stack monitoring data

* Fixed query for one visualisation

* Update instructions

* Working with the correct alias

* Changes to transforms

* Bug fix: Fix sorting on  visualisation.

* Update setup instructions

* 0.1.0: Adding ECU value (normalised cost).

* Bug: Aligned fields returned to field names used in visualisation

* Fixing bug: aligning esql returned field names with field names used in lens

* move to packages

* not starting transforms on integration installation

* Update version number

* Made sure the colour palette is predictable by using the eui_amsterdam_color_blind palate. Add ECU rate to the dashboard.

* Update sequence and comments on pre-setup to promote ES integration

* Consistent naming of datastream. Add LIMIT 5000 to ESQL top query to cater for large organisations.

* Add correct code owner

* Delete wrong test files

* Updated the directory structure to remove superfluous directory

* Rem reference to sample logs and logos

* Switch off dynamic mappings for the results of the transforms - we know exactly what the output be.

* Removed agent folders in data stream, as it is not used.

* Updated the readme file to refer to integration, rather than module. Also added explanation about the rest of the config.

* Re-add image

* Formatting

* NOT WORKING: settings index.mode: lookup is not supported

* Fixing the control error in the dashboard by adding a data view.

* Updated to push back usage data transform to ES Integration

* Updated readme

* Update transfrom version numbers

* Swap the use of deployment_id or deployment name to a concatenation of both, to make it easier to identify the deployment in the dashboard.

* Make use of the new elastic-package version, which will create the lookup index automatically when installing the package.

* Update version number

* Updated pre-setup, and version number

* Adding casting to double for division to avoid null instead of very small numbers. elastic/elasticsearch-chargeback#50

* Update version

* Allowing for setting converion rate per time window

* fixing pipeline versions

* adding pipeline stuff

* correcting version

* [Chargeback] Dashboard control and Dataview (#16153)

* dashboard control

* updating version + DV

* SKU based chargeback (#16182)

* adding sku and cost_type to billing data for node granularity

* working on sku with pipeline to do parsing

* downplaying version

* transform

* Chargeback Integration: Extract deployment group from Billing tags (#16185)

* Add deployment_group extraction from ESS Billing tags

- Extract chargeback_group tag value to deployment_group field in billing pipeline
- Add deployment_group to billing_cluster_cost transform group_by
- Add deployment_group field definition
- Fix transforms to use elasticsearch.cluster.name without .keyword
- Update changelog for v0.2.4

* Add deployment_group extraction using runtime mappings from ESS Billing tags

* Update dashboard with deployment_group filter and definitions

* Bump version to 0.2.5 for deployment_group feature after merging SKU/cost_type changes

* known  [bug](elastic/elasticsearch-chargeback#60) from 0.2.4

* wip on css

* adding "local" cluster for ones without remote clusters

---------

Co-authored-by: Johannes Mahne <johannes.mahne@elastic.co>
…ookup (#16936)

* Fix visualizations not loading by adding TO_DOUBLE type conversion

- 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 automated chargeback_conf_lookup index creation via transform

- 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

* Bump transform pipeline versions to 0.2.10

- Update pipeline references from 0.2.9 to 0.2.10
- Revert billing_cluster_cost sync field to event.ingested (was temporarily @timestamp)

* Removed now redundant pre-setup.

* Update PR number in changelog, and recover billing cost sync time field.

* Update packages/chargeback/elasticsearch/transform/chargeback_conf_lookup/fields/base-fields.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix chargeback_conf_lookup transform source index dependency

Change source from cluster_deployment_contribution_lookup to
metrics-ess_billing.billing-* to fix transform loading in fresh setups.

The transform uses runtime_mappings to generate all config values,
so the source index content doesn't matter - it only needs any document
to trigger. Billing data is guaranteed to exist in chargeback deployments.

Fixes feedback from @elastic-abhi review.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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 introduces comprehensive chargeback functionality for tracking Elastic Cloud costs and consumption. The integration enables organizations to allocate costs across deployments, data tiers, and datastreams using ECU/ERU metrics, with support for deployment grouping via tags and configurable billing rates.

Changes:

  • Added chargeback package structure with transforms, ingest pipelines, and alerting rules
  • Implemented ECU/ERU (Elastic Consumption Units/Elastic Resource Units) support in dashboard and configuration
  • Created deployment group support via chargeback_group tags for cost allocation by team/project
  • Added configuration lookup transform with customizable rates, weights, and time-based periods
  • Implemented multiple transforms for aggregating billing and usage data (by deployment, tier, datastream)

Reviewed changes

Copilot reviewed 33 out of 37 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
packages/chargeback/validation.yml Excludes validation check SVR00002
packages/chargeback/manifest.yml Defines package metadata, version 0.3.0, Kibana 9.2.0+ requirement
packages/chargeback/kibana/index_pattern/chargeback_integration.json Index pattern for billing cluster cost lookup
packages/chargeback/kibana/alerting_rule_template/chargeback-transform-health.json Transform health monitoring alert rule
packages/chargeback/kibana/alerting_rule_template/chargeback-new-group-detected.json Alert for detecting new chargeback groups
packages/chargeback/kibana/alerting_rule_template/chargeback-deployment-missing-usage-data.json Alert for deployments missing usage data
packages/chargeback/elasticsearch/transform/cluster_tier_contribution/transform.yml Aggregates ECU usage per tier with tier detection logic
packages/chargeback/elasticsearch/transform/cluster_tier_and_ds_contribution/transform.yml Combined tier and datastream usage aggregation
packages/chargeback/elasticsearch/transform/cluster_deployment_contribution/transform.yml Per-deployment usage metrics aggregation
packages/chargeback/elasticsearch/transform/cluster_datastream_contribution/transform.yml Per-datastream usage aggregation
packages/chargeback/elasticsearch/transform/chargeback_conf_lookup/transform.yml Bootstrap configuration with default ECU rates and weights
packages/chargeback/elasticsearch/transform/billing_cluster_cost/transform.yml Billing data aggregation with deployment group extraction
packages/chargeback/elasticsearch/ingest_pipeline/usage.yml Sets composite keys for correlation
packages/chargeback/elasticsearch/ingest_pipeline/chargeback_conf_lookup.yml Extracts currency unit from aggregation
packages/chargeback/elasticsearch/ingest_pipeline/billing.yml Processes billing data and extracts cost types from SKU
packages/chargeback/docs/README.md Comprehensive documentation with configuration examples
packages/chargeback/changelog.yml Version history and change descriptions
.github/CODEOWNERS Assigns ownership to elastic/customer-architects

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@andrewkroh andrewkroh added 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. dashboard Relates to a Kibana dashboard bug, enhancement, or modification. labels Jan 30, 2026
elastic-abhi and others added 4 commits February 6, 2026 06:59
Spell correction

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Spell correction

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Spell correction

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Spell correction

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

Spell correction. Looks good.

@JohannesMahne JohannesMahne requested a review from a team as a code owner February 9, 2026 07:19
@JohannesMahne JohannesMahne merged commit 726ca4d into wip-johannes-chargeback Feb 9, 2026
8 of 9 checks passed
@JohannesMahne JohannesMahne deleted the wip-johannes-chargeback-chargable-units branch February 9, 2026 07:22
@elasticmachine
Copy link
Copy Markdown

elasticmachine commented Feb 9, 2026

💔 Build Failed

Failed CI Steps

History

@andrewkroh andrewkroh removed 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. labels Feb 9, 2026
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants