Need Help MQTT Message to Influx using Telegraf with multiple values

Hi All,

I have setup an MQTT broker with recieved data from my Domoticz SmartMeter, I would like to push the data using the MQTT.input to my influx.

I’m new to this and not sure on the approach as I have multiple values in my message which i want to write to influx:

Her is the message:

{
“Battery” : 255,
“LastUpdate” : “2023-02-20 17:49:57”,
“RSSI” : 12,
“description” : “”,
“dtype” : “P1 Smart Meter”,
“hwid” : “7”,
“id” : “0001”,
“idx” : 64,
“name” : “Power”,
“nvalue” : 0,
“stype” : “Energy”,
“svalue1” : “3650163”,
“svalue2” : “4100054”,
“svalue3” : “963925”,
“svalue4” : “2348392”,
“svalue5” : “999”,
“svalue6” : “0”,
“unit” : 1
}

I would like to insert Svalue1…Svalue6 into Influx and create my grapsh. I’m not sure how to extract these values, each attemp Telegraf stops and keeps crashing tried float, integer etc.

Thanks in advice
Cheers,
Hemant

Can you share what config you have tried? Given that looks like JSON data, I think using the JSON_v2 parser and specifying the data types on those fields would be the route I go.