i got it working like this( i have no clue what’s happening)
[agent]
interval = "10s"
round_interval = true
metric_batch_size = 2500 #1000
metric_buffer_limit = 100000 #10000
collection_jitter = "0s"
flush_interval = "10s"
flush_jitter = "0s"
precision = ""
hostname = ""
omit_hostname = true
[[inputs.mqtt_consumer]]
servers = ["tcp://****:1883"]
topics = ["emqx/#"]
username = "****"
password = "****"
client_id = "*****"
data_format = "json"
tag_keys = ["device_id"]
qos = 0
[[processors.regex]]
[[processors.regex.tags]]
key = "topic"
pattern = "^emqx/(.*)$"
replacement = "${1}"
[[processors.converter]]
[processors.converter.fields]
float = ["inputA", "inputB", "inputC", "inputD", "inputE", "inputF", "inputG", "inputH"]
[[processors.starlark]]
source = '''
def apply(metric):
for field in ["inputA", "inputB", "inputC", "inputD", "inputE", "inputF", "inputG", "inputH"]:
if field in metric.fields:
metric.fields[field] = float(metric.fields[field]) / 100 # Remove this line to keep original values
metric.name = metric.tags["topic"]
return metric
'''
[[outputs.influxdb_v2]]
urls = ["http://*******:8086"]
token = "*****"
organization = "****"
bucket = "test"
timeout = "5s"
but now i have a bigger problem:)) and i post in new topic…