Skip to content

Conversation

@mrodm
Copy link
Contributor

@mrodm mrodm commented Dec 4, 2025

Fixes #2905

In order to be able to update the placeholders like Hostname and Port with the expected values, the service must be started in the SetUp method so it can update the variables in the configuration using those placeholders accordingly.

This PR ensures that the service is setup when the configuration is read and therefore policy variables are also set.

Example of error using elastic-package version v0.117.1:

Error: error running package system benchmarks: could not set up benchmark runner: could not create package policy (req {"name":"","description":"","namespace":"ep","policy_id":"a9024eda-09b5-4da0-a4e5-1e485f77c7cf","package":{"name":"sentinel_one","version":"2.0.0"},"inputs":{"sentinel_one-cel":{"enabled":false},"sentinel_one-httpjson":{"enabled":true,"vars":{"api_token":"xxxx","enable_request_tracer":true,"url":"http://:0"},"streams":{"sentinel_one.activity":{"enabled":true,"vars":{"preserve_original_event":true}}}}},"force":true}); API status code = 400; response body = {"statusCode":400,"error":"Bad Request","message":"Package policy is invalid: inputs.httpjson.vars.url: ["Invalid URL format"]"}

where the url is not rendering the variables ("url":"http://:0").

Including the fix in this PR:
URL rendered

Author's Checklist

  • Review system benchmark docs
  • Run system benchmarks and compare with previous implementation.

@mrodm mrodm self-assigned this Dec 4, 2025
@mrodm mrodm changed the title Start service in SetUp process to update placeholders in config [System benchmark] Start service in SetUp process to update placeholders in config Dec 4, 2025
@mrodm
Copy link
Contributor Author

mrodm commented Dec 9, 2025

/test

1 similar comment
@mrodm
Copy link
Contributor Author

mrodm commented Dec 10, 2025

/test

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @mrodm

@mrodm mrodm marked this pull request as ready for review December 12, 2025 11:01
@mrodm mrodm requested a review from a team December 12, 2025 11:01
@mrodm
Copy link
Contributor Author

mrodm commented Dec 12, 2025

@navnit-elastic could you test the changes in this PR to validate it works with the system benchmark you were working on in #2905 ?
Thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[system benchmarking] "Hostname" and "Port" placeholders evaluate to empty strings in scenario definition

2 participants