i am using tail plugin to populate data in influxdb from csv files.
i want to skip a few columns/fields.
For example:
test.csv is as below:
h1,h2,h3,h4,h5
a,b,c,d,e
i want to upload only h1,h3 and h5 in influxdb.
how can i do that using tail plugin?
You should be able to use the fielddrop
and tagexclude
modifier to drop those from the metric sent to influxdb.
thanks @glinton for the help
[[inputs.tail]]
files = [βtest.csvβ]
from_beginning = false
data_format = βcsvβ
csv_header_row_count = 1
csv_tag_columns = [βa1β]
csv_delimiter = β,β
csv_trim_space = true
csv_column_names=[βa1β,βa2β,βa3β,βa4β,βa5β]
name_override = βtestβ
fielddrop = [βa4β]
[inputs.tail.tags]
a3="x"
is this inccorectly written?
i was expecting this to remove a4 from the measurement test, but it is not doing so.
glinton
5
Determine whether a4
is a field or a tag, and use fielddrop
or tagexclude
accordingly.
1 Like