Skip to content

[BeyondTrust EPM][Event] Add Event data stream#18707

Merged
ShourieG merged 14 commits into
elastic:feature/beyondtrust_epm-0.1.0from
akshraj-crest:datastream-event
Jul 7, 2026
Merged

[BeyondTrust EPM][Event] Add Event data stream#18707
ShourieG merged 14 commits into
elastic:feature/beyondtrust_epm-0.1.0from
akshraj-crest:datastream-event

Conversation

@akshraj-crest

@akshraj-crest akshraj-crest commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Proposed commit message

The initial release includes event data stream, associated dashboard
and visualizations.

BeyondTrust EPM fields are mapped to their corresponding ECS fields where possible.

Test samples were derived from [product schema](https://docs.beyondtrust.com/epm-wm/reference/get_v3-events-search)

The entries in fields.yml are generated through an automation tool that uses the field mapping sheet as input.

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

How to test this PR locally

To test the BeyondTrust EPM package:

  • Clone integrations repo.
  • Install elastic package locally.
  • Start elastic stack using elastic-package.
  • Move to integrations/packages/beyondtrust_epm directory.
  • Run the following command to run tests.

elastic-package test

Run asset tests for the package
2026/04/29 19:31:56  INFO elastic-package v0.123.0 version-hash 8ae01073 (build time: 2026-04-23T14:23:10+05:30)
2026/04/29 19:31:56  INFO elastic-stack: 8.18.0
2026/04/29 19:31:56  INFO Import ECS mappings into the built package (technical preview)
--- Test results for package: beyondtrust_epm - START ---
╭─────────────────┬─────────────┬───────────┬──────────────────────────────────────────────────────────────────────────┬────────┬──────────────╮
│ PACKAGE         │ DATA STREAM │ TEST TYPE │ TEST NAME                                                                │ RESULT │ TIME ELAPSED │
├─────────────────┼─────────────┼───────────┼──────────────────────────────────────────────────────────────────────────┼────────┼──────────────┤
│ beyondtrust_epm │             │ asset     │ dashboard beyondtrust_epm-2ed6e850-d14a-4504-940c-49eb04afe9b8 is loaded │ PASS   │      2.042µs │
│ beyondtrust_epm │ event       │ asset     │ index_template logs-beyondtrust_epm.event is loaded                      │ PASS   │        263ns │
│ beyondtrust_epm │ event       │ asset     │ ingest_pipeline logs-beyondtrust_epm.event-0.1.0 is loaded               │ PASS   │        169ns │
╰─────────────────┴─────────────┴───────────┴──────────────────────────────────────────────────────────────────────────┴────────┴──────────────╯
--- Test results for package: beyondtrust_epm - END   ---
Done
Run pipeline tests for the package
2026/04/29 19:32:02  INFO elastic-package v0.123.0 version-hash 8ae01073 (build time: 2026-04-23T14:23:10+05:30)
2026/04/29 19:32:02  INFO elastic-stack: 8.18.0
--- Test results for package: beyondtrust_epm - START ---
╭─────────────────┬─────────────┬───────────┬───────────────────────────────────────────┬────────┬──────────────╮
│ PACKAGE         │ DATA STREAM │ TEST TYPE │ TEST NAME                                 │ RESULT │ TIME ELAPSED │
├─────────────────┼─────────────┼───────────┼───────────────────────────────────────────┼────────┼──────────────┤
│ beyondtrust_epm │ event       │ pipeline  │ (ingest pipeline warnings test-event.log) │ PASS   │ 324.937877ms │
│ beyondtrust_epm │ event       │ pipeline  │ test-event.log                            │ PASS   │ 3.606963615s │
╰─────────────────┴─────────────┴───────────┴───────────────────────────────────────────┴────────┴──────────────╯
--- Test results for package: beyondtrust_epm - END   ---
Done
Run policy tests for the package
2026/04/29 19:32:07  INFO elastic-package v0.123.0 version-hash 8ae01073 (build time: 2026-04-23T14:23:10+05:30)
2026/04/29 19:32:07  INFO elastic-stack: 8.18.0
--- Test results for package: beyondtrust_epm - START ---
No test results
--- Test results for package: beyondtrust_epm - END   ---
Done
Run script tests for the package
PKG beyondtrust_epm
[no test files]
--- Test results for package: beyondtrust_epm - START ---
No test results
--- Test results for package: beyondtrust_epm - END   ---
Done
Run static tests for the package
2026/04/29 19:32:07  INFO elastic-package v0.123.0 version-hash 8ae01073 (build time: 2026-04-23T14:23:10+05:30)
--- Test results for package: beyondtrust_epm - START ---
╭─────────────────┬─────────────┬───────────┬──────────────────────────┬────────┬──────────────╮
│ PACKAGE         │ DATA STREAM │ TEST TYPE │ TEST NAME                │ RESULT │ TIME ELAPSED │
├─────────────────┼─────────────┼───────────┼──────────────────────────┼────────┼──────────────┤
│ beyondtrust_epm │ event       │ static    │ Verify sample_event.json │ PASS   │ 1.112127705s │
╰─────────────────┴─────────────┴───────────┴──────────────────────────┴────────┴──────────────╯
--- Test results for package: beyondtrust_epm - END   ---
Done
Run system tests for the package
2026/04/29 19:32:08  INFO elastic-package v0.123.0 version-hash 8ae01073 (build time: 2026-04-23T14:23:10+05:30)
2026/04/29 19:32:08  INFO elastic-stack: 8.18.0
2026/04/29 19:32:08  INFO Installing package...
2026/04/29 19:32:08  INFO Import ECS mappings into the built package (technical preview)
2026/04/29 19:32:11  INFO Running test for data_stream "event" with configuration 'cel'
2026/04/29 19:32:20  INFO Setting up independent Elastic Agent...
2026/04/29 19:32:27  INFO Setting up service...
2026/04/29 19:32:51  INFO Validating test case...
2026/04/29 19:32:52  INFO Tearing down service...
2026/04/29 19:32:53  INFO Write container logs to file: /root/integrations/build/container-logs/beyondtrust_epm-1777471373092264526.log
2026/04/29 19:32:55  INFO Tearing down agent...
2026/04/29 19:32:55  INFO Write container logs to file: /root/integrations/build/container-logs/elastic-agent-1777471375877862227.log
2026/04/29 19:33:05  INFO Running test for data_stream "event" with configuration 'aws'
2026/04/29 19:33:13  INFO Setting up independent Elastic Agent...
2026/04/29 19:33:25  INFO Setting up service...
2026/04/29 19:37:04  INFO Validating test case...
2026/04/29 19:37:11  INFO Tearing down service...
2026/04/29 19:39:48  INFO Write container logs to file: /root/integrations/build/container-logs/beyondtrust_epm-1777471788462171479.log
2026/04/29 19:39:51  INFO Tearing down agent...
2026/04/29 19:39:52  INFO Write container logs to file: /root/integrations/build/container-logs/elastic-agent-1777471792021743600.log
2026/04/29 19:40:00  INFO Uninstalling package...
--- Test results for package: beyondtrust_epm - START ---
╭─────────────────┬─────────────┬───────────┬───────────┬────────┬────────────────╮
│ PACKAGE         │ DATA STREAM │ TEST TYPE │ TEST NAME │ RESULT │   TIME ELAPSED │
├─────────────────┼─────────────┼───────────┼───────────┼────────┼────────────────┤
│ beyondtrust_epm │ event       │ system    │ aws       │ PASS   │ 4m6.512296731s │
│ beyondtrust_epm │ event       │ system    │ cel       │ PASS   │  40.593195894s │
╰─────────────────┴─────────────┴───────────┴───────────┴────────┴────────────────╯
--- Test results for package: beyondtrust_epm - END   ---
Done

Related issues

Screenshots

Screenshot 2026-04-29 195551 Screenshot 2026-04-29 195611

Implementation Details

API Documentation: https://docs.beyondtrust.com/epm-wm/reference/get_v3-events-search

Default Config Values:

  • initial_interval: 24h
  • interval: 5m
  • page_size: 200

Limitations:

  • BeyondTrust EPM API supports complex query parameters with dot notation and array indexing(e.g., Pagination.PageSize, TimePeriod.StartDate).
  • These are not supported by the current mock server (Docker + config.yml) used for system testing.
  • Therefore, only basic pagination (single-page response) is implemented.

Note: The entries in fields.yml are generated through an automation tool that uses the field mapping sheet as input.

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown

Reviewers

Buildkite won't run for external contributors automatically; you need to add a comment:

  • /test : will kick off a build in Buildkite.

NOTE: https://github.com/elastic/integrations/blob/main/.buildkite/pull-requests.json contains all those details.

Comment thread packages/beyondtrust_epm/_dev/deploy/docker/files/config.yml Outdated
Comment thread packages/beyondtrust_epm/_dev/deploy/docker/files/config.yml Outdated
Comment thread packages/beyondtrust_epm/data_stream/event/agent/stream/cel.yml.hbs
Comment thread packages/beyondtrust_epm/changelog.yml
Comment thread packages/beyondtrust_epm/_dev/deploy/tf/main.tf
@andrewkroh andrewkroh added the documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. label Apr 29, 2026
Comment thread packages/beyondtrust_epm/data_stream/event/fields/fields.yml Outdated
@andrewkroh andrewkroh added the New Integration Issue or pull request for creating a new integration package. label May 11, 2026
@akshraj-crest akshraj-crest marked this pull request as ready for review May 27, 2026 05:38
@akshraj-crest akshraj-crest requested a review from a team as a code owner May 27, 2026 05:38
@andrewkroh andrewkroh removed the New Integration Issue or pull request for creating a new integration package. label May 27, 2026
Comment thread packages/beyondtrust_epm/manifest.yml Outdated
Comment thread packages/beyondtrust_epm/changelog.yml Outdated
{{#if http_client_timeout}}
resource.timeout: {{http_client_timeout}}
{{/if}}
resource.url: {{url}}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟠 HIGH data_stream/event/.../cel.yml.hbs:16

max_executions declared in event manifest but never rendered in CEL template

data_stream/event/manifest.yml (lines 33–40) declares the max_executions integration variable (type: integer, default: 1000), but data_stream/event/agent/stream/cel.yml.hbs does not render it anywhere. The sibling data_stream/audit/agent/stream/cel.yml.hbs:16-18 renders it with the standard {{#if max_executions}} max_executions: {{max_executions}} {{/if}} block, so the event stream silently drops the user-visible knob — users who change the value get no effect.

Recommendation:

{{#if http_client_timeout}}
resource.timeout: {{http_client_timeout}}
{{/if}}
{{#if max_executions}}
max_executions: {{max_executions}}
{{/if}}
resource.url: {{url}}

Insert the {{#if max_executions}} block before resource.url: to match the audit stream, or remove the unused variable from data_stream/event/manifest.yml.


🤖 AI-Generated Review | Vera Review Bot

⚠️ Automated review — verify suggestions before applying.

type: long
ignore_missing: true
on_failure:
-

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 MEDIUM data_stream/event/.../default.yml:11151

Dead preserve_duplicate_custom_fields guards left in event pipeline

Eight processors carry the guard if: ctx.tags == null || !ctx.tags.contains('preserve_duplicate_custom_fields') (lines 11151, 11163, 11182, 11194, 11210, 11229, 11241, 12254), but the event data stream never declares this variable in data_stream/event/manifest.yml and no test-common-config.yml sets the tag. The same PR explicitly removes this deprecated pattern from the audit data stream (manifest variable, test-common-config.yml, and pipeline guards all dropped), so leaving the guards only on the event side is inconsistent and propagates a deprecated pattern into newly introduced code.

Recommendation:

- foreach:
    field: beyondtrust_epm.event.file.elf.sections
    tag: foreach_file_elf_sections
    if: ctx.beyondtrust_epm?.event?.file?.elf?.sections instanceof List
    processor:
      remove:
        field:
          - _ingest._value.chi2
          # ...
        tag: remove_custom_duplicate_fields_from_file_elf_sections
        ignore_missing: true

Remove the if: ctx.tags == null || !ctx.tags.contains('preserve_duplicate_custom_fields') line from all 8 occurrences so the event pipeline matches the cleaned-up audit pipeline in this PR.


🤖 AI-Generated Review | Vera Review Bot

⚠️ Automated review — verify suggestions before applying.

copy_from: beyondtrust_epm.event.client.geo.country_name
ignore_empty_value: true
- convert:
field: beyondtrust_epm.event.client.geo.location.lat

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 MEDIUM data_stream/event/.../default.yml:364

Geo lat/lon converted to double but geo.location geo_point never assembled

The pipeline contains convert processors that coerce raw beyondtrust_epm.event.*.geo.location.lat / .lon strings into double (around lines 364, 1211, 3662, 4248, 5436), and data_stream/event/fields/fields.yml declares beyondtrust_epm.event.*.geo.location as geo_point. But the pipeline never combines those lat/lon scalars into the { "lat": ..., "lon": ... } object that Elasticsearch needs to index a geo_point, and it never copies the result into the corresponding ECS client.geo.location / host.geo.location / source.geo.location. As a result the geo_point fields fail to populate and downstream geo enrichment / map visualizations never receive coordinates.

Recommendation:

- script:
    tag: set_geo_location_from_lat_lon
    lang: painless
    if: ctx.beyondtrust_epm?.event?.client?.geo?.location?.lat != null && ctx.beyondtrust_epm?.event?.client?.geo?.location?.lon != null
    source: |
      ctx.beyondtrust_epm.event.client.geo.location = [
        'lat': ctx.beyondtrust_epm.event.client.geo.location.lat,
        'lon': ctx.beyondtrust_epm.event.client.geo.location.lon
      ];
- set:
    field: client.geo.location
    tag: set_client_geo_location
    copy_from: beyondtrust_epm.event.client.geo.location
    ignore_empty_value: true

Apply the same pattern for host.geo.location, source.geo.location, etc. wherever raw lat/lon pairs are converted to double.


🤖 AI-Generated Review | Vera Review Bot

⚠️ Automated review — verify suggestions before applying.

@andrewkroh andrewkroh added Integration:beyondtrust_epm [Integration not found in source] and removed Integration:beyondtrust_epm [Integration not found in source] labels May 27, 2026
@akshraj-crest akshraj-crest marked this pull request as draft June 10, 2026 00:34
@akshraj-crest akshraj-crest marked this pull request as ready for review June 18, 2026 05:53
@efd6

efd6 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

/test

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

Comment thread packages/beyondtrust_epm/data_stream/event/sample_event.json Outdated
Comment thread packages/beyondtrust_epm/_dev/build/docs/README.md
Comment thread packages/beyondtrust_epm/data_stream/event/agent/stream/cel.yml.hbs Outdated
@akshraj-crest akshraj-crest requested a review from efd6 July 2, 2026 07:35
@efd6

efd6 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

/test

@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

💚 Build Succeeded

History

@mergify

mergify Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@ShourieG ShourieG merged commit 6d42ed9 into elastic:feature/beyondtrust_epm-0.1.0 Jul 7, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation. Applied to PRs that modify *.md files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants