You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using v1.21I am getting the data from NATS server and pusing data to influxdb using telegraf Below is my config.
[[inputs.nats_consumer]]
servers = ["nats://localhost:4222"]
subjects = ["nats.subject.requestsraw"]
data_format = "json_v2"name_override = "requestsRaw"json_time_key = ""json_time_format = ""# Handling first type of JSON object (requestsRaw)
[[inputs.nats_consumer.json_v2]]
[[inputs.nats_consumer.json_v2.object]]
path = "@this"disable_prepend_keys = truetags = ["runId", "testName", "nodeName", "ObjectType","errorMessage","errorResponseBody","requestName","responseCode","result","samplerType"]
# Field mappings (convert fields to correct types)
[inputs.nats_consumer.json_v2.object.fields]
connectTime = "integer"count = "integer"errorCount = "integer"latency = "integer"processingTime = "integer"receivedBytes = "integer"sentBytes = "integer"below is my json file.[{"runId":"R_20240924-1249","testName":"Test","nodeName":"Test-Node","errorMessage":"noData","errorResponseBody":"noData","requestName":"WebSocket request-response Sampler","responseCode":"200","result":"pass","samplerType":"transaction","connectTime":0,"count":1,"errorCount":0,"latency":0,"processingTime":0,"receivedBytes":59275,"sentBytes":1467,"responseTime":2,"timeStamp":1727162557148,"time":1727162557159000000,"ObjectType":"requestsRaw"},{"runId":"R_20240924-1249","testName":"Test","nodeName":"Test-Node","errorMessage":"noData","errorResponseBody":"noData","requestName":"WebSocket request-response Sampler","responseCode":"200","result":"pass","samplerType":"transaction","connectTime":0,"count":1,"errorCount":0,"latency":0,"processingTime":0,"receivedBytes":59275,"sentBytes":1467,"responseTime":1,"timeStamp":1727162557150,"time":1727162557159000000,"ObjectType":"requestsRaw"},{"runId":"R_20240924-1249","testName":"Test","nodeName":"Test-Node","errorMessage":"noData","errorResponseBody":"noData","requestName":"WebSocket request-response Sampler","responseCode":"200","result":"pass","samplerType":"transaction","connectTime":0,"count":1,"errorCount":0,"latency":0,"processingTime":0,"receivedBytes":59275,"sentBytes":1467,"responseTime":1,"timeStamp":1727162557150,"time":1727162557159000000,"ObjectType":"requestsRaw"}]
Relevant telegraf.conf
Logs from Telegraf
System info
Telegraf 1.21
Docker
No response
Steps to reproduce
install the nats and pass data through natsserver
Expected behavior
It is expected read all messages inside the array
Actual behavior
it is reading array as a single message
Additional info
No response
The text was updated successfully, but these errors were encountered: