When using Input plugin Eventhub consumer to send data to influxdb 1.8, 'bool' tags are missing

When using the input plugin Event hub Consumer to send data to InfluxDB 1.8, ‘bool’ tags are missing.
This is the Telegraf congiguration settings:
[[outputs.file]]

Files to write to, “stdout” is a specially handled file.

files = [“stdout”]

Data format to output.

Each data format has its own unique set of configuration options, read

more about them here:

https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md

data_format = “json”
[[inputs.eventhub_consumer]]

connection_string =“****************”

epoch = 1

data_format = “json”

json_name_key = “Plant”

Hygenco Asset hierarchy

tag_keys = [“System”,“Sub_System”,“Component”]

json_time_key = “timestamp”

json_time_format = “unix”

Event hub data:
{
“body”: {
“Name”: “ICPro”,
“plant”: “Demo”,
“State”: true,
“Temperature”: 57,
“timestamp”: 1688713990
},
“enqueuedTime”: “Fri Jul 07 2023 12:43:11 GMT+0530 (India Standard Time)”
}

Output plugin data:
2023-07-07 12:42:50 {“fields”:{“Temperature”:24},“name”:“eventhub_consumer”,“tags”:{“host”:“Demo”},“timestamp”:1688713970}
2023-07-07 12:43:00 {“fields”:{“Temperature”:94},“name”:“eventhub_consumer”,“tags”:{“host”:“Demo”},“timestamp”:1688713980}
2023-07-07 12:43:10 {“fields”:{“Temperature”:57},“name”:“eventhub_consumer”,“tags”:{“host”:“Demo”},“timestamp”:1688713990}

The boolean tag is missing in output data.

tag_keys = [“System”,“Sub_System”,“Component”]

These do not exist in your example?!

data_format = “json”

The json parser is great for flat data. My suggestion is to use the json_v2 parser like the following:

  data_format = "json_v2"
  [[inputs.file.json_v2]]
    [[inputs.file.json_v2.object]]
      path = "body"
      timestamp_key = "timestamp"
      timestamp_format = "unix"

produced:

file Name="ICPro",plant="Demo",State=true,Temperature=57 1688713990000000000

You can adapt that to your config as necessary.