Skip to content

Commit

Permalink
docs: migrate from Prometheus (#1273)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicecui authored Nov 8, 2024
1 parent 24b7192 commit 93d9453
Show file tree
Hide file tree
Showing 8 changed files with 175 additions and 3 deletions.
31 changes: 31 additions & 0 deletions docs/db-cloud-shared/migrate/_migrate-from-prometheus.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
GreptimeDB can be used to store time series data for [Prometheus](https://prometheus.io/).
Additionally, GreptimeDB supports the Prometheus query language via its HTTP API.
This allows for an easy migration of your Prometheus long-term storage to GreptimeDB.

## Data model in difference

To understand the differences between the data models of Prometheus and GreptimeDB, please refer to the [Data Model](/user-guide/ingest-data/for-observerbility/prometheus.md#data-model) in the Ingest Data documentation.

## Prometheus Remote Write

<InjectContent id="remote-write" content={props.children}/>

## Prometheus HTTP API and PromQL

GreptimeDB supports the Prometheus query language (PromQL) via its HTTP API.
<InjectContent id="promql" content={props.children}/>

## Visualize data using Grafana

For developers accustomed to using Grafana for visualizing Prometheus data,
you can continue to use the same Grafana dashboards to visualize data stored in GreptimeDB.
<InjectContent id="grafana" content={props.children}/>


## Reference

For tutorials and user stories on integrating GreptimeDB with Prometheus, please refer to the following blog posts:

- [Setting Up GreptimeDB for Long-Term Prometheus Storage](https://greptime.com/blogs/2024-08-09-prometheus-backend-tutorial)
- [Scale Prometheus - Deploying GreptimeDB Cluster as Long-Term Storage for Prometheus in K8s](https://greptime.com/blogs/2024-10-07-scale-prometheus)
- [User Story — Why We Switched from Thanos to GreptimeDB for Prometheus Long-Term Storage](https://greptime.com/blogs/2024-10-16-thanos-migration-to-greptimedb)
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import DocTemplate from '../../db-cloud-shared/migrate/_migrate-from-prometheus.md'

# Migrate from Prometheus

<DocTemplate>

<div id="remote-write">

For information on configuring Prometheus to write data to GreptimeDB, please refer to the [remote write](/greptimecloud/integrations/prometheus.md#prometheus-remote-write) documentation.

</div>

<div id="promql">

For detailed information on querying data in GreptimeDB using Prometheus query language, please refer to the [HTTP API](/greptimecloud/integrations/prometheus.md#prometheus-http-api-and-promql) section in the PromQL documentation.

</div>

<div id="grafana">

To add GreptimeDB as a Prometheus data source in Grafana, please refer to the [Grafana](/greptimecloud/integrations/grafana.md#prometheus-data-source) documentation.

</div>

</DocTemplate>

26 changes: 26 additions & 0 deletions docs/user-guide/migrate-to-greptimedb/migrate-from-prometheus.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import DocTemplate from '../../db-cloud-shared/migrate/_migrate-from-prometheus.md'

# Migrate from Prometheus

<DocTemplate>

<div id="remote-write">

For information on configuring Prometheus to write data to GreptimeDB, please refer to the [remote write](/user-guide/ingest-data/for-observerbility/prometheus.md#remote-write-configuration) documentation.

</div>

<div id="promql">

For detailed information on querying data in GreptimeDB using Prometheus query language, please refer to the [HTTP API](/user-guide/query-data/promql.md#prometheus-http-api) section in the PromQL documentation.

</div>

<div id="grafana">

To add GreptimeDB as a Prometheus data source in Grafana, please refer to the [Grafana](/user-guide/integrations/grafana.md#prometheus-data-source) documentation.

</div>

</DocTemplate>

Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
GreptimeDB 可以用来存储 [Prometheus](https://prometheus.io/) 的时间序列数据。
此外,GreptimeDB 通过其 HTTP API 支持 Prometheus 查询语言。
这可以使你轻松将 Prometheus 的 long-term storage 切换到 GreptimeDB。

## 数据模型的区别

要了解 Prometheus 和 GreptimeDB 数据模型之间的差异,请参阅 Ingest Data 文档中的[数据模型](/user-guide/ingest-data/for-observerbility/prometheus.md#data-model)部分。

## Prometheus Remote Write

<InjectContent id="remote-write" content={props.children}/>

## Prometheus HTTP API 与 PromQL

GreptimeDB 通过其 HTTP API 支持 Prometheus 查询语言 (PromQL)。
<InjectContent id="promql" content={props.children}/>

## 使用 Grafana 可视化数据

对于习惯使用 Grafana 可视化 Prometheus 数据的开发人员,你可以继续使用相同的 Grafana 仪表板来可视化存储在 GreptimeDB 中的数据。
<InjectContent id="grafana" content={props.children}/>

## 参考阅读

请参考以下博客文章查看 GreptimeDB 与 Prometheus 的集成教程及用户故事:

- [如何配置 GreptimeDB 作为 Prometheus 的长期存储](https://greptime.com/blogs/2024-08-09-prometheus-backend-tutorial)
- [Scale Prometheus: K8s 部署 GreptimeDB 集群作为 Prometheus 长期存储](https://greptime.com/blogs/2024-10-07-scale-prometheus)
- [「用户故事」从 Thanos 到 GreptimeDB,我们实现了 Prometheus 高效长期存储](https://greptime.com/blogs/2024-10-16-thanos-migration-to-greptimedb)

Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

GreptimeCloud 与 GreptimeDB 完全兼容 Prometheus。这意味着你可以无缝地将 GreptimeCloud 用作 Prometheus 存储和查询的替代品。有关更多信息,请参阅 GreptimeDB 用户指南中的 [Prometheus 文档](https://docs.greptime.cn/user-guide/clients/prometheus)

## 远程写入
## Remote Write

GreptimeCloud 实例可以配置为 Prometheus 的[远程写入端点](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#remote_write)
GreptimeCloud 实例可以配置为 Prometheus 的 [Remote Write 端点](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#remote_write)

将以下部分添加到你的 prometheus 配置中:

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import DocTemplate from '../../db-cloud-shared/migrate/_migrate-from-prometheus.md'

# 从 Prometheus 迁移

<DocTemplate>

<div id="remote-write">

有关 Prometheus 将数据写入 GreptimeDB 的配置信息,请参阅 [Remote Write](/greptimecloud/integrations/prometheus.md#remote-write) 文档。

</div>

<div id="promql">

有关使用 Prometheus 查询语言在 GreptimeDB 中查询数据的详细信息,请参阅 PromQL 文档中的 [HTTP API](/greptimecloud/integrations/prometheus.md#prometheus-http-api-与-promql) 部分。

</div>

<div id="grafana">

要在 Grafana 中将 GreptimeDB 添加为 Prometheus 数据源,请参阅 [Grafana](/greptimecloud/integrations/grafana.md#prometheus-数据源) 的集成文档。

</div>

</DocTemplate>

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import DocTemplate from '../../db-cloud-shared/migrate/_migrate-from-prometheus.md'

# 从 Prometheus 迁移

<DocTemplate>

<div id="remote-write">

有关 Prometheus 将数据写入 GreptimeDB 的配置信息,请参阅 [Remote Write](/user-guide/ingest-data/for-observerbility/prometheus.md#配置-remote-write) 文档。

</div>

<div id="promql">

有关使用 Prometheus 查询语言在 GreptimeDB 中查询数据的详细信息,请参阅 PromQL 文档中的 [HTTP API](/user-guide/query-data/promql.md#prometheus-的-http-api) 部分。

</div>

<div id="grafana">

要在 Grafana 中将 GreptimeDB 添加为 Prometheus 数据源,请参阅 [Grafana](/user-guide/integrations/grafana#prometheus-数据源) 的集成文档。

</div>

</DocTemplate>
10 changes: 9 additions & 1 deletion sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ const sidebars: SidebarsConfig = {
'user-guide/migrate-to-greptimedb/migrate-from-influxdb',
'user-guide/migrate-to-greptimedb/migrate-from-mysql',
'user-guide/migrate-to-greptimedb/migrate-from-postgresql',
'user-guide/migrate-to-greptimedb/migrate-from-prometheus',
],
},
{
Expand Down Expand Up @@ -271,7 +272,14 @@ const sidebars: SidebarsConfig = {
},
],
},
{ type: 'category', label: 'Migrate to GreptimeCloud', items: ['greptimecloud/migrate-to-greptimecloud/migrate-from-influxdb'] },
{
type: 'category',
label: 'Migrate to GreptimeCloud',
items: [
'greptimecloud/migrate-to-greptimecloud/migrate-from-influxdb',
'greptimecloud/migrate-to-greptimecloud/migrate-from-prometheus',
]
},
{
type: 'category',
label: 'Usage & Billing',
Expand Down

0 comments on commit 93d9453

Please sign in to comment.