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: server/adaptors/integrations/__data__/repository/apache/info/INGESTION.md
+9-2
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,13 @@
1
1
# Ingestion Pipeline
2
-
To set up an ingestion pipeline, I used Docker to run Fluent-bit and an Apache fake log generator, along with an instance of OpenSearch.
2
+
3
+
To set up an ingestion pipeline, I used Docker to run Fluent-bit and an Apache fake log generator, along with an instance of OpenSearch.
3
4
4
5
## FluentBit and OpenSearch Setup
6
+
5
7
First, create a `docker-compose.yml` instance like [this](https://github.com/opensearch-project/data-prepper/blob/93d06db5cad280e2e4c53e12dfb47c7cbaa7b364/examples/log-ingestion/docker-compose.yaml). This will pull FluentBit and OpenSearch Docker images and run them in `opensearch-net` Docker network.
6
8
7
9
Next, use an Apache log generator to generate sample logs. I used `mingrammer/flog` in my `docker-compose.yml` file:
10
+
8
11
```
9
12
apache:
10
13
image: mingrammer/flog
@@ -23,6 +26,7 @@ Next, use an Apache log generator to generate sample logs. I used `mingrammer/fl
23
26
```
24
27
25
28
Then, create a `fluent-bit.conf` as follows:
29
+
26
30
```
27
31
[SERVICE]
28
32
Parsers_File parsers.conf
@@ -51,9 +55,11 @@ Then, create a `fluent-bit.conf` as follows:
51
55
Index ss4o_logs-apache-prod-sample
52
56
Suppress_Type_Name On
53
57
```
58
+
54
59
This creates a Fluent-Bit pipeline that forwards your generated apache logs through a parser to OpenSearch.
55
60
56
61
Create a `parsers.conf` file as follows:
62
+
57
63
```
58
64
[PARSER]
59
65
Name apache
@@ -66,6 +72,7 @@ Create a `parsers.conf` file as follows:
66
72
You can also use a [GeoIP2 Filter](https://docs.fluentbit.io/manual/pipeline/filters/geoip2-filter) to enrich the data with geolocation data.
67
73
68
74
Finally, I used a `otel-converter.lua` script to convert the parsed data into schema-compliant data:
75
+
69
76
```lua
70
77
localhexCharset="0123456789abcdef"
71
78
localfunctionrandHex(length)
@@ -96,7 +103,7 @@ function convert_to_otel(tag, timestamp, record)
0 commit comments