使用telegraf在XDB中加载csv文件时出现问题
我找不到在XDB中上传csv文件的方法。我正在使用Telegraf作为插件。这是telegraf.conf的使用telegraf在XDB中加载csv文件时出现问题,csv,influxdb,telegraf,Csv,Influxdb,Telegraf,我找不到在XDB中上传csv文件的方法。我正在使用Telegraf作为插件。这是telegraf.conf的 [[inputs.file]] files = ["/home/davide/example.csv"] data_format = "csv" csv_header_row_count = 1 csv_timestamp_column = "time" csv_timestamp_format = &quo
[[inputs.file]]
files = ["/home/davide/example.csv"]
data_format = "csv"
csv_header_row_count = 1
csv_timestamp_column = "time"
csv_timestamp_format = "2006-01-02T15:04:05Z07:00"
[[outputs.file]]
## Files to write to, "stdout" is a specially handled file.
files = ["stdout", "/tmp/metrics.out"]
## Data format to output.
## Each data format has its own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md
data_format = "influx"
## Maximum line length in bytes. Useful only for debugging.
influx_max_line_bytes = 0
## When true, fields will be output in ascending lexical order. Enabling
## this option will result in decreased performance and is only recommended
## when you need predictable ordering while debugging.
influx_sort_fields = false
## When true, Telegraf will output unsigned integers as unsigned values,
## i.e.: `42u`. You will need a version of InfluxDB supporting unsigned
## integer values. Enabling this option will result in field type errors if
## existing data has been written.
influx_uint_support = false
从bash启动Telegraf时出现以下错误:
021-04-24T08:37:27Z E! [telegraf] Error running agent: connecting output outputs.file: Error connecting to output "outputs.file": open /tmp/metrics.out: permission denied
昨天,至少csv和Telegraf之间的通信正常,但数据没有在XDB中传输。我认为问题出在[[output.file]]
块中,但我不知道如何解决它。这不会写入inflow,只会写入文件和控制台。您的权限被拒绝,那么该文件是否已经存在?运行telegraf进程的用户是否具有该文件的写入权限?