Skip to content

Conversation

@JohannesMahne
Copy link

@JohannesMahne JohannesMahne commented Jan 13, 2026

Summary

Fixes visualization loading issues and automates chargeback_conf_lookup index creation.

Changes

Bug Fixes

  • Fix visualizations not loading by adding TO_DOUBLE type conversion in ESQL queries to prevent integer division returning zero (fixes #69)

Enhancements

  • Add automated chargeback_conf_lookup index creation via transform (fixes #70)
    • Bootstrap transform creates index with default config values
    • Default ECU rate: 0.85 EUR, weights: 20/20/40
    • Date range: 2010-01-01 (Elasticsearch birthdate) to 2046-12-31
    • Eliminates need for manual index creation

Maintenance

  • Bump transform pipeline versions to 0.2.10
  • Update package version to 0.2.10

Testing

  • Tested on local docker stack
  • Verified transforms create lookup index automatically
  • Confirmed dashboard visualizations display correctly

Closes

- 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)
@JohannesMahne JohannesMahne requested a review from a team as a code owner January 13, 2026 05:28
@JohannesMahne JohannesMahne changed the title Fix chargeback visualizations and add automated config lookup [Chargeback] Fix chargeback visualizations and add automated config lookup Jan 13, 2026
Copy link

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 addresses visualization display issues and automates chargeback configuration index creation. It fixes integer division returning zero in ESQL queries by adding TO_DOUBLE type conversions, and introduces a transform-based approach to automatically create and populate the chargeback_conf_lookup index with default configuration values.

Changes:

  • Fixed integer division in ESQL queries causing visualizations to display zero values
  • Automated chargeback_conf_lookup index creation through transform configuration
  • Updated pipeline versions from 0.2.9 to 0.2.10 across all transforms

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/chargeback/pre-setup.sh Removed manual index creation script (replaced by automated transform)
packages/chargeback/manifest.yml Bumped package version to 0.2.10
packages/chargeback/kibana/dashboard/chargeback-39a39857-746c-4a29-adca-3c2fcb6bcfb6.json Added TO_DOUBLE type conversions in ESQL queries to fix visualization calculations
packages/chargeback/elasticsearch/transform/cluster_tier_contribution/transform.yml Updated pipeline version to 0.2.10
packages/chargeback/elasticsearch/transform/cluster_tier_and_ds_contribution/transform.yml Updated pipeline version to 0.2.10
packages/chargeback/elasticsearch/transform/cluster_deployment_contribution/transform.yml Updated pipeline version to 0.2.10
packages/chargeback/elasticsearch/transform/cluster_datastream_contribution/transform.yml Updated pipeline version to 0.2.10
packages/chargeback/elasticsearch/transform/chargeback_conf_lookup/transform.yml Added transform configuration for automated lookup index creation
packages/chargeback/elasticsearch/transform/chargeback_conf_lookup/manifest.yml Added manifest for chargeback_conf_lookup transform
packages/chargeback/elasticsearch/transform/chargeback_conf_lookup/fields/ecs.yml Added empty ECS fields definition
packages/chargeback/elasticsearch/transform/chargeback_conf_lookup/fields/base-fields.yml Added field definitions for configuration lookup index
packages/chargeback/elasticsearch/transform/billing_cluster_cost/transform.yml Updated pipeline version to 0.2.10
packages/chargeback/elasticsearch/ingest_pipeline/chargeback_conf_lookup.yml Added pipeline to extract currency unit from terms aggregation
packages/chargeback/changelog.yml Added changelog entry for version 0.2.10

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

@JohannesMahne
Copy link
Author

JohannesMahne commented Jan 13, 2026

@sholzhauer-es - would you please check this PR?
I built the assets and prepared PR on elasticsearch-chargeback: elastic/elasticsearch-chargeback#71

…okup/fields/base-fields.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
JohannesMahne added a commit to elastic/elasticsearch-chargeback that referenced this pull request Jan 13, 2026
…on fixes

- Removed manual setup_commands.json (no longer needed)
- Updated Instructions.md: removed manual config setup step, added Configuration section at end
- Updated README.md with version 0.2.10 release notes
- Documented automated chargeback_conf_lookup creation via bootstrap transform
- Simplified installation steps - configuration index now auto-created
- Default config: ECU rate 0.85 EUR, weights 20/20/40, date range 2010-2046

Based on PR: elastic/integrations#16936
@elasticmachine
Copy link

💚 Build Succeeded

History

@andrewkroh andrewkroh added the dashboard Relates to a Kibana dashboard bug, enhancement, or modification. label Jan 13, 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.

4 participants