diff --git a/docs/VictoriaLogs/LogsQL.md b/docs/VictoriaLogs/LogsQL.md index fa37a3f734..332b009cf4 100644 --- a/docs/VictoriaLogs/LogsQL.md +++ b/docs/VictoriaLogs/LogsQL.md @@ -36,7 +36,7 @@ For example, the following query finds all the logs with `error` word: error ``` -See [how to send queries to VictoriaLogs](https://docs.victoriametrics.com/victorialogs/querying/). +It is recommended to use [vlogscli](https://docs.victoriametrics.com/victorialogs/querying/vlogscli/) for querying VictoriaLogs. If the queried [word](#word) clashes with LogsQL keywords, then just wrap it into quotes. For example, the following query finds all the log messages with `and` [word](#word): diff --git a/docs/VictoriaLogs/querying/README.md b/docs/VictoriaLogs/querying/README.md index d52f4c3e87..20ef6c700f 100644 --- a/docs/VictoriaLogs/querying/README.md +++ b/docs/VictoriaLogs/querying/README.md @@ -1,10 +1,10 @@ [VictoriaLogs](https://docs.victoriametrics.com/victorialogs/) can be queried with [LogsQL](https://docs.victoriametrics.com/victorialogs/logsql/) via the following ways: +- [Command-line interface](#command-line) +- [HTTP API](#http-api) - [Web UI](#web-ui) - a web-based UI for querying logs - [Grafana plugin](#visualization-in-grafana) -- [HTTP API](#http-api) -- [Command-line interface](#command-line) ## HTTP API @@ -828,7 +828,7 @@ curl http://localhost:9428/select/logsql/query -d 'query=error' If the command above returns "never-ending" response, then just press `ctrl+C` at any time in order to cancel the query. VictoriaLogs notices that the response stream is closed, so it cancels the query and stops consuming CPU, RAM and disk IO for this query. -Then just use `head` command for investigating the returned log messages and narrowing down the query: +Then use `head` command for investigating the returned log messages and narrowing down the query: ```sh curl http://localhost:9428/select/logsql/query -d 'query=error' | head -10 @@ -865,7 +865,8 @@ curl http://localhost:9428/select/logsql/query -d 'query=error AND "cannot open ``` Note that the `query` arg must be properly encoded with [percent encoding](https://en.wikipedia.org/wiki/URL_encoding) when passing it to `curl` -or similar tools. +or similar tools. It is highly recommended to use [vlogscli](https://docs.victoriametrics.com/victorialogs/querying/vlogscli/) - +it automatically performs all the needed encoding. The `pipe the query to "head" or "less" -> investigate the results -> refine the query` iteration can be repeated multiple times until the needed log messages are found.