Skip to content

Commit 2167fac

Browse files
committed
Update Elastic-Agent Kafka settings
This commit updates the documentation from the Kafka output on standalone Elastic-Agent settings by removing the options that are not supported any more.
1 parent deb4272 commit 2167fac

File tree

1 file changed

+2
-55
lines changed

1 file changed

+2
-55
lines changed

docs/en/ingest-management/elastic-agent/configuration/outputs/output-kafka.asciidoc

+2-55
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ outputs:
3535
partition:
3636
round_robin:
3737
group_events: 1
38-
topics:
39-
- topic: '%{[fields.log_topic]}'
38+
topic: 'elastic-agent'
4039
headers: []
4140
timeout: 30
4241
broker_timeout: 30
@@ -196,7 +195,7 @@ include::output-shared-settings.asciidoc[tag=queue.mem.flush.timeout-setting]
196195
[[output-kafka-topics-settings]]
197196
== Topics settings
198197

199-
Use these options to dynamically set the Kafka topic for each {agent} event.
198+
Use these options to set the Kafka topic for each {agent} event.
200199

201200
[cols="2*<a"]
202201
|===
@@ -208,61 +207,9 @@ Use these options to dynamically set the Kafka topic for each {agent} event.
208207

209208
| The default Kafka topic used for produced events.
210209

211-
You can set the topic dynamically by using a format string to access any event field. For example, this configuration uses a custom field, `fields.log_topic`, to set the topic for each event:
212-
213-
[source,yaml]
214-
------------------------------------------------------------------------------
215-
topic: '%{[fields.log_topic]}'
216-
------------------------------------------------------------------------------
217-
218210
// =============================================================================
219211

220212
|
221-
[id="kafka-topics-setting"]
222-
`topics`
223-
224-
| One or more topic processors including a condition, the event value to check against, and the resulting Kafka topic.
225-
226-
Events that don't match against any defined processor are set to the default topic.
227-
228-
Rule settings:
229-
230-
`topic`::
231-
The topic format string to use. If this string contains field references, such as `%{[fields.name]}`, the fields must exist, or the rule fails.
232-
233-
`mappings`::
234-
A dictionary that takes the value returned by `topic` and maps it to a new name.
235-
236-
`default`::
237-
The default string value to use if `mappings` does not find a match.
238-
239-
`when`::
240-
A condition that must succeed in order to execute the current rule. Refer to <<processor-conditions,conditions>> in the Elastic Agent processor syntax for condition descriptions. Currently the equals, contains, and regexp conditions are available.
241-
242-
As an example for setting up your processors, you might want to route log events based on severity. To do so, you can specify a default topic for all events not matched by other processors:
243-
244-
[source,yaml]
245-
----
246-
outputs:
247-
kafka-output:
248-
type: kafka
249-
hosts:
250-
- 'kafka1:9092'
251-
- 'kafka2:9092'
252-
- 'kafka3:9092'
253-
topics:
254-
- topic: 'critical-%{[agent.version]}'
255-
when:
256-
contains:
257-
message: ' “CRITICAL”'
258-
- topic: 'error-%{[agent.version]}'
259-
when:
260-
contains:
261-
message: ' “ERR”'
262-
- topic: '%{[fields.log_topic]}'
263-
----
264-
265-
All non-critical and non-error events will then route to the default `%{[fields.log_topic]}` topic.
266213

267214
|===
268215

0 commit comments

Comments
 (0)