Skip to content

Commit 8635ccf

Browse files
committed
Small improvements in README
1 parent 19d3262 commit 8635ccf

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,30 @@ docker run -d --name sql-to-logsql -p 8080:8080 -v /data/views \
4141
ghcr.io/victoriametrics/sql-to-logsql
4242
```
4343

44+
Here is the example with specified [config file](#configuration):
45+
46+
```bash
47+
cat > config.json << EOL
48+
{
49+
"listenAddr": ":8080",
50+
"endpoint": "https://play-vmlogs.victoriametrics.com",
51+
"bearerToken": "",
52+
"tables": {
53+
"logs": "*",
54+
"errors": "* | log.level:ERROR",
55+
"traces": "* | span_id:*"
56+
},
57+
"viewsDir": "/home/sql-to-logsql/data/views"
58+
}
59+
EOL
60+
61+
docker run -d --name sql-to-logsql -p 8080:8080 \
62+
-v /home/sql-to-logsql/data/views \
63+
-v ./config.json:/home/sql-to-logsql/config.json:ro \
64+
ghcr.io/victoriametrics/sql-to-logsql:v0.4.0 \
65+
--config=config.json
66+
```
67+
4468
### Run locally with Go
4569

4670
1. Install Go 1.25+, Node.js 18+ (Node 24 recommended, matching the Docker builder), and npm.
@@ -81,7 +105,7 @@ Example (`config.json`):
81105
```json
82106
{
83107
"listenAddr": ":8080",
84-
"endpoint": "https://victoria-logs.example.com",
108+
"endpoint": "https://play-vmlogs.victoriametrics.com",
85109
"bearerToken": "<VM_BEARER_TOKEN>",
86110
"tables": {
87111
"logs": "*",
@@ -100,6 +124,8 @@ Example (`config.json`):
100124
| `tables` | map[string]string | Mapping from SQL table name to LogsQL filter or pipeline fragment. Keys are case-insensitive. | `{ "logs": "*" }` |
101125
| `viewsDir` | string | Directory that stores `.logsql` files for views. Required for `CREATE VIEW`, `DROP VIEW`, and `SHOW VIEWS`. | `./data/views` |
102126

127+
Please note that VictoriaLogs is called via the backend, so if you are using sql-to-logsql in Docker, localhost refers to the localhost of the container, not your computer.
128+
103129
## SQL features and limits
104130

105131
Supported highlights:

0 commit comments

Comments
 (0)