We use Influxdb to store system metrics collected with Telegraf. Unfortunately some systems cause corrupted data to be send/inserted, which causes corrupted measurements to be created. (Similar to Influxdb corrupted measurements created and Metric corruption when using http2 nginx reverse proxy with influxdb output · Issue #2854 · influxdata/telegraf · GitHub)
We are still trying to pinpoint the exact cause, but that’s not the point of this topic.
I’m trying to find a way to drop these corrupted measurements. Using the influx cli client I get errors like ERR: shard 6: proto: invalid UTF-8 string
or ERR: error parsing query: found \u, expected identifier at line 1, char 21
. I tried escaping the slashes, (i.e. DROP MEASUREMENT "�\\u0000\u0000\u0000\u0000\u0006;diskio"
), but resulted in the same “invalid UTF-8 string” error.
some examples of these measurement names:
"1"
"d\u0000\u0000\u0000\u0000\u0000\u0001system"
"G\u0000\u0000\u0000\u0000\u0000\u0001system"
"M\u0000\u0000\u0000\u0000\u0000\u0001swap"
"name=xvda2"
"������\u0000\bL\u0000\u0001\u0000\u0000\u0000Cdiskio"
"������\u0000\bx\u0000\u0001\u0000\u0000\u00005diskio"
"������\u0000\t�\u0000\u0001\u0000\u0000\u0000gprocesses"
"������\u0000\t�\u0000\u0001\u0000\u0000\u0000mprocesses"
"������\u0000\t�\u0000\u0001\u0000\u0000\u0000Oprocesses"
"������\u0000\t�\u0000\u0001\u0000\u0000\u0000{processes"
"������\u0000\t�\u0000\u0001\u0000\u0000\u0000}processes"
"������\u0000\t�\u0000\u0001\u0000\u0000\u0000�processes"
"������\u0000\t�\u0000\u0001\u0000\u0000\u0000\u001fprocesses"
"������\u0000\t�\u0000\u0001\u0000\u0000\u0000Wprocesses"
"�\u0000\u0000\u0000\u0000\u0000\u0001nginx"
"�\u0000\u0000\u0000\u0000\u0000\u0001processes"
"�\u0000\u0000\u0000\u0000\u0000\u0001swap"
"�\u0000\u0000\u0000\u0000\u0006;cpu"
"�\u0000\u0000\u0000\u0000\u0006;diskio"
"�\u0000\u0000\u0000\u0000\u0006;processes"
"\"\u0000\u0001\u0000\u0000\u0000\u0011apt"
"\u0001\b\u0000\u0000\u0000\u0000\u0006;cpu"
"\u0001%\u0000\u0000\u0000\u0000\u0000\u0001mem"
"\u0001\u0019\u0000\u0000\u0000\u0000\u0006;cpu"
"\u0001\u001f\u0000\u0000\u0000\u0000\u0006;cpu"
Is there a way to deleted these measurements/series while keeping the rest?