Skip to content

Conversation

vishaangelova
Copy link
Contributor

@vishaangelova vishaangelova commented Oct 6, 2025

This PR fixes some errors in the Kafka output docs that fall under “Manage Elastic Agents with Fleet” and “Configure standalone Elastic Agents”.

It also adds an example for using a dynamic custom field as the topic value in the elastic-agent.yml config file and also for setting the dynamic custom field on the Fleet UI.

Copy link

github-actions bot commented Oct 6, 2025

🔍 Preview links for changed docs

@vishaangelova
Copy link
Contributor Author

vishaangelova commented Oct 7, 2025

@Supplementing, could you please have a look at the changes and the comments in this PR to make sure the information I have is correct for the Kafka output settings for Fleet-managed agents and for the standalone agents? Thank you!

* `event.dataset`

You can also set a custom field. This is useful if you need to construct a more complex or structured topic name.
You can also set a custom field. This is useful if you need to construct a more complex or structured topic name. For example, you can use the `fields.kafka_topic` custom field to set a dynamic topic for each event.
Copy link
Contributor Author

@vishaangelova vishaangelova Oct 7, 2025

Choose a reason for hiding this comment

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

This is the Kafka output doc under “Manage Elastic Agents in Fleet”. The description here needs to match what the user enters in the field on the UI, under Kafka output > Topics > Default topic > Dynamic Topic > Topic from field(s)

I wasn’t sure whether the user needs to wrap the custom field in ${} or %{[]} on the UI, but seeing that the dropdown list contained the ECS fields without these characters, I used the plain fields.kafka_topic here. Is that a correct assumption?

For example:

```yaml
topic: '${data_stream.type}'
Copy link
Contributor Author

@vishaangelova vishaangelova Oct 7, 2025

Choose a reason for hiding this comment

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

This is the Kafka output doc under “Configure standalone Elastic Agents”. I assume the topic settings need to be added in the elastic-agent.yml. Is it correct to provide the substitution variable wrapped in ${} (and not %{[]})?

@vishaangelova vishaangelova marked this pull request as ready for review October 7, 2025 09:21
@vishaangelova vishaangelova requested a review from a team as a code owner October 7, 2025 09:21
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.

1 participant