Dear community,
I am a bit desperated trying to parse a json payload comming in a MQTT message to be stored in influxdb. The payload is following OPC UA PubSub Part14 specification so I think will be helpful for a lot of people. An example of the payload is the following:
{"MessageId":"936107","MessageType":"ua-data","PublisherId":"ua-test-fronius","Messages":[{"DataSetWriterId":28715,"Timestamp":"2023-11-29T22:22:13.323661Z","Payload":{"ConnectedToBroker":{"Value":true}}},{"DataSetWriterId":7076,"Timestamp":"2023-11-29T22:22:13.3237068Z","Payload":{"ConnectedToCloudStorage":{"Value":false}}},{"DataSetWriterId":36507,"Timestamp":"2023-11-29T22:22:13.3237082Z","Payload":{"NumOpcSessions":{"Value":0}}},{"DataSetWriterId":62162,"Timestamp":"2023-11-29T22:22:13.3237088Z","Payload":{"NumOpcSubscriptions":{"Value":1}}},{"DataSetWriterId":60075,"Timestamp":"2023-11-29T22:22:13.3237094Z","Payload":{"NumOpcMonitoredItems":{"Value":74}}},{"DataSetWriterId":58227,"Timestamp":"2023-11-29T22:22:13.3237099Z","Payload":{"QueueCapacity":{"Value":1000}}},{"DataSetWriterId":20362,"Timestamp":"2023-11-29T22:22:13.3237105Z","Payload":{"QueueCount":{"Value":"6"}}},{"DataSetWriterId":11913,"Timestamp":"2023-11-29T22:22:13.3237112Z","Payload":{"EnqueueFailures":{"Value":"0"}}},{"DataSetWriterId":37064,"Timestamp":"2023-11-29T22:22:13.3237932Z","Payload":{"SentMessages":{"Value":"935317"}}},{"DataSetWriterId":45217,"Timestamp":"2023-11-29T22:22:13.3237938Z","Payload":{"BrokerMessageSize":{"Value":"455"}}},{"DataSetWriterId":58512,"Timestamp":"2023-11-29T22:22:13.3237944Z","Payload":{"BrokerMessageLatency":{"Value":"0"}}},{"DataSetWriterId":20143,"Timestamp":"2023-11-29T22:22:13.3237953Z","Payload":{"BrokerMessagesSecond":{"Value":0}}},{"DataSetWriterId":62951,"Timestamp":"2023-11-29T22:22:13.3237958Z","Payload":{"NumOpcMonitoredItemsSecond":{"Value":0}}},{"DataSetWriterId":10713,"Timestamp":"2023-11-29T22:22:13.3237963Z","Payload":{"BrokerMessageSendFailures":{"Value":"0"}}},{"DataSetWriterId":41506,"Timestamp":"2023-11-29T22:22:13.3244247Z","Payload":{"CurrentWorkingSetMBs":{"Value":"260"}}}]}
An the expected output, for example for the last line would be:
CurrentWorkingSetMBs,DataSetWriterId=41506,PublisherId="ua-test-fronius",MessageType="ua-data" Value=260 (converted timestamp "2023-11-29T22:22:13.3244247Z").
Could someone help me with the json or json_v2 parsing? I read all the examples but none of them reflects a similar structure.
Thank you very much in advance,