diff --git a/local-testing/logging-pipeline.md b/local-testing/logging-pipeline.md index 5f3202909..fae67d5c7 100644 --- a/local-testing/logging-pipeline.md +++ b/local-testing/logging-pipeline.md @@ -1,13 +1,12 @@ -# Running a Logging Pipeline Locally +# Run a logging pipeline locally -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. +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. -## Create a Configuration File +## Create a configuration file -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. - -`fluent-bit.conf`: +Start by creating a [Fluent Bit configuration file](/administration/configuring-fluent-bit/classic-mode/configuration-file) to test. +{% code title="fluent-bit.conf" %} ```text [INPUT] Name dummy @@ -18,13 +17,13 @@ Refer to the [Configuration File section](https://docs.fluentbit.io/manual/admin Host elasticsearch Replace_Dots On ``` +{% endcode %} -## Docker Compose - -Use [Docker Compose](https://docs.docker.com/compose/) to run Fluent Bit \(with the configuration file mounted\) and Elasticsearch. +## Use Docker Compose -`docker-compose.yaml`: +Use [Docker Compose](https://docs.docker.com/compose/) to run Fluent Bit (with the configuration file mounted) and Elasticsearch. +{% code title="docker-compose.yaml" %} ```yaml version: "3.7" @@ -42,10 +41,11 @@ services: environment: - discovery.type=single-node ``` +{% endcode %} ## View indexed logs -To view indexed logs run: +To view indexed logs, run the following command: ```bash curl "localhost:9200/_search?pretty" \ @@ -53,9 +53,10 @@ curl "localhost:9200/_search?pretty" \ -d'{ "query": { "match_all": {} }}' ``` -To "start fresh", delete the index by running: +## Reset index + +To reset your index, run the following command: ```bash curl -X DELETE "localhost:9200/fluent-bit?pretty" ``` -