So I think this may well be me simply misunderstanding the nature of this error but in my telegraf.conf I have the following inputs and outputs configured
###############################################################################
# OUTPUT PLUGINS #
###############################################################################
[[outputs.health]]
service_address = "http://:8888"
namepass = ["internal_write"]
tagpass = { output = ["influxdb"] }
[[outputs.health.compares]]
field = "buffer_size"
lt = 1.0
[[outputs.health.contains]]
field = "buffer_size"
# Publishes metrics to a postgresql database
[[outputs.postgresql]]
connection = "host=localhost password=Password user=postgres sslmode=disable dbname=Metrics"
tags_as_foreignkeys = true
tag_table_suffix = "_builds"
###############################################################################
# INPUT PLUGINS #
###############################################################################
# Generic HTTP write listener
[[inputs.http_listener_v2]]
## Address and port to host HTTP listener on
service_address = ":8080"
paths = ["/build-metrics"]
methods = ["POST", "PUT"]
data_source = "body"
data_format = "json_v2"
[[inputs.http_listener_v2.json_v2]]
measurement_name = "build_status"
[[inputs.file.json_v2.tag]]
path = "build.build_number"
[[inputs.file.json_v2.field]]
path = "build.stages.#.status"
rename = "status"
[[inputs.file.json_v2.field]]
path = "build.stages.#.duration_seconds"
rename = "duration"
[[inputs.file.json_v2.field]]
path = "build.stages.#.start"
rename = "start"
[[inputs.file.json_v2.field]]
path = "build.stages.#.stage"
rename = "stage"
And when I attempt to run it I get the error that tags_as_foreignkeys is specified but not used. How should it be used ? I thought it was just a parameter. The only way I’ve managed to make this plugin work so far is by running it with only the connection configured adding any other configuration ends in the same error.
Any help appreciated
Thanks