Hi i’m new to the telegraf and influxdb v2 (cloud). i have a problem regarding my configuration went i try to run it it said plugin inputs.mqtt_consumer: line 38: configuration specified the fields [“topic”], but they were not used. This is either a typo or this config option does not exist in this version.
what does the specified the field:[“topic”] mean, is there a incorrect placement went im configure the file?
here is my complete configuration file (with my personal data ):
[agent]
interval = “20s”
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = “5s”
flush_interval = “10s”
flush_jitter = “5s”
precision = “1ms”
debug = false
quiet = true
logtarget = “file”
logfile = “telegraflog”
logfile_rotation_interval = “1d”
logfile_rotation_max_size = “0”
logfile_rotation_max_archives = -1
log_with_timezone = “Asia/Jakarta”
hostname = “”
omit_hostname = false
[[outputs.influxdb_v2]]
urls =[“”]
token = “”
organization = “”
bucket = “”
bucket_tag = “”
exclude_bucket_tag = false
timeout = “600s”
http_headers = {“X-Special-Header” = “Special-Value”}
http_proxy = “http://corporate.proxy:3128”
user_agent = “telegraf”
content_encoding = “gzip”
influx_uint_support = false
tls_ca = “/etc/telegraf/ca.pem”
tls_cert = “/etc/telegraf/cert.pem”
tls_key = “/etc/telegraf/key.pem”
insecure_skip_verify = false
[[inputs.mqtt_consumer]]
example: servers = [“tcp://localhost:1883”]
servers = [“ssl://localhost:1883”]
servers = [“ws://localhost:1883”]
servers = []
topics = [
sensor/lokasi/#, ]
topic_tag = “”
qos = 1
connection_timeout = “600s”
max_undelivered_messages = 1000
persistent_session = true
client_id = “”
username = “”
password = “<redacted”
tls_ca = “/etc/telegraf/ca.pem”
tls_cert = “/etc/telegraf/cert.pem”
tls_key = “/etc/telegraf/key.pem”
insecure_skip_verify = false
data_format = “influx”
influx_parser_type = “internal”
influx_timestamp_precision = “1ns”
[[inputs.mqtt_consumer.topic_parsing]]
topic = “sensor/lokasi/#”
measurement = “Hasil_Data”
tags = “lokasi”
fields = “CO2_ppm”
[[inputs.mqtt_consumer.topic.types]]
key = “CO2_ppm”
data_type = “float”