Skip to content

Commit

Permalink
the zh docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nicecui committed Nov 28, 2024
1 parent d0e30ed commit c46a989
Show file tree
Hide file tree
Showing 10 changed files with 363 additions and 94 deletions.
2 changes: 1 addition & 1 deletion docs/getting-started/installation/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Follow these instructions to install GreptimeDB:
- [GreptimeDB Standalone](greptimedb-standalone.md) runs as a standalone system in a single process.
- [GreptimeDB Cluster](greptimedb-cluster.md) runs as a distributed, clustered time series database.

## Check database status
## Check database health

After starting GreptimeDB, you can check its status to ensure it is running.

Expand Down
30 changes: 15 additions & 15 deletions docs/user-guide/protocols/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,18 @@ http://localhost:4000/v1/sql

## Admin APIs

:::tip NOTE
These endpoint cannot be used in GreptimeCloud.
:::

### Check database health

You can use the `/health` endpoint to check the health of the GreptimeDB server.
For more information,
please refer to [Check Database Status](/getting-started/installation/overview.md#check-database-status).
please refer to [Check Database Health](/getting-started/installation/overview.md#check-database-health).

### Check Database Status

:::tip NOTE
This endpoint cannot be used in GreptimeCloud.
:::

You can use the `/status` endpoint to check the status of the GreptimeDB server.

```shell
Expand Down Expand Up @@ -99,10 +99,6 @@ which will be similar to the following:

### Get GreptimeDB server configuration

:::tip NOTE
This endpoint cannot be used in GreptimeCloud.
:::

You can use the `/config` endpoint to get the [TOML configuration](/user-guide/deployments/configuration.md#configuration-file-options) of the GreptimeDB server.

```shell
Expand Down Expand Up @@ -151,7 +147,7 @@ http://{{API-host}}/v1/sql?db={{db-name}}
- [`Authorization`](#authentication)
- [`X-Greptime-Timeout`](#timeout)
- `Content-Type`: `application/x-www-form-urlencoded`.
- `X-Greptime-Timezone`: The time zone for the current SQL query. Optional. Please refer to [time zone](/user-guide/protocols/http.md#time-zone).
- `X-Greptime-Timezone`: The time zone for the current SQL query. Optional. Please refer to [time zone](#time-zone).

### Query string parameters

Expand Down Expand Up @@ -385,7 +381,9 @@ For all the compatible APIs, please refer to the [Prometheus Query Language](/us

GreptimeDB also exposes an custom HTTP API for querying with PromQL, and returning
GreptimeDB's data frame output. You can find it on `/promql` path under the
current stable API version `/v1`. For example:
current stable API version `/v1`.
The return value of this API is in GreptimeDB's JSON format, not Prometheus's format.
For example:

```shell
curl -X GET \
Expand Down Expand Up @@ -499,7 +497,7 @@ curl -X POST \

### Headers

- `Authorization`: Unlike other APIs, the InfluxDB line protocol APIs use the InfluxDB authentication format. For V2, it is `token <username>:<password>`.
- `Authorization`: **Unlike other APIs**, the InfluxDB line protocol APIs use the InfluxDB authentication format. For V2, it is `token <username>:<password>`.

### Query string parameters

Expand All @@ -516,8 +514,10 @@ The InfluxDB line protocol data points. Please refer to the [InfluxDB Line Proto

Please refer to [InfluxDB Line Protocol](/user-guide/ingest-data/for-iot/influxdb-line-protocol.md) in the user guide.

## Mange Pipelines
## API for managing Pipelines

When writing logs to GreptimeDB, you can use HTTP APIs to manage the pipelines.
Please refer to the [Manage Pipelines](/user-guide/logs/manage-pipelines.md) documentation.
When writing logs to GreptimeDB,
you can use HTTP APIs to manage the pipelines.
For detailed information,
please refer to the [Manage Pipelines](/user-guide/logs/manage-pipelines.md) documentation.

6 changes: 3 additions & 3 deletions docs/user-guide/query-data/promql.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ curl -X POST \
--data-urlencode 'db=public' \
http://localhost:4000/v1/prometheus/api/v1/query_range
```
If authentication is enabled in GreptimeDB, the authentication header is required. Refer to the [authentication documentation](/user-guide/protocols/http.md#authentication) for more details.

The authentication header is required if you are using GreptimeDB with authentication enabled. Please refer to [authentication](/user-guide/protocols/http.md#authentication).
The query string parameters are the same as the original Prometheus API. The only difference is the additional `db` parameter, which specifies the GreptimeDB database name.
The query string parameters for the API are identical to those of the original Prometheus API, with the exception of the additional `db` parameter, which specifies the GreptimeDB database name.

The output compatible with the Prometheus API:
The output format is compatible with the Prometheus API:

```json
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- [GreptimeDB 单机模式](greptimedb-standalone.md)
- [GreptimeDB 分布式集群](greptimedb-cluster.md)

## 检查数据库状态
## 检查数据库健康状态

启动 GreptimeDB 后,你可以检查其状态以确保其正常运行。

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# 概述

* [数据类型](./data-types)
* [HTTP API](./http-api)
* [INSERT](./insert.md)
* [CAST](./cast.md)
* [COPY](./copy.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ http://localhost:4000/v1/sql?db=public
{ "code": 0, "output": [{ "affectedrows": 1 }], "execution_time_ms": 10 }
```

关于 SQL HTTP 请求的更多信息,请参考 [API 文档](/reference/sql/http-api.md)
关于 SQL HTTP 请求的更多信息,请参考 [API 文档](/user-guide/protocols/http.md#post-sql-语句)

## 时区

Expand Down
Loading

0 comments on commit c46a989

Please sign in to comment.