InfluxDB v2.1 - 任务已执行,但目标存储桶中没有写入任何内容
我正在使用 InfluxDB v2.1。
我有这个任务:
option task = {
name: "DOWNSAMPLE APRILIA UTILITIES",
cron: "0 * * * *",
}
from(bucket: "homeassistant-aprilia")
|> range(start: -2h, stop: -1h)
|> filter(fn: (r) => r["_measurement"] == "kWh")
|> filter(fn: (r) => r["_field"] == "value")
|> filter(fn: (r) => r.entity_id == "shellyem_c45bbe5fed52_channel_1_energy")
|> aggregateWindow(every: 1h, fn: max, createEmpty: false)
|> difference()
|> to(bucket: "downsample-utility-aprilia", org: "sineverba")
它每小时执行一次,但是......它不会在目标存储桶中写入任何内容。
我有所有成功日志,但目标存储桶中没有任何内容。
如果我直接在源存储桶中启动任务,我可以看到我感兴趣的价值。
其他,如果我不省略“to”值,则从存储桶手动启动它会写入数据。
为什么?
I'm working with InfluxDB v2.1.
I have this task:
option task = {
name: "DOWNSAMPLE APRILIA UTILITIES",
cron: "0 * * * *",
}
from(bucket: "homeassistant-aprilia")
|> range(start: -2h, stop: -1h)
|> filter(fn: (r) => r["_measurement"] == "kWh")
|> filter(fn: (r) => r["_field"] == "value")
|> filter(fn: (r) => r.entity_id == "shellyem_c45bbe5fed52_channel_1_energy")
|> aggregateWindow(every: 1h, fn: max, createEmpty: false)
|> difference()
|> to(bucket: "downsample-utility-aprilia", org: "sineverba")
it being executed every hour but... it doesn't write anything in the destination bucket.
I have all success logs but nothing in my destination bucket.
If I launch the task directly in source bucket, I can see the value of my interest.
Other, if I don't omit the "to" value, manually launched from bucket it writes the data.
Why?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有时,InfluxDB 无法写入,但不响应错误。在这些情况下,成功状态并不意味着数据已写入。这意味着数据已被接受写入,但稍后可能会失败。尝试检查
_monitoring
存储桶。该存储桶存储被拒绝的数据点和错误消息。例如,就我而言,这是架构不匹配。预期是一种类型,但收到的是另一种类型。我使用的是隐式模式,这意味着模式是由 InfluxDB 本身根据我放在那里的数据决定的。我通过明确模式解决了这个问题。在这种情况下,InfluxDB 在写入时立即返回错误。
Sometimes InfluxDB fails to write but doesn't respond with an error. In those cases, success status doesn't mean that the data was written. It means that data was accepted for writing but it might fail later. Try checking the
_monitoring
bucket. That bucket stores rejected data points with the error message.For example, in my case, it was a schema mismatch. One type was expected but another was received. I was using implicit schema which means that schema was decided by the InfluxDB itself based on the data I put there. I resolved this by making schema explicit. In this case, InfluxDB returns an error right away at the moment of writing.
最后,我现在用
stop
解决了:At the end, I solved with
stop
at now: