InfluxDB错误:在涌入更新1到2之后,默认保留策略未设置为Grafana的数据库

发布于 2025-02-11 18:05:51 字数 166 浏览 1 评论 0 原文

我已经更新了涌入数据库,还绘制了数据库。但是现在,我在Grafana中得到以下问题:

  • InfluxDB错误:未设置数据库
  • InfluxDB错误的默认保留策略:未执行

可能是原因?我通过通量获得值而没有任何问题。但是,我想继续使用InfluxQl

I have updated my Influx database and also mapped the databases. But now I get the following problem in Grafana:

  • InfluxDB Error: default retention policy not set for database
  • InfluxDB Error: not executed

What could be the reason? I get the values via Flux without any problems. However, I would like to continue using InfluxQL

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

长发绾君心 2025-02-18 18:05:51

In order to continue using InfluxQL you will need to setup the Database/Retention Policy mapping for your new 2.x buckets, so that InfluxQL can treat them like 1.x databases. Have you done this already?

紅太極 2025-02-18 18:05:51

引用的文档:

示例:

influx v1 dbrp create --default --bucket-id 520047e21111111 --db telegraf --rp default

我认为您可以将默认>默认更改为 aut> autogen (最后一个参数)。我使用默认是Grafana 9使用的? (未确认)。您在错误消息中看到了这一点:

influxdb错误:默认保留策略未设置为数据库

当然您需要为每个存储桶创建这样的映射。


也许您还会发现它也有用的示例连接Grafana 9.1 - >涌入2.4。

请参阅配置InfluxDB身份验证: https://docs.influxdata.com/influxdb/v2.1/tools/grafana/?t=influxql

您需要以这种格式通过授权>授权> >标题。里面有空间!

Token y0uR5uP3rSecr3tT0k3n

您可以在Infux Web GUI中产生令牌(它将很长,我认为Base64编码了?)

“ https://i.sstatic.net/iebt1.png” alt =“在此处输入图像说明”>

Docs to refer:
https://docs.influxdata.com/influxdb/cloud/query-data/influxql/dbrp/#create-dbrp-mappings

Example:

influx v1 dbrp create --default --bucket-id 520047e21111111 --db telegraf --rp default

I think you may change default to autogen (last parameter). I used default as it is used by Grafana 9? (Not confirmed). You see this in your error message:

InfluxDB Error: default retention policy not set for database

Of course you need create such mapping for each bucket you have.


Maybe you will find it also useful example connection Grafana 9.1 -> Influx 2.4.

enter image description here

See Configure InfluxDB authentication:: https://docs.influxdata.com/influxdb/v2.1/tools/grafana/?t=InfluxQL

In this format you need to pass Authorization header. With space in it!

Token y0uR5uP3rSecr3tT0k3n

You can generate token in Influx web GUI (it will be long and i think Base64 encoded?)

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文