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
docs/reference/filebeat: document run_as_cel and cel.* options
Add reference documentation for the run_as_cel option and the
cel.program, cel.state, cel.max_executions, cel.regexp, cel.xsd,
and cel.redact configuration fields. Includes a field mapping table,
a note on cursor state migration, and a worked example.
Copy file name to clipboardExpand all lines: docs/reference/filebeat/filebeat-input-httpjson.md
+118-1Lines changed: 118 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ applies_to:
12
12
13
13
Use the `httpjson` input to read messages from an HTTP API with JSON payloads.
14
14
15
-
If you are starting development of a new custom HTTP API input, we recommend that you use the [Common Expression Language input](/reference/filebeat/filebeat-input-cel.md) which provides greater flexibility and an improved developer experience.
15
+
If you are starting development of a new custom HTTP API input, we recommend that you use the [Common Expression Language input](/reference/filebeat/filebeat-input-cel.md) which provides greater flexibility and an improved developer experience. Existing `httpjson` inputs can be migrated to CEL using the [`run_as_cel`](#run-as-cel) option.
16
16
17
17
This input supports:
18
18
@@ -1728,6 +1728,123 @@ filebeat.inputs:
1728
1728
```
1729
1729
1730
1730
1731
+
### `run_as_cel` [run-as-cel]
1732
+
1733
+
```{applies_to}
1734
+
stack: ga 9.4.0
1735
+
```
1736
+
1737
+
When set to `true`, the input is transparently redirected to the [Common Expression Language input](/reference/filebeat/filebeat-input-cel.md). This allows an existing `httpjson` configuration to run under the CEL engine without changing the input `type`. A `cel.program` must be provided when this option is enabled.
1738
+
1739
+
Shared configuration fields are automatically translated to their CEL equivalents:
Fields that are specific to httpjson (such as `request.transforms`, `response.transforms`, `response.split`, `response.pagination`, and `chain`) are not transferred and have no effect when `run_as_cel` is enabled. The CEL program is responsible for equivalent logic.
1759
+
1760
+
If the httpjson input has existing cursor state, it is automatically carried over to the CEL input on the first run. On subsequent runs the CEL input uses its own stored cursor. Removing `run_as_cel` restores the original httpjson behaviour with its last cursor intact.
1761
+
1762
+
Default: `false`.
1763
+
1764
+
1765
+
### `cel.program` [cel-program]
1766
+
1767
+
```{applies_to}
1768
+
stack: ga 9.4.0
1769
+
```
1770
+
1771
+
The CEL program to execute when [`run_as_cel`](#run-as-cel) is enabled. This is the same program format used by the [CEL input's `program` field](/reference/filebeat/filebeat-input-cel.md). Required when `run_as_cel` is `true`.
1772
+
1773
+
1774
+
### `cel.state` [cel-state]
1775
+
1776
+
```{applies_to}
1777
+
stack: ga 9.4.0
1778
+
```
1779
+
1780
+
Initial state for the CEL program, equivalent to the [CEL input's `state` field](/reference/filebeat/filebeat-input-cel.md). May include an initial `cursor` object that is used as the bootstrap value on the first execution when no stored cursor exists.
1781
+
1782
+
1783
+
### `cel.max_executions` [cel-max-executions]
1784
+
1785
+
```{applies_to}
1786
+
stack: ga 9.4.0
1787
+
```
1788
+
1789
+
The maximum number of CEL program executions per interval. Equivalent to the [CEL input's `max_executions` field](/reference/filebeat/filebeat-input-cel.md). Default: `1000`.
1790
+
1791
+
1792
+
### `cel.regexp` [cel-regexp]
1793
+
1794
+
```{applies_to}
1795
+
stack: ga 9.4.0
1796
+
```
1797
+
1798
+
A map of named regular expression patterns available to the CEL program. Equivalent to the [CEL input's `regexp` field](/reference/filebeat/filebeat-input-cel.md).
1799
+
1800
+
1801
+
### `cel.xsd` [cel-xsd]
1802
+
1803
+
```{applies_to}
1804
+
stack: ga 9.4.0
1805
+
```
1806
+
1807
+
A map of named XSD schemas for XML decoding in the CEL program. Equivalent to the [CEL input's `xsd` field](/reference/filebeat/filebeat-input-cel.md).
1808
+
1809
+
1810
+
### `cel.redact` [cel-redact]
1811
+
1812
+
```{applies_to}
1813
+
stack: ga 9.4.0
1814
+
```
1815
+
1816
+
Redaction configuration for the CEL program. Equivalent to the [CEL input's `redact` field](/reference/filebeat/filebeat-input-cel.md).
1817
+
1818
+
::::{admonition} Example: migrating an httpjson input to CEL
0 commit comments