Skip to content

[New Integration] Add Chargeback integration (0.6.0) - #22427

Merged
JohannesMahne merged 47 commits into
mainfrom
feat/chargeback-0.6.0-self-collection
Nov 25, 2026
Merged

JohannesMahne merged 47 commits into
mainfrom
feat/chargeback-0.6.0-self-collection

Conversation

@JohannesMahne

@JohannesMahne JohannesMahne commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Proposed commit message

Add the chargeback integration (0.6.0) for FinOps cost visibility and tenant chargeback allocation across Elastic Cloud Hosted (ECH), Cloud Serverless, and self-managed / On-Premises Elasticsearch deployments, data tiers, and data streams.

What & Why

Center of Excellence (CoE) and FinOps teams need a turnkey Fleet integration to convert billed Elastic consumption units (ECU/ERU) into normalized tenant costs and allocate realized data-tier and Serverless workload capacity across teams, namespaces, data tiers, and data streams:

  1. Self-contained Elastic Agent CEL data streams (billing, usage, node_stats) with existing-collector coexistence:

    • chargeback.billing (metrics-chargeback.billing-*): collects daily ECH and Serverless SKU billing line items, deployment tags (chargeback_group:*), regions, rate configuration snapshots, and optional organization credit commitments (collect_ess_credits).
    • chargeback.usage (metrics-chargeback.usage-*): collects 10-minute reset-aware per-index indexing, search, and storage usage across ECH deployments, self-managed Hub clusters (/_stats and /_settings), and Cloud Serverless projects (/_cat/indices), attributing midnight-crossing intervals across UTC days and surfacing observation gaps.
    • chargeback.node_stats (metrics-chargeback.node_stats-*): samples 15-minute data-node JVM heap and filesystem disk utilization (/_nodes/_all/stats/jvm,fs) for daily p95 realized-cost capacity scoring.
    • Coexists seamlessly with the standalone On-Premises Billing custom .zip integration (metrics-ess_billing.billing-onprem*), ESS Billing (metrics-ess_billing.billing-*), Elasticsearch Stack Monitoring / index_pivot (monitoring-indices*, .monitoring-es-*, metricbeat-*), and Cross-Cluster Search (*:monitoring-indices*), retaining legacy rollups until native samples cover contributing nodes and indices for the UTC day.
  2. Per-data-stream Fleet UI configuration & chargeback_lookup.chargeback_conf sync:

    • Shared connection and authentication settings (organization_id, cloud_api_key, hub_es_url, hub_es_api_key, deployment_api_keys, sync_fleet_config, config_owner_id) live under Elastic Cloud & Cluster Access with secrets encrypted in Fleet.
    • Currency and credit settings (lookbehind, currency_unit, unit_rate, onprem_unit_rate, config_effective_from, collect_ess_credits) live on chargeback.billing; blended workload weights (indexing_weight, query_weight, storage_weight) live on chargeback.usage; capacity utilization weights and floor (utilization_memory_weight, utilization_storage_weight, utilization_floor) live on chargeback.node_stats.
    • The chargeback_conf_lookup transform writes into chargeback_lookup.dest_chargeback_conf-1 (aliased as chargeback_lookup.chargeback_conf) with _id: config (Cloud ECU) and _id: config_onprem (On-Premises mERU), automatically carrying over pre-0.6.0 chargeback_conf_lookup custom rates/dates when no Fleet config_snapshot exists and preserving manual edits when sync_fleet_config is disabled.
  3. Nine continuous transforms, lookup-mode indices, dashboards, alerts, and opt-in stock dashboard compatibility:

    • Continuous transforms maintain chargeback_lookup.billing_cluster_cost, chargeback_lookup.billing_credits, chargeback_lookup.billing_realized_pool, chargeback_lookup.chargeback_conf, cluster_capacity_utilization_lookup, chargeback_lookup.cluster_deployment_contribution, chargeback_lookup.cluster_tier_contribution, chargeback_lookup.cluster_datastream_contribution, and chargeback_lookup.cluster_tier_and_datastream_contribution.
    • Ships three ES|QL and Lens dashboards ([Chargeback] Billing Components Overview, [Chargeback] Usage and Cost Allocation, [Chargeback] Configuration), three Kibana alerting rule templates, and opt-in compatibility fields for stock ESS Billing, ESS Credits, and Elasticsearch Consumption dashboards.

