Exporting/Importing Reporting tasks

2018-04-11 Thread Leandro Lourenço
Hi guys,

I'm wondering if there's any way I can import and export Reporting Tasks
just like we do with templates.
Wanna put together a deployment strategy that recreates Reporting Tasks
when necessary.

Sincerely,
Leandro


Re: [Nifi 1.5.0] Map values to be replaced in a UpdateRecord processor

2018-04-11 Thread Mike Thomsen
Sorry, misread which processor you're using. You'd want to use LookupRecord
with my suggestion.

On Wed, Apr 11, 2018 at 9:40 AM, Mike Thomsen 
wrote:

> If you know a scripting language that's supported, you can use the
> ScriptedLookupService to tailor the behavior to your exact specification.
> The dynamic properties also support EL, so depending your use case you
> might be able to leverage that.
>
> Ex of a Groovy script built for ScriptedLookupService: https:/
> /gist.github.com/alopresto/78eb1a2c2b878f75f61481269af38a9f
>
> On Wed, Apr 11, 2018 at 6:19 AM, françois lacombe <
> francois.laco...@dcbrain.com> wrote:
>
>> Hi all,
>>
>> This morning, i'm trying to update records from a csv file prior to send
>> them in a pgsql db.
>> The UpdateRecord processor sounds to be the most useful to do so.
>>
>> Given problem is I have to replace values of some columns, depending of
>> current value:
>> 1 => a
>> 2 => b
>> 3 => c
>> ...
>> 10 => j
>>
>> UpdateRecord actually accepts custom properties to set a unique value of
>> a given key (with Literal replacement strategy) but how can I provide a
>> kind of map of values depending of existing? Is this even possible ?
>>
>> I thought of a combination of RouteOnAttribute and UpdateRecord
>> processors but this would lead to dozen of processors in my pipeline since
>> I have approximately 50 different replacement to make.
>> I hope I won't have to choose this option :)
>>
>>
>> Thanks in advance for any input, all the best
>>
>> François Lacombe
>>
>
>


Re: [Nifi 1.5.0] Map values to be replaced in a UpdateRecord processor

2018-04-11 Thread Mike Thomsen
If you know a scripting language that's supported, you can use the
ScriptedLookupService to tailor the behavior to your exact specification.
The dynamic properties also support EL, so depending your use case you
might be able to leverage that.

Ex of a Groovy script built for ScriptedLookupService:
https://gist.github.com/alopresto/78eb1a2c2b878f75f61481269af38a9f

On Wed, Apr 11, 2018 at 6:19 AM, françois lacombe <
francois.laco...@dcbrain.com> wrote:

> Hi all,
>
> This morning, i'm trying to update records from a csv file prior to send
> them in a pgsql db.
> The UpdateRecord processor sounds to be the most useful to do so.
>
> Given problem is I have to replace values of some columns, depending of
> current value:
> 1 => a
> 2 => b
> 3 => c
> ...
> 10 => j
>
> UpdateRecord actually accepts custom properties to set a unique value of a
> given key (with Literal replacement strategy) but how can I provide a kind
> of map of values depending of existing? Is this even possible ?
>
> I thought of a combination of RouteOnAttribute and UpdateRecord processors
> but this would lead to dozen of processors in my pipeline since I have
> approximately 50 different replacement to make.
> I hope I won't have to choose this option :)
>
>
> Thanks in advance for any input, all the best
>
> François Lacombe
>


Re: processGroupId URL

2018-04-11 Thread Matt Gilman
Hey Scott,

Sorry, I misunderstood the original question. I thought you wanted to get
able to get the URL for a specific processor in the REST API. You actually
wanted the UI URL with the query parameters for the component in question.
This does require the parent Process Group ID and unfortunately, it is not
possible yet. I've filed a JIRA to address this in the future [1].

The red indicators you mentioned are bulletins. Bulletins are designed to
be a notification about a passing event. They are not meant to be a
persisted or acknowledged in any manner. The main factor there is the rate
at which they are generated. A bulletin will be created for every log
message with a severity matching or worse than the configured threshold. If
you're looking to do something more meaningful with the logs you may want
to consider introducing a tool built for that. We do offer a Reporting Task
that will send the Bulletins via Site to Site to another NiFi instance
which could be used to load/store them someplace.

Matt

[1] https://issues.apache.org/jira/browse/NIFI-5072

On Fri, Apr 6, 2018 at 11:59 PM, scott  wrote:

> Hi Matt,
>
> No, I'm looking for the main UI URL, like so:
>
> http://localhost:8899/nifi/?processGroupId=9e338e2f-0162-
> 1000-969a-043d35e4c41d=
>
> I'm using NiFi 1.5. What I'd really like is some way to know, using a
> variable or attribute, that the processor which caused the error resides
> within processGroupId 9e338e2f-0162-1000-969a-043d35e4c41d so that I can
> build the complete URL. The URL will then be written to my log table so
> that operational users can go to the problem area with one click to
> troubleshoot.
>
> This reminds me I have another problem with troubleshooting I wanted to
> ask about. You know the errors that are obvious with a red indicator in the
> upper right corner of a processor or process group you can hover over? They
> go away after what seems like a few minutes. I'd really love it they would
> stay persistent until some action is taken, like a user clears an alarm.
> Any way to do that? Or, at the very least, can I make them last a lot
> longer?
>
>
> Thanks,
>
> Scott
>
> On 04/06/2018 07:20 AM, Matt Gilman wrote:
>
> Scott,
>
> What version of NiFi are you running? If your running NiFi 1.x then the
> parent process group ID shouldn't be necessary. The fully qualified URL of
> a processor would look something like
>
> http://localhost:8080/nifi-api/processors/9b52d2bf-0162-
> 1000-d1ac-89e944aa1bfe
>
> Or are you trying to build a different URL?
>
> Thanks
>
> Matt
>
> On Fri, Apr 6, 2018 at 12:07 AM, scott  wrote:
>
>> Hello community,
>>
>> I'm trying to write a log when errors occur in my flow, and I want to
>> include the fully qualified URL to the location within my flow where the
>> error occurred. I know the component ID is an attribute I can use, but I
>> also need the processGroupId where the component is located within my flow,
>> so that I can build a fully qualified URL and put it into my log to make
>> operational troubleshooting easier. Does anyone have any advice on how I
>> can get the processGroupId as a variable/attribute I can include in my log?
>>
>>
>> Thanks,
>>
>> Scott
>>
>>
>
>


[Nifi 1.5.0] Map values to be replaced in a UpdateRecord processor

2018-04-11 Thread françois lacombe
Hi all,

This morning, i'm trying to update records from a csv file prior to send
them in a pgsql db.
The UpdateRecord processor sounds to be the most useful to do so.

Given problem is I have to replace values of some columns, depending of
current value:
1 => a
2 => b
3 => c
...
10 => j

UpdateRecord actually accepts custom properties to set a unique value of a
given key (with Literal replacement strategy) but how can I provide a kind
of map of values depending of existing? Is this even possible ?

I thought of a combination of RouteOnAttribute and UpdateRecord processors
but this would lead to dozen of processors in my pipeline since I have
approximately 50 different replacement to make.
I hope I won't have to choose this option :)


Thanks in advance for any input, all the best

François Lacombe


Multi Domains Nifi connection and UI acces

2018-04-11 Thread Abdou B
Hello,

 I use Nifi 1.5 and I would like to use the functionnality that enables
Nifi to use various network interface.
So as stated in the offficial documentation, i created the following
properties

nifi.web.https.network.interface.default=0.0.0.0

nifi.web.https.network.interface.eth0=eth0
nifi.web.https.network.interface.eth1=eth1
nifi.web.https.network.interface.eth2=eth2
nifi.web.https.network.interface.eth3=eth3
nifi.web.https.network.interface.eth4=eth4

I use a certificate with SAN, the SAN includes : FQDN eth0 +  FQDN eth1 + FQDN
eth2  + FQDN eth3 +  FQDN eth4

I have to use eth1 to connect to the UI
so i set up  :
nifi.web.https.host=the FQDN of eth0
but I have an error stating that
"Cluster is still in the process of voting on the appropriate Data Flow. "

if I use the  eth0, I can't connect anymore (I got a message about header
not allowed) but the cluster seems to work.
I saw that jetty seems to be more restrictive than before and allow only
host that use the  nifi.web.https.host to connect to UI


would you have any advice ?

Best Regards


Multi Domains Nifi connectoon to UI

2018-04-11 Thread Abdou B
Hello,

 I use Nifi 1.5 and I would like to use the functionnality that enables
Nifi to use various network interface.
So as stated in the offficial documentation, i created the following
properties

nifi.web.https.network.interface.default=0.0.0.0

nifi.web.https.network.interface.eth0=eth0
nifi.web.https.network.interface.eth1=eth1
nifi.web.https.network.interface.eth2=eth2
nifi.web.https.network.interface.eth3=eth3
nifi.web.https.network.interface.eth4=eth4

I use a certificate with SAN, the SAN includes : FQDN eth0 +  FQDN eth1 + FQDN
eth2  + FQDN eth3 +  FQDN eth4

I have to use eth1 to connect to the UI
so i set up  :
nifi.web.https.host=the FQDN of eth0
but I have an error stating that
"Cluster is still in the process of voting on the appropriate Data Flow. "

if I use the  eth0, I can't connect anymore (I got a message about header
not allowed) but the cluster seems to work.
I saw that jetty seems to be more restrictive than before and allow only
host that use the  nifi.web.https.host to connect to UI


would you have any advice ?

Best Regards
Abdou