Skip to content

Commit

Permalink
docs: check db status in the quick start documentation (#1003)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicecui authored Jun 13, 2024
1 parent 69b08d8 commit a76bfb4
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 36 deletions.
30 changes: 25 additions & 5 deletions docs/nightly/en/getting-started/quick-start/prerequisites.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ services:
image: grafana/grafana-oss:<%grafana-version%>
container_name: grafana
ports:
- 3000:3000
- 127.0.0.1:3000:3000

greptime:
image: greptime/greptimedb:<%greptimedb-version%>
container_name: greptimedb
ports:
- 4000:4000
- 4001:4001
- 4002:4002
- 4003:4003
- 127.0.0.1:4000:4000
- 127.0.0.1:4001:4001
- 127.0.0.1:4002:4002
- 127.0.0.1:4003:4003
command: "standalone start --http-addr 0.0.0.0:4000 --rpc-addr 0.0.0.0:4001 --mysql-addr 0.0.0.0:4002 --postgres-addr 0.0.0.0:4003"
volumes:
- ./greptimedb:/tmp/greptimedb
Expand All @@ -38,3 +38,23 @@ docker-compose up
:::tip NOTE
The following steps assume that you have followed the documentation above, which uses Docker Compose to install GreptimeDB and Grafana.
:::

Once you've successfully started GreptimeDB,
you can verify the database status using the following command:

```shell
curl http://127.0.0.1:4000/status
```

If the database is running, you will see an output like the following:

```json
{
"source_time": "2024-05-30T07:59:52Z",
"commit": "05751084e7bbfc5e646df7f51bb7c3e5cbf16d58",
"branch": "HEAD",
"rustc_version": "rustc 1.79.0-nightly (f9b161492 2024-04-19)",
"hostname": "977898bbda4f",
"version": "0.8.1"
}
```
14 changes: 7 additions & 7 deletions docs/nightly/en/getting-started/quick-start/prometheus.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ services:
image: grafana/grafana-oss:<%grafana-version%>
container_name: grafana
ports:
- 3000:3000
- 127.0.0.1:3000:3000
greptime:
image: greptime/greptimedb:<%greptimedb-version%>
container_name: greptimedb
ports:
- 4000:4000
- 4001:4001
- 4002:4002
- 4003:4003
- 127.0.0.1:4000:4000
- 127.0.0.1:4001:4001
- 127.0.0.1:4002:4002
- 127.0.0.1:4003:4003
command: "standalone start --http-addr 0.0.0.0:4000 --rpc-addr 0.0.0.0:4001 --mysql-addr 0.0.0.0:4002 --postgres-addr 0.0.0.0:4003"
volumes:
- ./greptimedb:/tmp/greptimedb
Expand All @@ -57,15 +57,15 @@ services:
depends_on:
- node_exporter
ports:
- 9090:9090
- 127.0.0.1:9090:9090
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
node_exporter:
image: quay.io/prometheus/node-exporter:<%node-exporter-version%>
container_name: node_exporter_local
ports:
- 9100:9100
- 127.0.0.1:9100:9100
command:
- '--path.rootfs=/'
Expand Down
12 changes: 6 additions & 6 deletions docs/nightly/en/getting-started/quick-start/vector.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ services:
image: grafana/grafana-oss:<%grafana-version%>
container_name: grafana
ports:
- 3000:3000
- 127.0.0.1:3000:3000

greptime:
image: greptime/greptimedb:<%greptimedb-version%>
container_name: greptimedb
ports:
- 4000:4000
- 4001:4001
- 4002:4002
- 4003:4003
- 127.0.0.1:4000:4000
- 127.0.0.1:4001:4001
- 127.0.0.1:4002:4002
- 127.0.0.1:4003:4003
command: "standalone start --http-addr 0.0.0.0:4000 --rpc-addr 0.0.0.0:4001 --mysql-addr 0.0.0.0:4002 --postgres-addr 0.0.0.0:4003"
volumes:
- ./greptimedb:/tmp/greptimedb
Expand All @@ -51,7 +51,7 @@ services:
image: timberio/vector:<%vector-version%>
container_name: vector
ports:
- 8686:8686
- 127.0.0.1:8686:8686
volumes:
- ./vector.toml:/etc/vector/vector.toml:ro

Expand Down
29 changes: 24 additions & 5 deletions docs/nightly/zh/getting-started/quick-start/prerequisites.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ services:
image: grafana/grafana-oss:<%grafana-version%>
container_name: grafana
ports:
- 3000:3000
- 127.0.0.1:3000:3000

greptime:
image: greptime/greptimedb:<%greptimedb-version%>
container_name: greptimedb
ports:
- 4000:4000
- 4001:4001
- 4002:4002
- 4003:4003
- 127.0.0.1:4000:4000
- 127.0.0.1:4001:4001
- 127.0.0.1:4002:4002
- 127.0.0.1:4003:4003
command: "standalone start --http-addr 0.0.0.0:4000 --rpc-addr 0.0.0.0:4001 --mysql-addr 0.0.0.0:4002 --postgres-addr 0.0.0.0:4003"
volumes:
- ./greptimedb:/tmp/greptimedb
Expand All @@ -38,3 +38,22 @@ docker-compose up
:::tip 注意
接下来的步骤假设你按照上面的文档安装了 GreptimeDB 和 Grafana。
:::

当你成功启动 GreptimeDB 之后,可以使用以下命令验证数据库状态:

```shell
curl http://127.0.0.1:4000/status
```

如果数据库正在运行,你将看到类似如下的输出:

```json
{
"source_time": "2024-05-30T07:59:52Z",
"commit": "05751084e7bbfc5e646df7f51bb7c3e5cbf16d58",
"branch": "HEAD",
"rustc_version": "rustc 1.79.0-nightly (f9b161492 2024-04-19)",
"hostname": "977898bbda4f",
"version": "0.8.1"
}
```
14 changes: 7 additions & 7 deletions docs/nightly/zh/getting-started/quick-start/prometheus.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ services:
image: grafana/grafana-oss:<%grafana-version%>
container_name: grafana
ports:
- 3000:3000
- 127.0.0.1:3000:3000
greptime:
image: greptime/greptimedb:<%greptimedb-version%>
container_name: greptimedb
ports:
- 4000:4000
- 4001:4001
- 4002:4002
- 4003:4003
- 127.0.0.1:4000:4000
- 127.0.0.1:4001:4001
- 127.0.0.1:4002:4002
- 127.0.0.1:4003:4003
command: "standalone start --http-addr 0.0.0.0:4000 --rpc-addr 0.0.0.0:4001 --mysql-addr 0.0.0.0:4002 --postgres-addr 0.0.0.0:4003"
volumes:
- ./greptimedb:/tmp/greptimedb
Expand All @@ -57,15 +57,15 @@ services:
depends_on:
- node_exporter
ports:
- 9090:9090
- 127.0.0.1:9090:9090
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
node_exporter:
image: quay.io/prometheus/node-exporter:<%node-exporter-version%>
container_name: node_exporter_local
ports:
- 9100:9100
- 127.0.0.1:9100:9100
command:
- '--path.rootfs=/'
Expand Down
12 changes: 6 additions & 6 deletions docs/nightly/zh/getting-started/quick-start/vector.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ services:
image: grafana/grafana-oss:<%grafana-version%>
container_name: grafana
ports:
- 3000:3000
- 127.0.0.1:3000:3000

greptime:
image: greptime/greptimedb:<%greptimedb-version%>
container_name: greptimedb
ports:
- 4000:4000
- 4001:4001
- 4002:4002
- 4003:4003
- 127.0.0.1:4000:4000
- 127.0.0.1:4001:4001
- 127.0.0.1:4002:4002
- 127.0.0.1:4003:4003
command: "standalone start --http-addr 0.0.0.0:4000 --rpc-addr 0.0.0.0:4001 --mysql-addr 0.0.0.0:4002 --postgres-addr 0.0.0.0:4003"
volumes:
- ./greptimedb:/tmp/greptimedb
Expand All @@ -50,7 +50,7 @@ services:
image: timberio/vector:<%vector-version%>
container_name: vector
ports:
- 8686:8686
- 127.0.0.1:8686:8686
volumes:
- ./vector.toml:/etc/vector/vector.toml:ro

Expand Down

0 comments on commit a76bfb4

Please sign in to comment.