Versioning & Changelog Check Note (0.6.0)

  • Version must remain 0.6.0 (do not reset to 0.1.0): chargeback (0.1.0–0.5.0) was already shipped and installed in customer environments from elastic/elasticsearch-chargeback. Keeping version: 0.6.0 on packages/chargeback ensures existing 0.4.x/0.5.0 clusters detect and upgrade cleanly to 0.6.0 when discovering the package in Fleet. (onprem_billing is intentionally not included in this PR and remains a standalone custom .zip integration in elastic/elasticsearch-chargeback.)
  • Changelog PR link check (changelog-link-check:skip): Both 0.6.0 entries in packages/chargeback/changelog.yml link to https://github.com/elastic/integrations/pull/22427. Because packages/chargeback is new to main, its preserved pre-0.6.0 release history appears in git diff origin/main, triggering the changelog link mismatch bot comment. The changelog-link-check:skip label is intentionally applied so historical release links are preserved.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.
  • I have verified that any added dashboard complies with Kibana's Dashboard good practices

Author's Checklist

  • Release version kept at 0.6.0 across manifest.yml, changelog.yml, and all transform destination pipeline / fleet_transform_version references (upgrading cleanly from prior 0.4.x/0.5.0 releases).
  • Added ingest pipeline unit tests (_dev/test/pipeline) and mock-API CEL system tests (_dev/test/system) across billing, usage, and node_stats.
  • Verified elastic-package build, elastic-package check, elastic-package install, elastic-package test (asset, pipeline, static, system), mage check, and vale documentation linting pass cleanly.

How to test this PR locally

  1. Run elastic-package build and elastic-package check inside packages/chargeback.
  2. Bring up a 9.2.0+ stack and run elastic-package install and elastic-package test -v.
  3. Configure a Chargeback policy in Fleet (optionally paired with the standalone On-Premises Billing .zip integration for self-managed clusters) and verify [Chargeback] Billing Components Overview, [Chargeback] Usage and Cost Allocation, and [Chargeback] Configuration.

Related issues

  • Landing chargeback (0.6.0) into elastic/integrations (onprem_billing remains a standalone custom .zip integration in elastic/elasticsearch-chargeback)

@JohannesMahne
JohannesMahne force-pushed the feat/chargeback-0.6.0-self-collection branch from 449d3df to fc97ab7 Compare November 12, 2026 14:56
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Elastic Docs Style Checker (Vale)

Summary: 2 warnings, 4 suggestions found

⚠️ Warnings (2): Fix when the suggestion improves clarity or correctness.
File Line Rule Message
packages/chargeback/data_stream/lookup/fields/fields.yml 258 Elastic.Latinisms Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'.
packages/chargeback/manifest.yml 47 Elastic.DontUse Don't use 'and/or'. Choose a more precise or reader-focused term.
💡 Suggestions (4): Optional style improvements. Apply when helpful.
File Line Rule Message
packages/chargeback/changelog.yml 18 Elastic.WordChoice Consider using 'deactivated, deselected, hidden, turned off, unavailable' instead of 'disabled', unless the term is in the UI.
packages/chargeback/changelog.yml 21 Elastic.WordChoice Consider using 'deactivated, deselected, hidden, turned off, unavailable' instead of 'disabled', unless the term is in the UI.
packages/chargeback/changelog.yml 34 Elastic.Wordiness Consider using 'all' instead of 'all of '.
packages/chargeback/manifest.yml 99 Elastic.WordChoice Consider using 'deactivate, deselect, hide, turn off' instead of 'Disable', unless the term is in the UI.

The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale.

@JohannesMahne
JohannesMahne requested a max review from Copilot November 12, 2026 15:03
@qcorporation qcorporation added documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. enhancement New feature or request labels Nov 12, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Unresolved critical compatibility, migration, and collection defects can halt existing pipelines and produce missing, duplicated, or incorrectly allocated chargeback costs.

27 open issues

And 7 more that still need to be addressed.

What changed in this PR

Updates Chargeback to 0.6.0 with native Elastic Agent CEL collection, reducing its reliance on separate billing and monitoring collectors while retaining its transform-based cost-allocation architecture.

Changes:

  • Adds billing, index-usage, and node-utilization streams with shared credentials and per-stream Fleet settings.
  • Updates continuous transforms and lookup fields, adding aliases intended for stock ESS Billing and Elasticsearch Consumption dashboards.
  • Redesigns the Configuration dashboard and updates setup documentation, retention settings, and release metadata.
File Description
packages/​chargeback/​manifest.yml Bumps the version and defines shared CEL connection settings.
packages/​chargeback/​lifecycle.yml Defines 365-day package retention.
packages/​chargeback/​kibana/​dashboard/​chargeback-7ec9743a-ccfa-43d2-8311-2f25893dadae.json Replaces configuration charts with coverage, deployment status, and setup panels.
packages/​chargeback/​elasticsearch/​transform/​cluster_tier_contribution/​transform.yml Switches tier aggregation to native usage collection.
packages/​chargeback/​elasticsearch/​transform/​cluster_tier_and_ds_contribution/​transform.yml Updates detailed usage aggregation and adds monitoring aliases.
packages/​chargeback/​elasticsearch/​transform/​cluster_tier_and_ds_contribution/​fields/​fields.yml Adds correlation keys and monitoring-compatible fields.
packages/​chargeback/​elasticsearch/​transform/​cluster_deployment_contribution/​transform.yml Updates deployment usage sources and synchronization.
packages/​chargeback/​elasticsearch/​transform/​cluster_datastream_contribution/​transform.yml Updates data-stream usage sources and synchronization.
packages/​chargeback/​elasticsearch/​transform/​cluster_capacity_utilization/​transform.yml Uses native node samples for daily utilization aggregation.
packages/​chargeback/​elasticsearch/​transform/​chargeback_conf_lookup/​transform.yml Continuously aggregates settings from the three collection streams.
packages/​chargeback/​elasticsearch/​transform/​billing_realized_pool/​transform.yml Updates allocatable billing sources and synchronization.
packages/​chargeback/​elasticsearch/​transform/​billing_cluster_cost/​transform.yml Adds billing compatibility aggregations and dashboard aliases.
packages/​chargeback/​elasticsearch/​transform/​billing_cluster_cost/​fields/​fields.yml Declares ESS Billing, credit, and cloud compatibility fields.
packages/​chargeback/​docs/​README.md Updates published collection and Fleet configuration guidance.
packages/​chargeback/​data_stream/​usage/​manifest.yml Defines usage collection and allocation-weight controls.
packages/​chargeback/​data_stream/​usage/​lifecycle.yml Defines 365-day usage retention.
packages/​chargeback/​data_stream/​usage/​fields/​fields.yml Declares collected index metrics and allocation settings.
packages/​chargeback/​data_stream/​usage/​fields/​base-fields.yml Declares usage stream identity and timestamp fields.
packages/​chargeback/​data_stream/​usage/​elasticsearch/​ingest_pipeline/​default.yml Normalizes usage records, filters indices, and fingerprints events.
packages/​chargeback/​data_stream/​usage/​agent/​stream/​cel.yml.hbs Discovers targets and harvests daily index-stat snapshots.
packages/​chargeback/​data_stream/​node_stats/​manifest.yml Defines node collection and utilization controls.
packages/​chargeback/​data_stream/​node_stats/​lifecycle.yml Defines 365-day node-stat retention.
packages/​chargeback/​data_stream/​node_stats/​fields/​fields.yml Declares node utilization metrics and configuration fields.
packages/​chargeback/​data_stream/​node_stats/​fields/​base-fields.yml Declares node-stat stream identity and timestamp fields.
packages/​chargeback/​data_stream/​node_stats/​elasticsearch/​ingest_pipeline/​default.yml Handles node collection errors and ingestion timestamps.
packages/​chargeback/​data_stream/​node_stats/​agent/​stream/​cel.yml.hbs Samples deployment JVM and filesystem metrics every 15 minutes.
packages/​chargeback/​data_stream/​lookup/​lifecycle.yml Defines 365-day lookup-stream retention.
packages/​chargeback/​data_stream/​lookup/​elasticsearch/​ingest_pipeline/​usage.yml Adds monitoring-compatible fields and numeric timestamp handling.
packages/​chargeback/​data_stream/​lookup/​elasticsearch/​ingest_pipeline/​realized_pool.yml Supports numeric timestamps when constructing correlation keys.
packages/​chargeback/​data_stream/​lookup/​elasticsearch/​ingest_pipeline/​chargeback_conf.yml Unpacks per-stream settings and supplies configuration defaults.
packages/​chargeback/​data_stream/​lookup/​elasticsearch/​ingest_pipeline/​capacity_utilization.yml Supports numeric timestamps in utilization correlation keys.
packages/​chargeback/​data_stream/​lookup/​elasticsearch/​ingest_pipeline/​billing.yml Populates ESS-compatible billing, credit, and cloud fields.
packages/​chargeback/​data_stream/​billing/​manifest.yml Defines billing collection, currency, rate, and credit controls.
packages/​chargeback/​data_stream/​billing/​lifecycle.yml Defines 365-day billing retention.
packages/​chargeback/​data_stream/​billing/​fields/​fields.yml Declares billing facts, metadata, credits, and currency settings.
packages/​chargeback/​data_stream/​billing/​fields/​base-fields.yml Declares billing stream identity and timestamp fields.
packages/​chargeback/​data_stream/​billing/​elasticsearch/​ingest_pipeline/​default.yml Normalizes billing records and creates deduplication IDs.
packages/​chargeback/​data_stream/​billing/​agent/​stream/​cel.yml.hbs Collects daily billing, metadata, and optional credit summaries.
packages/​chargeback/​changelog.yml Records the 0.6.0 enhancement release.
packages/​chargeback/​_dev/​build/​docs/​README.md Updates the documentation source for the new collection model.

