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: CHANGELOG.next.asciidoc
+1
Original file line number
Diff line number
Diff line change
@@ -304,6 +304,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff]
304
304
- Add `use_kubeadm` config option for filebeat (both filbeat.input and autodiscovery) in order to toggle kubeadm-config api requests {pull}40301[40301]
305
305
- Make HTTP library function inclusion non-conditional in CEL input. {pull}40912[40912]
306
306
- Add support for Crowdstrike streaming API to the streaming input. {issue}40264[40264] {pull}40838[40838]
307
+
- Add support to CEL for reading host environment variables. {issue}40762[40762] {pull}40779[40779]
Copy file name to clipboardexpand all lines: x-pack/filebeat/docs/inputs/input-cel.asciidoc
+29
Original file line number
Diff line number
Diff line change
@@ -245,6 +245,8 @@ As noted above the `cel` input provides functions, macros, and global variables
245
245
246
246
In addition to the extensions provided in the packages listed above, a global variable `useragent` is also provided which gives the user CEL program access to the {beatname_lc} user-agent string. By default, this value is assigned to all requests' user-agent headers unless the CEL program has already set the user-agent header value. Programs wishing to not provide a user-agent, should set this header to the empty string, `""`.
247
247
248
+
Host environment variables are made available via the global map `env`. Only environment variables that have been allow listed via the `allowed_environment` configuration list are visible to the CEL program.
249
+
248
250
The CEL environment enables the https://pkg.go.dev/github.com/google/cel-go/cel#OptionalTypes[optional types] library using the version defined {mito_docs}/lib#OptionalTypesVersion[here].
249
251
250
252
Additionally, it supports authentication via Basic Authentication, Digest Authentication or OAuth2.
@@ -357,6 +359,33 @@ filebeat.inputs:
357
359
})
358
360
----
359
361
362
+
[[environ-cel]]
363
+
[float]
364
+
=== `allowed_environment`
365
+
366
+
A list of host environment variable that will be made visible to the CEL execution environment. By default, no environment variables are visible.
367
+
368
+
["source","yaml",subs="attributes"]
369
+
----
370
+
filebeat.inputs:
371
+
# Publish the list of files in $PATH every minute.
0 commit comments