You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: libbeat/docs/shared-autodiscover.asciidoc
+132-23
Original file line number
Diff line number
Diff line change
@@ -178,8 +178,8 @@ Configuration parameters:
178
178
* `node` or `namespace`: Specify labels and annotations filters for the extra metadata coming from node and namespace. By default all labels are included while annotations are not. To change default behaviour `include_labels`, `exclude_labels` and `include_annotations` can be defined. Those settings are useful when storing labels and annotations that require special handling to avoid overloading the storage output.
179
179
Note: wildcards are not supported for those settings.
180
180
The enrichment of `node` or `namespace` metadata can be individually disabled by setting `enabled: false`.
181
-
* `deployment`: If resource is `pod` and it is created from a `deployment`, by default the deployment name is added, this can be disabled by setting `deployment: false`.
182
-
* `cronjob`: If resource is `pod` and it is created from a `cronjob`, by default the cronjob name is added, this can be disabled by setting `cronjob: false`.
181
+
* `deployment`: If resource is `pod` and it is created from a `deployment`, by default the deployment name isn't added, this can be enabled by setting `deployment: true`.
182
+
* `cronjob`: If resource is `pod` and it is created from a `cronjob`, by default the cronjob name isn't added, this can be enabled by setting `cronjob: true`.
`unique`:: (Optional) Defaults to `false`. Marking an autodiscover provider as unique results into
@@ -203,39 +203,148 @@ Example:
203
203
Different Beats that refer to the same leader lease will be competitors in holding the lease
204
204
and only one will be elected as leader each time.
205
205
206
-
The configuration of templates and conditions is similar to that of the Docker provider. Configuration templates can
207
-
contain variables from the autodiscover event. They can be accessed under data namespace.
206
+
Configuration templates can contain variables from the autodiscover event. These variables can be accessed under the `data`
207
+
namespace, e.g. to access Pod IP: `${data.kubernetes.pod.ip}`.
208
208
209
-
These are the fields available within config templating. The `kubernetes.*` fields will be available on each emitted event.
209
+
These are the fields available within config templating. The `kubernetes.*` fields will be available on each emitted event:
210
210
211
211
[float]
212
212
====== Generic fields:
213
213
* host
214
-
* port (if exposed)
215
-
* kubernetes.labels
216
-
* kubernetes.annotations
217
214
218
215
[float]
219
216
====== Pod specific:
220
-
* kubernetes.container.id
221
-
* kubernetes.container.image
222
-
* kubernetes.container.name
223
-
* kubernetes.namespace
224
-
* kubernetes.node.name
225
-
* kubernetes.pod.name
226
-
* kubernetes.pod.uid
217
+
|===
218
+
|Key |Type |Description
219
+
220
+
|`port`
221
+
|`string`
222
+
|Pod port. If pod has multiple ports exposed should be used `ports.<port-name>` instead
223
+
224
+
|`kubernetes.namespace`
225
+
|`string`
226
+
|Namespace, where the Pod is running
227
+
228
+
|`kubernetes.namespace_uuid`
229
+
|`string`
230
+
|UUID of the Namespace, where the Pod is running
231
+
232
+
|`kubernetes.namespace_annotations.*`
233
+
|`object`
234
+
|Annotations of the Namespace, where the Pod is running. Annotations should be used in not dedoted format, e.g. `kubernetes.namespace_annotations.app.kubernetes.io/name`
235
+
236
+
|`kubernetes.pod.name`
237
+
|`string`
238
+
|Name of the Pod
239
+
240
+
|`kubernetes.pod.uid`
241
+
|`string`
242
+
|UID of the Pod
243
+
244
+
|`kubernetes.pod.ip`
245
+
|`string`
246
+
|IP of the Pod
247
+
248
+
|`kubernetes.labels.*`
249
+
|`object`
250
+
|Object of the Pod labels. Labels should be used in not dedoted format, e.g. `kubernetes.labels.app.kubernetes.io/name`
251
+
252
+
|`kubernetes.annotations.*`
253
+
|`object`
254
+
|Object of the Pod annotations. Annotations should be used in not dedoted format, e.g. `kubernetes.annotations.test.io/test`
255
+
256
+
|`kubernetes.container.name`
257
+
|`string`
258
+
|Name of the container
259
+
260
+
|`kubernetes.container.runtime`
261
+
|`string`
262
+
|Runtime of the container
263
+
264
+
|`kubernetes.container.id`
265
+
|`string`
266
+
|ID of the container
267
+
268
+
|`kubernetes.container.image`
269
+
|`string`
270
+
|Image of the container
271
+
272
+
|`kubernetes.node.name`
273
+
|`string`
274
+
|Name of the Node
275
+
276
+
|`kubernetes.node.uid`
277
+
|`string`
278
+
|UID of the Node
279
+
280
+
|`kubernetes.node.hostname`
281
+
|`string`
282
+
|Hostname of the Node
283
+
|===
227
284
228
285
[float]
229
286
====== Node specific:
230
-
* kubernetes.node.name
231
-
* kubernetes.node.uid
287
+
|===
288
+
|Key |Type |Description
289
+
290
+
|`kubernetes.labels.*`
291
+
|`object`
292
+
|Object of labels of the Node
293
+
294
+
|`kubernetes.annotations.*`
295
+
|`object`
296
+
|Object of annotations of the Node
297
+
298
+
|`kubernetes.node.name`
299
+
|`string`
300
+
|Name of the Node
301
+
302
+
|`kubernetes.node.uid`
303
+
|`string`
304
+
|UID of the Node
305
+
306
+
|`kubernetes.node.hostname`
307
+
|`string`
308
+
|Hostname of the Node
309
+
|===
232
310
233
311
[float]
234
312
====== Service specific:
235
-
* kubernetes.namespace
236
-
* kubernetes.service.name
237
-
* kubernetes.service.uid
238
-
* kubernetes.annotations
313
+
|===
314
+
|Key |Type |Description
315
+
316
+
|`port`
317
+
|`string`
318
+
|Service port
319
+
320
+
|`kubernetes.namespace`
321
+
|`string`
322
+
|Namespace of the Service
323
+
324
+
|`kubernetes.namespace_uuid`
325
+
|`string`
326
+
|UUID of the Namespace of the Service
327
+
328
+
|`kubernetes.namespace_annotations.*`
329
+
|`object`
330
+
|Annotations of the Namespace of the Service. Annotations should be used in not dedoted format, e.g. `kubernetes.namespace_annotations.app.kubernetes.io/name`
331
+
332
+
|`kubernetes.labels.*`
333
+
|`object`
334
+
|Object of the Service labels
335
+
336
+
|`kubernetes.annotations.*`
337
+
|`object`
338
+
|Object of the Service annotations
339
+
340
+
|`kubernetes.service.name`
341
+
|`string`
342
+
|Name of the Service
343
+
344
+
|`kubernetes.service.uid`
345
+
|`string`
346
+
|UID of the Service
347
+
|===
239
348
240
349
If the `include_annotations` config is added to the provider config, then the list of annotations present in the config
0 commit comments