Review effort: Max

@github-actions

This comment has been minimized.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The usage CEL program cannot compile, and unresolved aggregation and configuration defects can inflate usage, overwrite manual settings, and misallocate costs.

17 open issues
27 resolved since last review

And 7 more resolved.

Review effort: Max

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Unresolved critical configuration and migration defects can overwrite manual settings, multiply historical charges, break allocation queries, and hide billing history after upgrades.

9 open issues
17 resolved since last review

Review effort: Max

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Unresolved critical defects can break transform searches, misstate billing and usage, and allow stale configuration snapshots to re-enable writes that overwrite manual settings.

14 open issues
9 resolved since last review

Review effort: Max

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Unresolved critical defects in usage counters, native-data coverage, and billing synchronization can distort cost allocations and omit newly collected bills.

9 open issues
14 resolved since last review

Review effort: Max

@JohannesMahne JohannesMahne changed the title [chargeback] Self-contained CEL collection, per-data-stream UI config, and ESS/ES symlink aliases (0.6.0) [chargeback] Self-contained CEL collection, per-data-stream UI config, and ESS/ES symlink aliases Nov 13, 2026
@JohannesMahne JohannesMahne changed the title [chargeback] Self-contained CEL collection, per-data-stream UI config, and ESS/ES symlink aliases [chargeback] Add Chargeback integration (initial release 0.1.0) Nov 13, 2026
@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Comment thread packages/chargeback/manifest.yml Resolved
@JohannesMahne JohannesMahne changed the title [chargeback] Add Chargeback integration (initial release 0.1.0) [chargeback] Self-contained CEL collection, per-data-stream UI config, and ESS/ES symlink aliases (0.6.0) Nov 13, 2026
@JohannesMahne
JohannesMahne requested a max review from Copilot November 13, 2026 13:42
@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

Changelog link mismatch — expected https://github.com/elastic/integrations/pull/22427 in the following file(s):

  • packages/chargeback/changelog.yml
  • packages/onprem_billing/changelog.yml

Tip

If expected, add the changelog-link-check:skip label to skip this check. Or, if an issue link was intended, use .../issues/<n> instead.

View Buildkite build
@JohannesMahne

@JohannesMahne

JohannesMahne commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Regarding #22427 (comment):

  1. Changelog PR links & changelog-link-check:skip: Both 0.6.0 entries in packages/chargeback/changelog.yml already reference https://github.com/elastic/integrations/pull/22427. Because packages/chargeback (0.1.0–0.6.0) is a new package relative to main, its preserved pre-0.6.0 release history appears as added lines in the diff and triggered the check. The changelog-link-check:skip label is applied (Build #53368 started seconds before the label landed, which is why the comment still fired there).
  2. Version must remain 0.6.0 (not 0.1.0): chargeback (0.1.0–0.5.0) is already in customer use from elastic/elasticsearch-chargeback, so keeping packages/chargeback at 0.6.0 is required for clean upgrades from 0.4.x/0.5.0.
  3. Scope clarification: packages/onprem_billing has been removed from this PR (690dd0b3aa) — On-Premises Billing remains a standalone custom .zip integration in elastic/elasticsearch-chargeback.

@luizgpsantos luizgpsantos left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review — Chargeback 0.6.0 self-collection

Code review of the new packages/chargeback package (CEL billing/usage/node_stats + transforms/lookups). Packaging path looks much healthier than earlier chargeback history (pipelines under data streams, keyword composite_key, versioned lookup aliases, secret redact).

