From 9d3c77cad5e59f6b54f8d7cfe3c8fee3b59a2a6a Mon Sep 17 00:00:00 2001 From: fmassot Date: Wed, 20 Dec 2023 08:52:21 +0100 Subject: [PATCH] WIP --- docs/get-started/tutorials/tutorial-jaeger.md | 125 ++++++++++++++++++ .../add-full-text-search-to-your-olap-db.md | 0 .../send-logs/send-docker-logs.md | 2 +- 3 files changed, 126 insertions(+), 1 deletion(-) create mode 100644 docs/get-started/tutorials/tutorial-jaeger.md rename docs/{get-started/tutorials => guides}/add-full-text-search-to-your-olap-db.md (100%) diff --git a/docs/get-started/tutorials/tutorial-jaeger.md b/docs/get-started/tutorials/tutorial-jaeger.md new file mode 100644 index 00000000000..c144325987c --- /dev/null +++ b/docs/get-started/tutorials/tutorial-jaeger.md @@ -0,0 +1,125 @@ +--- +title: Tracing with Jaeger +sidebar_position: 1 +--- + +In this quick start guide, we will set up a Quickwit instance and analyze its own traces into Jaeger using Docker Compose. + +You only need a minute to get Jaeger working with Quickwit storage backend! + +![Quickwit UI Logs](../../assets/images/screenshot-quickwit-ui-docker-compose-logs.png) + + +## Start the OTEL collector and a Quickwit instance + +Let's use `docker compose` with the following configuration: + +```yaml title="docker-compose.yaml" +version: "3" + +services: + quickwit: + image: quickwit/quickwit:${QW_VERSION:-0.6.5} + volumes: + - ./qwdata:/quickwit/qwdata + ports: + - 7280:7280 + command: ["run"] + + jaeger: + user: "0" # Needed to access the directory /var/lib/docker/containers/ + image: otel/opentelemetry-collector-contrib:${OTEL_VERSION:-0.87.0} + volumes: + - ./otel-collector-config.yaml:/etc/otel-collector-config.yaml + - /var/lib/docker/containers:/var/lib/docker/containers:ro + command: ["--config=/etc/otel-collector-config.yaml"] +``` + + + +## Execute search queries + + +Let's start with a query on the field `title`: `title:search AND engine`: +```bash +curl "http://127.0.0.1:7280/api/v1/stackoverflow/search?query=title:search+AND+engine" +``` + +The same request can be expressed as a JSON query: +```bash +curl -XPOST "http://localhost:7280/api/v1/stackoverflow/search" -H 'Content-Type: application/json' -d '{ + "query": "title:search AND engine" +}' +``` + +This format is more verbose but it allows you to use more advanced features such as aggregations. The following query finds most popular tags used on the questions in this dataset: +```bash +curl -XPOST "http://localhost:7280/api/v1/stackoverflow/search" -H 'Content-Type: application/json' -d '{ + "query": "type:question", + "max_hits": 0, + "aggs": { + "foo": { + "terms":{ + "field":"tags", + "size": 10 + } + } + } +}' +``` + +As you are experimenting with different queries check out the server logs to see what's happening. + +:::note + +Don't forget to encode correctly the query params to avoid bad request (status 400). + +::: + + + +## Clean + +Let's do some cleanup by deleting the index: + + + + + +```bash +./quickwit index delete --index stackoverflow +``` + + + + + +```bash +curl -XDELETE http://127.0.0.1:7280/api/v1/indexes/stackoverflow +``` + + + + + +Congrats! You can level up with the following tutorials to discover all Quickwit features. + + +## TLDR + +Run the following command from within Quickwit's installation directory. + +```bash +curl -o stackoverflow-index-config.yaml https://raw.githubusercontent.com/quickwit-oss/quickwit/main/config/tutorials/stackoverflow/index-config.yaml +./quickwit index create --index-config ./stackoverflow-index-config.yaml +curl -O https://quickwit-datasets-public.s3.amazonaws.com/stackoverflow.posts.transformed-10000.json +./quickwit index ingest --index stackoverflow --input-path ./stackoverflow.posts.transformed-10000.json --force +./quickwit index search --index stackoverflow --query "search AND engine" +./quickwit index delete --index stackoverflow +``` + + +## Next tutorials + +- [Search on logs with timestamp pruning](/docs/get-started/tutorials/tutorial-hdfs-logs) +- [Setup a distributed search on AWS S3](/docs/get-started/tutorials/tutorial-hdfs-logs-distributed-search-aws-s3) diff --git a/docs/get-started/tutorials/add-full-text-search-to-your-olap-db.md b/docs/guides/add-full-text-search-to-your-olap-db.md similarity index 100% rename from docs/get-started/tutorials/add-full-text-search-to-your-olap-db.md rename to docs/guides/add-full-text-search-to-your-olap-db.md diff --git a/docs/log-management/send-logs/send-docker-logs.md b/docs/log-management/send-logs/send-docker-logs.md index 8e1609d0c52..c733fd3ad86 100644 --- a/docs/log-management/send-logs/send-docker-logs.md +++ b/docs/log-management/send-logs/send-docker-logs.md @@ -8,7 +8,7 @@ sidebar_position: 5 To send docker container logs into Quickwit, you just need to setup an OpenTelemetry Collector with the file logs receiver. In this tutorial, we will use `docker compose` to start the collector and Quickwit. -You only needs a minute to get you Quickwit log UI! +You only need a minute to get your Quickwit log UI! ![Quickwit UI Logs](../../assets/images/screenshot-quickwit-ui-docker-compose-logs.png)