influxdata / influxdata/kapacitor
Is there any workaround for fill(0) issue in influxDB
- Dominant language
- Go
- Stars
- 2.4k
- Forks
- 479
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 4
Description
The latest influxdb 1.0.2 has the issue https://github.com/influxdata/influxdb/issues/6967.
The health check alert works good for previous version influxdb (0.9.6)
Each host will send out heartbeat every 10s. The alert script will monitor a time window. And any host has no point in a window, the alert will be raised for that host.
So base on that, the alert query is something like
`SELECT sum(\"value\") as value FROM \"collectd\".\"default\".xxxxxxxxxx where time >= 'xxxxxxx' AND time < 'xxxxxxxx' GROUP BY host fill(0)`
in 0.9.6 the query result is :
`{
"results": [
{
"series": [
{
"name": "xxxxxxx",
"tags": {
"host": "host1"
},
"columns": [
"time",
"value"
],
"values": [
[
"timexxxxxxxxxxxxx",
24
]
]
},
{
"name": "xxxxxxx",
"tags": {
"host": "host2"
},
"columns": [
"time",
"value"
],
"values": [
[
"timexxxxxxxxxxx",
0
]
]
}
]
}
]
}`
but in 1.0.2:
`{
"results": [
{
"series": [
{
"name": "xx",
"tags": {
"host": "host1"
},
"columns": [
"time",
"value"
],
"values": [
[
"timexxxxxxxx",
24
]
]
}
]
}
]
}`
As you can see, "host2" is not in result and alert will not be triggered for "host2".
Contributor guide
Research direction
Start by reproducing the reported SELECT ... GROUP BY host fill(0) query against InfluxDB 0.9.6 and 1.0.2, then read the linked InfluxDB issue 6967. Determine whether a query or Kapacitor workaround preserves hosts with no points; done means host2 appears with a zero value so the alert can trigger.
Written by the indexing model from the issue text.
Assessment
- Domain
- observability
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100