Must fix

  1. Billing discovery 404 treated as success — Deployments _search 404 → { ok: true, items: [] } lets the day advance without discovery data. Wrong base URL / missing route permanently under-attributes tags/region. (suggestion attached)
  2. Usage _shards.failed blocks deltas for the whole cluster — Partial shard failure keeps stale baselines. If it persists >24h, the next healthy poll emits a usage_observation_gap and no deltas; after >48h the baselines expire and the window is lost with no gap event at all. Needs a deliberate redesign (soft-fail / bounded hold) — left for author.

Should fix

  1. No fingerprint _id on billing line items — credits fingerprint; line items don't → replay/cursor loss can double-count. (suggestion attached, mirror ess_billing)
  2. Auth key fallback doesn't short-circuit (usage + node_stats) — on 401/403 every remaining key is requested even after one succeeds, and the working key isn't persisted, so each poll repeats the failing attempts. Prefer ordered short-circuit + cache last-good key. Left for author.
  3. Conf transform sources — the 5m transform scans monitoring/metricbeat indices it never matches. Asked whether they're only needed to start the transform on monitoring-only assets installs, and whether that can be done more cheaply. (question, example source list attached)
  4. Legacy conf can clobber manual edits — with no Fleet snapshots, a transform reset/reinstall (e.g. package upgrade) re-applies the legacy chargeback_conf_lookup* row over manual _id: config edits. Docs should require deleting the legacy index after carry-over. Left for author (docs).
  5. New-group alert — filter empty deployment_group (untagged deployments are normalized to ""). (suggestion attached)

Nits

  • node_stats (and billing) error docs terminate before event.ingested is set; usage stamps it first. (suggestion attached)
  • Missing-usage alert: join via composite_key::keyword like the dashboards, for consistency. (suggestion attached)
  • Serverless counter resets drop post-reset activity for one interval — noted only; the single-copy recovery must stay ECH-only (Serverless sc: 1 is synthetic, so removing the gate would over-count).
  • Credits missing → 0.0 looks fully consumed; a real fix needs transform support (null would drop the credit line), so noted only.

Looks solid

  • Version kept at 0.6.0 (upgrade-compatible with prior customer installs)
  • Pipelines under data streams (Fleet zip-safe)
  • Reset-aware usage baselines, midnight split, tier-arrival doesn’t dump lifetime
  • Retryable billing failures generally hold cursor
  • Keys not written into events; CEL state secret redact

Requesting changes on the two must-fixes. Inline suggestion blocks are included where the patch is localized; items 2, 4, 5, and 6 need author-owned design/docs.

Comment thread packages/chargeback/docs/README.md Resolved
@JohannesMahne

Copy link
Copy Markdown
Contributor Author

@luizgpsantos Thanks for the thorough review — all must-fix, should-fix, and consistency items from review #5959422050 are addressed in 956bd5b0f0:

  • Discovery 404 (billing & usage): ECH deployments/_search 404 now returns ok: false, retryable: false with a structured 404 error event instead of empty-ok (Serverless project-list 404s stay empty-ok).
  • Usage _shards.failed > 0 redesign (usage CEL + fields.yml + docs): Soft-fails by emitting error.code: "partial_shard_stats" alongside best-effort deltas tagged with elasticsearch.index.partial_shard_stats: true (filtering partial_empty zero-shard indices), bounds unrefreshed baseline hold to 24h, and explicitly emits usage_observation_gap upon expiry.
  • Billing line item _id fingerprint: Added fingerprint_billing_line_item on ctx.doc_type == 'billing_line_item' (including ess.billing.deployment_name to keep unassociated rows distinct).
  • Ordered auth fallback short-circuit & cursor caching (usage & node_stats): Tries up to 8 candidate keys via an 8-branch ternary chain that stops at the first non-401/403 response and caches the working key index per target under cursor.good_key_idx (integers only).
  • Transform source narrowing & upgrade docs (chargeback_conf_lookup + README.md): Dropped .monitoring-es-*, metricbeat-*, metrics-elasticsearch.stack_monitoring.node_stats*, and monitoring-indices* from chargeback_conf_lookup/transform.yml; updated README.md to require DELETE chargeback_conf_lookup* after verifying carry-over.
  • Pipeline ordering & alerting rules: Moved set_event_ingested before data_collection_error terminate in node_stats and billing; filtered empty/null deployment_group in chargeback-new-group-detected.json and aligned ck = composite_key::keyword in chargeback-deployment-missing-usage-data.json.
  • CEL script tests added & verified:
    • packages/chargeback/data_stream/billing/_dev/test/scripts/discovery_404.txt
    • packages/chargeback/data_stream/node_stats/_dev/test/scripts/auth_key_short_circuit.txt
    • packages/chargeback/data_stream/usage/_dev/test/scripts/partial_shard_stats.txt

Ran locally against Elastic Stack 9.2.0: elastic-package check, elastic-package links check, vale, elastic-package test static, elastic-package test pipeline (18/18), elastic-package test policy (6/6 after regenerating .expected), elastic-package test script (3/3), and elastic-package test system (3/3).

- custom
conditions:
kibana:
version: "^9.2.0"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is there a reason we are requiring this kibana version? also for format_version on the spec?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, that is required for the Lookup JOINs to work.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Following up on format_version: 3.5.0: we use 3.5.0 for kibana/alerting_rule_template/ assets alongside deployment_modes (agentless: false) and elasticsearch.source_mode: synthetic on the metrics data streams.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks for adding the system test on the data streams; when running system tests with --generate flag we can create the snapshot of a sample event we like to keep on the package

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 9faef28 — ran elastic-package test system --generate to add sample_event.json (billing_line_item, index_usage, and node_sample) across billing, usage, and node_stats, and rebuilt docs/README.md.

target: labels
fields:
test_run_id: "{{Test.RunID}}"
assert:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

could we also assert on system tests any field we must have on this data stream? https://github.com/elastic/elastic-package/blob/main/docs/howto/system_testing.md assert.fields_present

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added assert.fields_present in 9faef28 across node_stats, billing, and usage test-default-config.yml covering the required identity, metric, and configuration snapshot fields for each data stream.

@luizgpsantos luizgpsantos left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All review items are addressed. The partial-shard fix in 9faef28 skips indices listed in _shards.failures[] and adds the sc/psc drop fallback, so baselines are preserved across a failed poll, and the 3-poll script test asserts exact recovery deltas. Thanks @JohannesMahne!

Comment thread packages/chargeback/manifest.yml Resolved
title: "Chargeback Lookup Pipelines"
type: logs
dataset: chargeback.lookup
streams: []

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Same as it was reported in #22351, this data stream does not contain any streams configured (nor inputs).
It looks like that is just for the Ingest pipelines. Do you want to keep this as it is ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We would like to keep data_stream/lookup (streams: []) as a pipeline and pipeline-test container for two technical reasons:

  1. Moving the pipelines to package-root elasticsearch/ingest_pipeline/ fails Kibana's custom .zip Fleet upload validator (isTopLevelPipeline, [Fleet] Validate uploaded packages before install kibana#286094) and loses elastic-package test pipeline support ([Meta] Validation of transforms defined in packages elastic-package#2394).
  2. Moving them into billing/usage/node_stats would either drop the 6 lookup pipeline unit tests under data_stream/lookup/_dev/test/pipeline/ (since test pipeline invokes only default.yml per data stream) or require adding lookup fields and ess_billing.* routing rules onto live data stream templates.

Keeping data_stream/lookup also preserves logs-chargeback.lookup-* pipeline names and logs-chargeback.lookup-*@custom upgrade hooks from 0.4.7/0.5.0.

Comment thread packages/chargeback/manifest.yml Resolved
Comment thread packages/chargeback/changelog.yml Resolved
@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

💚 Build Succeeded

History

@JohannesMahne

Copy link
Copy Markdown
Contributor Author

@mrodm Hi Mario - all review threads (including the routing_rules.yml follow-up) have been addressed and all CI checks are green on fa0ed31000. When you have a moment, could you please complete the review so we can get this merged? Thanks!

@teresaromero teresaromero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks!

@mrodm mrodm left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for addressing all the comments!

Comment thread .github/CODEOWNERS
/packages/otel_rum_dashboards @elastic/apm-agent-rum
/packages/otel_android_dashboards @elastic/apm-agent-android @elastic/obs-signals-traces-approvers
/packages/otel_ios_dashboards @elastic/apm-agent-ios @elastic/obs-signals-traces-approvers
/packages/chargeback @elastic/customer-architects

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It would be better to add this code owner entry ordered alphabetically with respect to the other packges.

@JohannesMahne
JohannesMahne merged commit ea14f2a into main Nov 25, 2026
25 checks passed
@JohannesMahne
JohannesMahne deleted the feat/chargeback-0.6.0-self-collection branch November 25, 2026 13:44
@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

Package chargeback - 0.6.0 containing this change is available at https://epr.elastic.co/package/chargeback/0.6.0/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-link-check:skip documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. enhancement New feature or request 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.

7 participants