MQTT witg strings -> Influx

Hi from Austria, I’m struggled since 2 days with a little problem (possible sitting before the screen :wink: )
I have a MQTT topic, the values are formatted as strings:
MQTT: Topic: SHRDZM/807D3A37863A/807D3A37863A/sensor

Blockquote
{
β€œtimestamp”:β€œ2025-10-31T10:39:50”,
β€œ32.7.0”:β€œ236.10”,
β€œ52.7.0”:β€œ234.70”,
β€œ72.7.0”:β€œ235.30”,
β€œ31.7.0”:β€œ2.50”,
β€œ51.7.0”:β€œ2.00”,
β€œ71.7.0”:β€œ1.12”,
β€œ1.7.0”:β€œ0”,
β€œ2.7.0”:β€œ17”,
β€œ1.8.0”:β€œ9929432”,
β€œ2.8.0”:β€œ19417831”,
β€œ3.8.0”:β€œ692170”,
β€œ4.8.0”:β€œ7045923”,
β€œ16.7.0”:β€œ-17”,
β€œuptime”:β€œ0003:09:38:02”,
β€œUTC”:β€œ2025-10-31T09:39:53”
}​

so I set up the config:
[agent]

interval = β€œ10s”
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = β€œ0s”
flush_interval = β€œ10s”
flush_jitter = β€œ0s”
precision = β€œβ€
hostname = β€œβ€
omit_hostname = false
debug = true
[[outputs.influxdb_v2]]
urls = [β€œh t t p://localhost:8086”]
token = β€œxxxxxxxxxxxxxxxxxxxx2elN6JJ_c7_W-ujvTYDvHMDfUquDUg==”
organization = β€œHoe”
bucket = β€œSmartmeter”

[[inputs.mqtt_consumer]]
servers = [β€œtcp://192.168.10.214:1883”]
topics = [
β€œSHRDZM/807D3A37863A/807D3A37863A”,
]
username = β€œX”
password = β€œK”
data_format = β€œjson_v2”
[[inputs.mqtt_consumer.json_v2]]
timestamp_path = β€œtimestamp”
timestamp_format = β€œ2006-01-02T15:04:05”
timestamp_timezone= β€œCET”
[[inputs.mqtt_consumer.json_v2.field]]
path = β€œ71.7.0”
type = β€œfloat”
optional = true
[[inputs.mqtt_consumer.json_v2.field]]
path = β€œ51.7.0”
type = β€œfloat”
optional = true
[[inputs.mqtt_consumer.json_v2.field]]
path = β€œ1.7.0”
type = β€œint”>
optional = true


the debug output is:

Blockquote
root@influxdb:~# telegraf --debug --config h t t p://192.168.50.133:8086/api/v2/telegrafs/0fba69b7b5211000
2025-10-31T17:04:06Z I! Loading config: h t t p://192.168.50.133:8086/api/v2/telegrafs/0fba69b7b5211000
2025-10-31T17:04:06Z I! Starting Telegraf 1.36.3 brought to you by InfluxData the makers of InfluxDB
2025-10-31T17:04:06Z I! Available plugins: 239 inputs, 9 aggregators, 35 processors, 26 parsers, 65 outputs, 6 secret-stores
2025-10-31T17:04:06Z I! Loaded inputs: mqtt_consumer
2025-10-31T17:04:06Z I! Loaded aggregators:
2025-10-31T17:04:06Z I! Loaded processors:
2025-10-31T17:04:06Z I! Loaded secretstores:
2025-10-31T17:04:06Z I! Loaded outputs: influxdb_v2
2025-10-31T17:04:06Z I! Tags enabled: host=influxdb
2025-10-31T17:04:06Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:β€œinfluxdb”, Flush Interval:10s
2025-10-31T17:04:06Z W! [agent] The default value of β€˜skip_processors_after_aggregators’ will change to β€˜true’ with Telegraf v1.40.0! If you need the current default behavior, please explicitly set the option to β€˜false’!
2025-10-31T17:04:06Z D! [agent] Initializing plugins
2025-10-31T17:04:06Z D! [agent] Connecting outputs
2025-10-31T17:04:06Z D! [agent] Attempting connection to [outputs.influxdb_v2]
2025-10-31T17:04:06Z D! [agent] Successfully connected to outputs.influxdb_v2
2025-10-31T17:04:06Z D! [agent] Starting service inputs
2025-10-31T17:04:06Z I! [inputs.mqtt_consumer] Connected [tcp://192.168.10.214:1883]
2025-10-31T17:04:16Z D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics

Are there any hints to find my mistake?
I’m very new with influx so please be lenient :wink:

Greetings
Eric

Er, what mistake?

You haven’t actually said what your problem is.

Antony.

the influx database has no records…
2025-10-31T17:04:16Z D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics

seems the problem is the point (.) in the tag…
(according to https://jsonlint.com/ the tags are valid)
To proof just use this input.json

{
β€œconvertinttostring”: 1,
β€œexplicitinttype”: 1,
β€œdefaultinttype”: 2,
β€œconvertstringtoint”: β€œ4”,
β€œ1_1”: β€œ5”,
β€œ1.1”: β€œ6”
}

and this config:

# Example taken from: https://github.com/influxdata/telegraf/issues/7097
 [[inputs.file]]
    files = ["/root/.testdata/input.json"]
    data_format = "json_v2"
    [[inputs.file.json_v2]]
# Parse int types from JSON
[[inputs.file]]
    files = ["/root/.testdata/input.json"]
    data_format = "json_v2"
    [[inputs.file.json_v2]]
        [[inputs.file.json_v2.field]]
        rename = "explicitinttypeName"
        path = "explicitinttype"
        type = "int"
        [[inputs.file.json_v2.field]]
        rename = "convertstringtointName"
        path = "convertstringtoint"
        type = "int"
        [[inputs.file.json_v2.field]]
        rename = "converttesttointName"
        path = "1_1"
        type = "int"

there is the correct output:
file,host=influxdb explicitinttypeName=1i,convertstringtointName=4i,converttesttointName=5i 1762165918000000000​

now change in the config path = β€œ1_1” to path = β€œ1.1”

and you get an error: could not parse β€œ/root/.testdata/input.json”: the path β€œ1.1” doesn’t exist

could you confirm this bug and maybee offer a hint or workaraound. The MQTT output can’t be changed, unfortunatly"…

Greetings from Autria

Eric