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: solutions/observability/streams/management/extract.md
+41-28Lines changed: 41 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,17 +5,20 @@ applies_to:
5
5
---
6
6
# Extract fields [streams-extract-fields]
7
7
8
-
Unstructured log messages must be parsed into meaningful fields before you can filter and analyze them effectively. Commonly extracted fields include `@timestamp` and the `log.level`, but you can also extract information like IP addresses, usernames, and ports.
8
+
Extracting meaningful fields from your log messages lets you filter and analyze them effectively. For example, you might want to use [Discover](../../../../explore-analyze/discover.md) to filter for log messages with a `WARNING` or `ERROR`loglevel that occurred during a certain time period to diagnose an issue. If you haven't extracted log level and timestamp fields from your messages, you won't get meaningful results.
9
9
10
-
Use the **Processing** tab on the **Manage stream** page to process your data. The UI simulates your changes and provides an immediate preview that's tested end-to-end.
10
+
From the **Processing** tab, you can add the [processors](#streams-extract-processors) you need to extract these structured fields. The UI then simulates your changes and provides an immediate [preview](#streams-preview-changes) that's tested end-to-end.
11
11
12
-
The UI also shows indexing problems, such as mapping conflicts, so you can address them before applying changes.
12
+
The UI also shows when you have indexing problems, such as [mapping conflicts](#streams-processing-mapping-conflicts), so you can address them before applying changes.
13
+
14
+
After creating your processor, all future ingested data will be parsed into structured fields accordingly.
13
15
14
16
:::{note}
15
17
Applied changes aren't retroactive and only affect *future ingested data*.
-[Date](./extract/date.md): convert date strings into timestamps with options for timezone, locale, and output format settings.
@@ -27,21 +30,32 @@ Streams supports the following processors:
27
30
28
31
## Add a processor [streams-add-processors]
29
32
30
-
Streams uses {{es}} ingest pipelines to process your data. Ingest pipelines are made up of processors that transform your data.
33
+
Streams uses [{{es}} ingest pipelines](../../../../manage-data/ingest/transform-enrich/ingest-pipelines.md) made up of processors to transform your data, without requiring you to switch interfaces and manually update pipelines.
34
+
35
+
To add a processor from the **Processing** tab:
36
+
37
+
1. Select **Create** → **Create processor** to open a list of supported processors.
38
+
1. Select a processor from the **Processor** menu.
39
+
1. Configure the processor and select **Create** to save the processor.
31
40
32
-
To add a processor:
41
+
After adding all desired processors and conditions, make sure to **Save changes**.
33
42
34
-
1. Select **Add processor** to open a list of supported processors.
35
-
1. Select a processor from the list.
36
-
1. Select **Add Processor** to save the processor.
43
+
Refer to individual [supported processors](#streams-extract-processors) for more on configuring specific processors.
37
44
38
45
:::{note}
39
46
Editing processors with JSON is planned for a future release, and additional processors may be supported over time.
40
47
:::
41
48
42
49
### Add conditions to processors [streams-add-processor-conditions]
43
50
44
-
You can provide a condition for each processor under **Optional fields**. Conditions are boolean expressions that are evaluated for each document. Provide a field, a value, and a comparator.
51
+
You can provide a condition for each processor under **Optional fields**. Conditions are boolean expressions that are evaluated for each document.
52
+
53
+
To add a condition:
54
+
1. Select **Create** → **Create condition**.
55
+
1. Provide a **Field**, a **Value**, and a comparator. Expand the following dropdown for supported comparators.
56
+
1. Select **Create condition**.
57
+
58
+
After adding all desired processors and conditions, make sure to **Save changes**.
45
59
46
60
:::{dropdown} Supported comparators
47
61
Streams processors support the following comparators:
@@ -61,7 +75,7 @@ Streams processors support the following comparators:
61
75
62
76
### Preview changes [streams-preview-changes]
63
77
64
-
Under **Processors for field extraction**, when you set pipeline processors to modify your documents, **Data preview**shows you a preview of the results with additional filtering options depending on the outcome of the simulation.
78
+
After creating processors, the **Data preview**tab shows a preview of the results with additional filtering options depending on the outcome of the simulation.
65
79
66
80
When you add or edit processors, the **Data preview** updates automatically.
67
81
@@ -70,27 +84,26 @@ To avoid unexpected results, we recommend adding processors rather than removing
70
84
:::
71
85
72
86
**Data preview** loads 100 documents from your existing data and runs your changes using them.
73
-
For any newly added processors, this simulation is reliable. You can save individual processors during the preview, and even reorder them.
74
-
Selecting **Save changes** applies your changes to the data stream.
87
+
For any newly created processors and conditions, the preview is reliable. You can create and reorder individual processors and conditions during the preview.
75
88
76
-
If you edit the stream again, note the following:
77
-
- Adding more processors to the end of the list will work as expected.
78
-
- Changing existing processors or re-ordering them may cause unexpected results. Because the pipeline may have already processed the documents used for sampling, the UI cannot accurately simulate changes to existing data.
79
-
- Adding a new processor and moving it before an existing processor may cause unexpected results. The UI only simulates the new processor, not the existing ones, so the simulation may not accurately reflect changes to existing data.
89
+
Select **Save changes** to apply your changes to the data stream.
80
90
81
-

91
+
If you edit the stream after saving your changes, note the following:
92
+
- Adding more processors to the end of the list will work as expected.
93
+
- Editing or reordering existing processors may cause unexpected results. Because the pipeline may have already processed the documents used for sampling, **Data preview** cannot accurately simulate changes to existing data.
94
+
- Adding a new processor and moving it before an existing processor may cause unexpected results. **Data preview** only simulates the new processor, not the existing ones, so the simulation may not accurately reflect changes to existing data.
82
95
83
96
### Ignore failures [streams-ignore-failures]
84
97
85
-
Turn on **Ignore failure** to ignore the processor if it fails. This is useful if you want to continue processing the document even if the processor fails.
98
+
Each processor has the option to **Ignore failures**. When enabled, processing of the document continues when the processor fails.
Turn on **Ignore missing fields**to ignore the processor if the field is not present. This is useful if you want to continue processing the document even if the field is not present.
102
+
Dissect, grok, and rename processors include the **Ignore missing fields**option. When enabled, processing of the document continues when a source field is missing.
90
103
91
104
## Detect and handle failures [streams-detect-failures]
92
105
93
-
Documents fail processing for different reasons. Streams helps you to easily find and handle failures before deploying changes.
106
+
Documents fail processing for different reasons. Streams helps you to find and handle failures before deploying changes.
94
107
95
108
In the following screenshot, the **Failed** percentage shows that not all messages matched the provided Grok pattern:
96
109
@@ -104,11 +117,11 @@ Failures are displayed at the bottom of the process editor:
As part of processing, Streams also checks for mapping conflicts by simulating the change end to end. If a mapping conflict is detected, Streams marks the processor as failed and displays a failure message like the following:
124
+
As part of processing, Streams also checks for mapping conflicts by simulating the change end-to-end. When Streams detects a mapping conflict, it marks the processor as failed and displays a failure message like the following:
@@ -120,12 +133,12 @@ Once saved, the processor provides a quick look at the processor's success rate
120
133
121
134

122
135
123
-
## Advanced: How and where do these changes get applied to the underlying datastream? [streams-applied-changes]
136
+
## Advanced: How and where do these changes get applied to the underlying data stream? [streams-applied-changes]
124
137
125
-
When you save processors, Streams modifies the "bestmatching" ingest pipeline for the data stream. In short, Streams either chooses the bestmatching pipeline ending in `@custom` that is already part of your data stream, or it adds one for you.
138
+
When you save processors, Streams modifies the "best-matching" ingest pipeline for the data stream. In short, Streams either chooses the best-matching pipeline ending in `@custom` that is already part of your data stream, or it adds one for you.
126
139
127
140
Streams identifies the appropriate @custom pipeline (for example, `logs-myintegration@custom` or `logs@custom`).
128
-
It checks the default_pipeline that is set on the datastream.
141
+
It checks the `default_pipeline` that is set on the data stream.
129
142
130
143
You can view the default pipeline at **Manage stream** → **Advanced** under **Ingest pipeline**.
131
144
In this default pipeline, we locate the last processor that calls a pipeline ending in `@custom`. For integrations, this would result in a pipeline name like `logs-myintegration@custom`. Without an integration, the only `@custom` pipeline available may be `logs@custom`.
@@ -159,5 +172,5 @@ You can still add your own processors manually to the `@custom` pipeline if need
159
172
- Streams does not support all processors. We are working on adding more processors in the future.
160
173
- Streams does not support all processor options. We are working on adding more options in the future.
161
174
- The data preview simulation may not accurately reflect the changes to the existing data when editing existing processors or re-ordering them.
162
-
-Dots in field names are not supported. You can use the dot expand processor in the `@custom` pipeline as a workaround. You need to manually add the dot expand processor.
175
+
-Field names containing dots are not supported. You can use the dot expand processor in the `@custom` pipeline as a workaround. You need to manually add the dot expand processor.
163
176
- Providing any arbitrary JSON in the Streams UI is not supported. We are working on adding this in the future.
0 commit comments