如何解决使用 Telegraf 在 Influxdb 中加载 csv 文件时出现问题
我找不到在 Influxdb 中上传 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 = "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 之间的通信正在工作,但数据没有在 influxdb 中加载。我认为问题出在 [[output.file]]
块中,但我不知道如何解决。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。