Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Kapacitor to Kafka and kafka to nifi - Nifi is not able to understand / parse the data coming from kafka

Highlighted

Kapacitor to Kafka and kafka to nifi - Nifi is not able to understand / parse the data coming from kafka

New Contributor

Hello Team

kapacitor is triggering the alert and sending the data to kafka.

and kafka is getting the message as below .

{"id":"system_load1:nil","message":"CRITICAL: system_load1/facrs has high cpu load: 1.35","details":" ","time":"2018-09-24T06:24:50Z","duration":0,"level":"CRITICAL","data":{"series":[{"name":"system_load1","tags":{"host":"facrs"},"columns":["time","value"],"values":[["2018-09-24T06:24:50Z",1.35]]}]},"previousLevel":"CRITICAL","recoverable":true}

and i am using cosumekafka processor to consume the data and process is further using update record.

i am using below schema in jsontreereader but its not working. Kindly suggest

{ "title": "The Root Schema", "required": [ "id", "message", "details", "time", "duration", "level", "data", "previousLevel", "recoverable" ], "properties": { "id": { "type": "string", "title": "The Id Schema", "default": "", "pattern": "^(.*)$" }, "message": { "type": "string", "title": "The Message Schema", "default": "", "pattern": "^(.*)$" }, "details": { "type": "string", "title": "The Details Schema", "default": "", "pattern": "^(.*)$" }, "time": { "type": "string", "title": "The Time Schema", "default": "", "pattern": "^(.*)$" }, "duration": { "type": "integer", "title": "The Duration Schema", "default": 0 }, "level": { "type": "string", "title": "The Level Schema", "default": "", "pattern": "^(.*)$" }, "data": { "title": "The Data Schema", "required": [ "series" ], "properties": { "series": { "type": "array", "title": "The Series Schema", "items": { "title": "The Items Schema", "required": [ "name", "tags", "columns", "values" ], "properties": { "name": { "type": "string", "title": "The Name Schema", "default": "", "pattern": "^(.*)$" }, "tags": { "title": "The Tags Schema", "required": [ "host" ], "properties": { "host": { "type": "string", "title": "The Host Schema", "default": "", "pattern": "^(.*)$" } } }, "columns": { "type": "array", "title": "The Columns Schema", "items": { "type": "string", "title": "The Items Schema", "default": "", "pattern": "^(.*)$" } }, "values": { "type": "array", "title": "The Values Schema", "items": { "type": "array", "title": "The Items Schema", "items": { "type": "string", "title": "The Items Schema", "default": "", "pattern": "^(.*)$" } } } } } } } }, "previousLevel": { "type": "string", "title": "The Previouslevel Schema", "default": "", "pattern": "^(.*)$" }, "recoverable": { "type": "boolean", "title": "The Recoverable Schema", "default": false } } }