Open jelliuk opened 3 years ago
@jelliuk does it work if you remove the ^
from the start of your pattern? Do you also see the last option smart_.+$
being missed, or does that one work?
I'm wondering if the =~
might auto-insert the start and end anchors before testing the match, and the duplication is causing problems.
Steps to reproduce: List the minimal actions needed to reproduce the behavior.
Expected behavior: All fields where there is a partial match using the supplied regex should be caught and downsampled.
Actual behavior: The first field in the regex partial match is not executed by the task This can be demonstrated by either:
i.e.: all_data = from(bucket: fromBucket) |> range(start: -task.every) |> filter(fn: (r) => (r.measurement =~ /^cpu|disk|diskio|mem|processes|swap|system|internal.+|net|netstat|procstat|procstatlookup|smart.+$/))
Using the supplied downsample above, any measurement which contains "cpu" is missed. However, using either of the above options of rearranging the regex so that "cpu" isn't first or entering a dummy value at the start will enable "cpu" to match successfully.
It appears for whatever reason, InfluxDB2 is missing the first statement in the regex where measurement is assigned and then executed. As long as it is not the first measurement, it is downsampled correctly.
Environment info:
System info: docker exec -ti influxdb uname -srm Linux 5.4.0-64-generic x86_64
InfluxDB version: docker exec -ti influxdb influxd 2021-02-22T11:55:29.944943Z info Welcome to InfluxDB {"log_id": "0SUPMJ60000", "version": "2.0.4", "commit": "4e7a59bb9a", "build_date": "2021-02-08T17:47:02Z"} 2021-02-22T11:55:30.901368Z error Failed opening bolt {"log_id": "0SUPMJ60000", "error": "unable to open boltdb: timeout"} Error: unable to open boltdb: timeout
Not sure why the error related to boltdb occurs.
Config:
Telegraf Config - https://github.com/influxdata/telegraf/blob/master/etc/telegraf.conf Downsample Config (I've utilised downsample-all-10m) - https://github.com/influxdata/community-templates/blob/master/downsampling/all_inputs/downsampling_tasks.yml
Log: Log of the job and execution success: InfluxDB2-Downsample-Log.log