Skip to content

Commit bd4353c

Browse files
Merge pull request #1606 from fluent/alexakreizinger/sc-123154/update-local-testing-logging-pipeline-doc
2 parents 3e1154d + 1a8dfbf commit bd4353c

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

local-testing/logging-pipeline.md

+14-13
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
# Running a Logging Pipeline Locally
1+
# Run a logging pipeline locally
22

3-
You may wish to test a logging pipeline locally to observe how it deals with log messages. The following is a walk-through for running Fluent Bit and Elasticsearch locally with [Docker Compose](https://docs.docker.com/compose/) which can serve as an example for testing other plugins locally.
3+
You can test logging pipelines locally to observe how they handles log messages. This guide explains how to use [Docker Compose](https://docs.docker.com/compose/) to run Fluent Bit and Elasticsearch locally, but you can use the same principles to test other plugins.
44

5-
## Create a Configuration File
5+
## Create a configuration file
66

7-
Refer to the [Configuration File section](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit/classic-mode/configuration-file) to create a configuration to test.
8-
9-
`fluent-bit.conf`:
7+
Start by creating a [Fluent Bit configuration file](/administration/configuring-fluent-bit/classic-mode/configuration-file) to test.
108

9+
{% code title="fluent-bit.conf" %}
1110
```text
1211
[INPUT]
1312
Name dummy
@@ -18,13 +17,13 @@ Refer to the [Configuration File section](https://docs.fluentbit.io/manual/admin
1817
Host elasticsearch
1918
Replace_Dots On
2019
```
20+
{% endcode %}
2121

22-
## Docker Compose
23-
24-
Use [Docker Compose](https://docs.docker.com/compose/) to run Fluent Bit \(with the configuration file mounted\) and Elasticsearch.
22+
## Use Docker Compose
2523

26-
`docker-compose.yaml`:
24+
Use [Docker Compose](https://docs.docker.com/compose/) to run Fluent Bit (with the configuration file mounted) and Elasticsearch.
2725

26+
{% code title="docker-compose.yaml" %}
2827
```yaml
2928
version: "3.7"
3029

@@ -42,20 +41,22 @@ services:
4241
environment:
4342
- discovery.type=single-node
4443
```
44+
{% endcode %}
4545
4646
## View indexed logs
4747
48-
To view indexed logs run:
48+
To view indexed logs, run the following command:
4949
5050
```bash
5151
curl "localhost:9200/_search?pretty" \
5252
-H 'Content-Type: application/json' \
5353
-d'{ "query": { "match_all": {} }}'
5454
```
5555
56-
To "start fresh", delete the index by running:
56+
## Reset index
57+
58+
To reset your index, run the following command:
5759
5860
```bash
5961
curl -X DELETE "localhost:9200/fluent-bit?pretty"
6062
```
61-

0 commit comments

Comments
 (0)