Member since
05-20-2020
33
Posts
1
Kudos Received
0
Solutions
06-04-2020
04:19 AM
hi everyone , We want to put data in web app using API endpoint https://localhost:8000/api/event/${id}/attributes this is the API endpoint that i have used in invoke HTTP processor in Remote URL field with PUT method. we want to create new attribute with value and this attribute is a dictionary type so we have to pass the data in the dictionary format for this we have used updateattribute processor and attributetojson processor. updateAttribute processor snap Attributetojson processor snap and the below is out of attributetoJson processor (flowfile) {"note":"note from nifi","attributes":"{\n \"workflow\":\"process\"\n }","id":"1ecfbcbb-38bf-49e9-a77e-a88w"} the error msg in invoke http processor { "code": 500, "errors": [ "Traceback (most recent call last):\n File \"/usr/local/lib/python3.6/site-packages/flask/app.py\", line 1949, in full_dispatch_request\n rv = self.dispatch_request()\n File \"/usr/local/lib/python3.6/site-packages/ No value set as per my knowledge this is type error. I think the Dictionary is not sending in correct format . i have also used ${attributes:unescapeJson()} in updateAttribute ...but i think i have made a mistake in the declaration property_name property_value attributes {"workflow": "process"} 'attributes' ${attributes:unescapeJson()} thanks
... View more
Labels:
- Labels:
-
Apache NiFi
06-04-2020
02:58 AM
hi @stevenmatison , this tag is not working ...and we also want to send dictionary {"flow":"process"} in same processor ... is it possible???
... View more
06-04-2020
02:33 AM
awesome thanks @hegdemahendra
... View more
06-03-2020
11:51 PM
@hegdemahendra thanks for solution...but I really want to know listenhttp processor configuration....and your explanation method is awesome with flow and configuration. Thank alot ....
... View more
06-03-2020
05:02 AM
confused related to filed ...my web app made in python ..when i have to update new attribute from python i will just write alarm.attribut[attribute_name]=[attribute_value]...same thing i want to update from nifi ...for this i used invoke http processor and attribute end point in Remote url with PUT method "https://localhost:8080/api/alarm/<alarm_id>/attributes" and i have used two processors updateAttribute and AttributeTojson i think i have done mistake in dynamic property of updateAttribute processor - propertyname -attributes propertyvalue - $.{alarm.attributes['attribute_name'] = 'attribute_value'} or ${alarm.attributes['attribute_name'] = 'attribute_value'} and in AttributeTojson in Attribute List - id,attributes please suggest me the right way of passing new attribute. @stevenmatison thanks
... View more
Labels:
- Labels:
-
Apache NiFi
06-03-2020
02:34 AM
We want to configure listenhttp processor that listen our web service. question is what are the configuration in http listener processor in nifi such that when we will make curl post request this ListenHttp processor will catch the update. basically i didn't understand what i have to put in Base path (is it i have to put nifi address i.e http://localhost:8080/contentListener or our web app service URL???) what is contentListener. And is it i have to put our web app port number in listening port? in the request command what i have to put in url part curl --request POST 'http://(here i have to used the nifi url)' -H 'Authorization: Key demo-key i know this is very basic question but i'm just using this don't know any thing about nifi and curl command .....thanks in advance
... View more
- Tags:
- configuration
- NiFi
Labels:
- Labels:
-
Apache NiFi
06-01-2020
06:59 AM
big thank you to you @stevenmatison
... View more
06-01-2020
06:43 AM
yes i got it ...i found it ....the problem in the date time format..could you please see on my further reply
... View more
06-01-2020
06:39 AM
@stevenmatison the solution which you provide that give "lastTime":"2020-06-01T12:39:13Z" but i want the format like this 2020-06-01T13:17:13.474Z please see on yellow shed
... View more
06-01-2020
06:12 AM
hi @stevenmatison thanks for reply ....actually we want to send this timestamp in http processor to get all the alarm which came from this timestamp...can you please suggest how to pass this timestamp in http invoked processor end point.... here i have attached the snap ...i have first used generate flowfile processor after that in upadteAttribute processor i have calculate timestamp which you provide lastTime= ${now():minus(600000):format("yyyy-MM-dd'T'HH:mm:ss'Z'", "GMT")} and thanks this is working ...but now i want to pass this timestamp in http processor for get request ...i have used attributtojson that convert updateAttribut processor output i have used this bec when i connected updateAttribute to evaluatejsonpath processor this processor will give error ....that why i have to used this AtrributeTOjson then i have use evaluatejsonpath to extract timestamp as an attribute bec i have to send the http get request https://localhost:8080/api/alarm?sort-by=from-date=${lastTime} using this timestamp ...but i didn't get appropriate output ..i'll getting all alram
... View more
06-01-2020
03:32 AM
@stevenmatison hi to everyone ...i want to pass the attribute in http invoked processor but the attribute which contain the date and time like 2020-06-01T09:47:59.946Z format....i want to subtract the present time with 10 min.------- this expression i have seen in this community ${now():toNumber():minus(???):format('???')} what i have to put in the place of question mark for 10 min minus ...60000?? and for format 2020-06-01T09:47:59.946Z(+%FT%T.%3NZ if i use this i'll get error in format ) ..... and what processor i have to use...currently i m using updateAttribute for date format thanks in advance
... View more
Labels:
- Labels:
-
Apache NiFi
05-28-2020
12:01 PM
hello everyone ....please help me out ...i m working on one system that system received alarm from client ...we generally received 10000 alarm ......we want to configure our web with nifi for some other update in alarm ...for this we have used invoked http processor that get all the alarm from web app and then we used split json processor that split one alarm in one flowfile then we used evaluate jsonpath that extract id attribute which will be use in detectduplicate processor ....actually the invoked http processor give repeated alarm but we want only one copy of one alarm ...every 10 min the http processor get alarm from web app but those alarm should not be duplicate ....is it possible to do this .....if you have any other option for this work please suggest me. and in detectduplicate ---- CacheEntryIndentifier - ${id} age of duration - 15 min distributed cache service - DistributedMapCacheClientService and one more thing i have used DistributedMapCacheClientService -- server hostname - localhost server port - 4557 thanks in advance
... View more
Labels:
- Labels:
-
Apache NiFi
05-28-2020
06:51 AM
@stevenmatison thank you for your reply ...now i got this error ...i have gone through your reply
... View more
05-28-2020
05:19 AM
@stevenmatison is it possible to apply filter condition on invoke HTTP processor that give all the alarm from web app in every 5 min but will not fetch the duplicate alarm that already fetched before ? or else is it possible when the alarm will come in to my web app then workflow in NIFI will trigger and gives recent alarm which came just in 10 min ...i have tried with DetectDuplicate processor ...but not getting any result ..i think i made mistake in configuration in detecduplicate processor.. please direct me ....and if you have any other route for this please provide me the whole way(configuration an all) ..i'm new in nifi ..don't know much more about that detectduplicate processor when i clicked in arrow in side of RedisDistributedMapCacheClintService ...this below config has open(RedisConnectionPoolService)..and in connection string option i have put web address with port number is it wrong ..or else we have to put nifi localhost address with port no.??
... View more
Labels:
- Labels:
-
Apache HBase
-
Apache NiFi
05-27-2020
03:47 AM
hi all , I am working in the system ...where we received alarm form the client ...i want to make the data flow (WORKFLOW) in NIFI where the NIFI will monitor our web service ....i meant when alarm will coming in web app the workflow(of nifi) will trigger and generate the ticket in other web service like servicenow etc....is it possible ???? thanks in advance and i'm waiting for your valuable response
... View more
Labels:
- Labels:
-
Apache NiFi
05-26-2020
10:32 AM
@stevenmatison thnax for reply ...but i have question ..at which processor we have to write this expression ...i have apply this below expression on updateAttribute processor ..but still i am not getting out ${tags:unescapeJson()} please provide me the complete scenario..i meant where i have to write the tag property with value["unix02"] and this above expression ....... thanx in advance
... View more
05-25-2020
09:35 AM
updateAttribute processor config and this is the output of AttributetoJson processor ....i want tags value in the list like ["UNIX01"]
... View more
Labels:
- Labels:
-
Apache NiFi
05-21-2020
02:31 PM
here i have used invoked http processor for get the alarm from web app. then i have to used split processor to spilt one alarm in one flow file. and the i have used evaluatejsonpath processor of extract data into attribute after that i want to used extract value in next http invoked processor for further used .... problem-- 1. splitjson processor conf 2.Evaluatejsonpath conf if i used destination value flowfile-attribute this not gives any data related to id ...i mean i got same output as like spiltprocessor has gave 3.invoked http processor that connect with EvaluateJsonPath processor of id { "alarm": [ { "attributes": { " ": " ", " ": " " }, "related": [ " ", " ", ], "systemTime": "2020-05-21T13:57:50.444Z", "environment": " ", "schdul": "system", "group": "Unknown", "history": [ { "schdul": "system", "href": "https://abc.avw.com/api/alarm/46fe72b1-8999-4cde-a9e1-a3e19e31a471", "id": "2345-3456-1234-qwer-12e3f", "resource": "critical", "current": "open", "updateTime": "2020-05-21T13:57:50.444Z", "value": "--" } ], "href": "href": "https://abc.avw.com/api/alarm/46fe72b1-8999-4cde-a9e1-a3e19e31a471", "id": "2345-3456-1234-qwer-12e3f", "lastReceiveId": "2345-3456-1234-qwer-12e3f", "previousSeverity": "indeterminate", "rawData": null, "receiveTime": "2020-05-21T13:57:50.450Z", "repeat": false, "service": [ "example.com" ], "resource": "critical", "current": "open", "text": " ", "timeout": 86400, "trendIndication": "moreSevere", "type": "excepbnbntionAlert", "updateTime": "2020-05-21T13:57:50.450Z", "value": "--" }, "attributes": { " ": " ", " ": " " }, "related": [ " ", " ", ], "systemTime": "2020-05-21T13:57:50.444Z", "environment": " ", "schdul": "system", "group": "Unknown", "history": [ { "schdul": "system", "href": "https://abc.avw.com/api/alarm/2345-3456-2345-qwer-12e3f, "id": "2345-3456-2345-qwer-12e3f", "resource": "critical", "current": "open", "updateTime": "2020-05-21T13:57:50.444Z", "value": "--" } ], "href": "https://abc.avw.com/api/alarm/2345-3456-2345-qwer-12e3f", "id": "2345-3456-2345-qwer-12e3f", "lastReceiveId": "2345-3456-1234-qwer-12e3f", "rawData": null, "receiveTime": "2020-05-21T13:57:50.450Z", "repeat": false, "service": [ "example.com" ], "resource": "critical", "current": "open", "text": " ", "timeout": 86400, "trendIndication": "moreSevere", "type": "excepbnbntionAlert", "updateTime": "2020-05-21T13:57:50.450Z", "value": "--" }, ], "autoRefresh": true, "lastTime": "2020-05-21T13:57:50.450Z", "more": false, "page": 1, "pageSize": 1000, "pages": 1, "resourceCounts": { "critical": 2 }, "current": "ok", "currentCounts": { "open": 2 }, "total": 2 } this is json data (the output of first invoked http processor please see in first above image)
... View more
Labels:
- Labels:
-
Apache NiFi
05-21-2020
05:00 AM
@VidyaSargur thanks vidya
... View more
05-21-2020
04:58 AM
@myoung ...in nifi i have used invoked http processor that get data from web app.. i want to apply the condition on json data file ...i means when the resource="abc" the alarm get filter and goes to one processor and other alarm will go to another processor.....so my question is what are the processor is required..as of now i have used one http invoked that will provide all the alarm form my web app ..two putfile processor for storing alarm one for resource="abc" and one for other resource. and i have also used one Routonatrribute processor for condition..in RoutOnAttribute config i have decalred on dynamic property whic is ....the name of property is alarms.resource and the value is ${alarms.resource:equals('abc')}
the below is respon of Invoked http processor...want the alarm that contain resource='abc' that will go to one put file processor
{ "alamrs" : [ { "correlate" : [ " " , " " , " " ], "event" : " " , "group" : " " , "history" : [ { "event" : " " , "href" : " " , "id" : " " , "resource" : " abc " , "status" : " " , "text" : " " , "type" : " " , "updateTime" : " " , "user" : " " , "value" : "--" } ], "href" : " " , "id" : "" , "rawData" : null , "receiveTime" : " " , "service" : [ " " ], "resource" : "abc" , "status" : " " , "tags" : [ "" ], "text" : " : " , "timeout" : , }, { "correlate" : [ " " , " " , " " ], "event" : " " , "group" : " " , "history" : [ { "event" : " " , "href" : " " , "id" : " " , "resource" : " abc " , "status" : " " , "text" : " " , "type" : " " , "updateTime" : " " , "user" : " " , "value" : "--" } ], "href" : " " , "id" : "" , "rawData" : null , "receiveTime" : " " , "service" : [ " " ], "resource" : "abc" , "status" : " " , "tags" : [ "" ], "text" : " : " , "timeout" : , }, { "correlate" : [ " " , " " , " " ], "event" : " " , "group" : " " , "history" : [ { "event" : " " , "href" : " " , "id" : " " , "resource" : " abc " , "status" : " " , "text" : " " , "type" : " " , "updateTime" : " " , "user" : " " , "value" : "--" } ], "href" : " " , "id" : "" , "rawData" : null , "receiveTime" : " " , "service" : [ " " ], "resource" : "abc" , "status" : " " , "tags" : [ "" ], "text" : " : " , "timeout" : ,
... View more
- Tags:
- NiFi
Labels:
- Labels:
-
Apache MiNiFi
-
Apache NiFi
05-21-2020
04:55 AM
@myoung ...in nifi i have used invoked http processor that get data from web app.. i want to apply the condition on json data file ...i means when the resource="abc" the alarm get filter and goes to one processor and other alarm will go to another processor.....so my question is what are the processor is required..as of now i have used one http invoked that will provide all the alarm form my web app ..two putfile processor for storing alarm one for resource="abc" and one for other resource. and i have also used one Routonatrribute processor for condition..in RoutOnAttribute config i have decalred on dynamic property whic is ....the name of property is alarms.resource and the value is ${alarms.resource:equals('abc')} the below is respon of Invoked http processor...want the alarm that contain resource='abc' that will go to one put file processor { "alamrs" : [ { "correlate" : [ " " , " " , " " ], "event" : " " , "group" : " " , "history" : [ { "event" : " " , "href" : " " , "id" : " " , "resource" : " abc " , "status" : " " , "text" : " " , "type" : " " , "updateTime" : " " , "user" : " " , "value" : "--" } ], "href" : " " , "id" : "" , "rawData" : null , "receiveTime" : " " , "service" : [ " " ], "resource" : "abc" , "status" : " " , "tags" : [ "" ], "text" : " : " , "timeout" : , }, { "correlate" : [ " " , " " , " " ], "event" : " " , "group" : " " , "history" : [ { "event" : " " , "href" : " " , "id" : " " , "resource" : " abc " , "status" : " " , "text" : " " , "type" : " " , "updateTime" : " " , "user" : " " , "value" : "--" } ], "href" : " " , "id" : "" , "rawData" : null , "receiveTime" : " " , "service" : [ " " ], "resource" : "abc" , "status" : " " , "tags" : [ "" ], "text" : " : " , "timeout" : , }, { "correlate" : [ " " , " " , " " ], "event" : " " , "group" : " " , "history" : [ { "event" : " " , "href" : " " , "id" : " " , "resource" : " abc " , "status" : " " , "text" : " " , "type" : " " , "updateTime" : " " , "user" : " " , "value" : "--" } ], "href" : " " , "id" : "" , "rawData" : null , "receiveTime" : " " , "service" : [ " " ], "resource" : "abc" , "status" : " " , "tags" : [ "" ], "text" : " : " , "timeout" : , } @
... View more
05-21-2020
04:43 AM
@myoung ...in nifi i have used invoked http processor that get data from web app.. i want to apply the condition on json data file ...i means when the resource="abc" the alarm get filter and goes to one processor and other alarm will go to another processor.....so my question is what are the processor is required..as of now i have used one http invoked that will provide all the alarm form my web app ..two putfile processor for storing alarm one for resource="abc" and one for other resource. and i have also used one Routonatrribute processor for condition..in RoutOnAttribute config i have decalred on dynamic property whic is ....the name of property is alarms.resource and the value is ${alarms.resource:equals('abc')} the below is respon of Invoked http processor...want the alarm that contain resource='abc' that will go to one put file processor { "alamrs" : [ { "correlate" : [ " " , " " , " " ], "event" : " " , "group" : " " , "history" : [ { "event" : " " , "href" : " " , "id" : " " , "resource" : " abc " , "status" : " " , "text" : " " , "type" : " " , "updateTime" : " " , "user" : " " , "value" : "--" } ], "href" : " " , "id" : "" , "rawData" : null , "receiveTime" : " " , "service" : [ " " ], "resource" : "abc" , "status" : " " , "tags" : [ "" ], "text" : " : " , "timeout" : , }, { "correlate" : [ " " , " " , " " ], "event" : " " , "group" : " " , "history" : [ { "event" : " " , "href" : " " , "id" : " " , "resource" : " abc " , "status" : " " , "text" : " " , "type" : " " , "updateTime" : " " , "user" : " " , "value" : "--" } ], "href" : " " , "id" : "" , "rawData" : null , "receiveTime" : " " , "service" : [ " " ], "resource" : "abc" , "status" : " " , "tags" : [ "" ], "text" : " : " , "timeout" : , }, { "correlate" : [ " " , " " , " " ], "event" : " " , "group" : " " , "history" : [ { "event" : " " , "href" : " " , "id" : " " , "resource" : " abc " , "status" : " " , "text" : " " , "type" : " " , "updateTime" : " " , "user" : " " , "value" : "--" } ], "href" : " " , "id" : "" , "rawData" : null , "receiveTime" : " " , "service" : [ " " ], "resource" : "abc" , "status" : " " , "tags" : [ "" ], "text" : " : " , "timeout" : , } @
... View more
05-20-2020
03:05 PM
How to post query
... View more