Re: Sending an Alert to Slack, AWS sns, mattermost

2021-12-15 Thread Arvid Heise
I recommend using AsyncIO [1] and RichAsyncFunction instead. SinkFunction
will be removed at the end of Flink 1.X and can quickly turn into a
bottleneck if used on many requests.

[1]
https://nightlies.apache.org/flink/flink-docs-master/docs/dev/datastream/operators/asyncio/

On Tue, Dec 14, 2021 at 4:12 PM Seth Wiesman  wrote:

> Sure,
>
> Just implement `RichSinkFunction`. You will initialize your client inside
> the open method and then send alerts from invoke.
>
> Seth
>
> On Mon, Dec 13, 2021 at 9:17 PM Robert Cullen 
> wrote:
>
>> Yes, That's the correct use case.  Will this work with the DataStream
>> API?  UDFs are for the Table API, correct?  Is there a custom sink that can
>> be applied?  Such as this Fraud Detection example [1].  But in this use
>> case instead of sending the alert to a log it sends the message to a
>> webhook?
>>
>> [1]
>> https://nightlies.apache.org/flink/flink-docs-release-1.14/docs/try-flink/datastream/
>>
>> On Mon, Dec 13, 2021 at 8:25 PM Caizhi Weng  wrote:
>>
>>> Hi!
>>>
>>> Could you please elaborate more on your use case? Do you want to check
>>> the records in a data stream and if some condition is met then send an
>>> alert?
>>>
>>> If that is the case, you can use a UDF for checking and sending alerts.
>>> See [1] for detailed explanation about UDF.
>>>
>>> [1]
>>> https://nightlies.apache.org/flink/flink-docs-release-1.14/docs/dev/table/functions/udfs/
>>>
>>> Robert Cullen  于2021年12月14日周二 04:08写道:
>>>
 Hello,

 I'm looking for some guidance on how to send alert notifications from a
 DataStream to a Slack channel and possibly other alerting tools (ie. AWS
 sns, mattermost)

 --
 Robert Cullen
 240-475-4490

>>>
>>
>> --
>> Robert Cullen
>> 240-475-4490
>>
>


Re: Sending an Alert to Slack, AWS sns, mattermost

2021-12-14 Thread Seth Wiesman
Sure,

Just implement `RichSinkFunction`. You will initialize your client inside
the open method and then send alerts from invoke.

Seth

On Mon, Dec 13, 2021 at 9:17 PM Robert Cullen  wrote:

> Yes, That's the correct use case.  Will this work with the DataStream
> API?  UDFs are for the Table API, correct?  Is there a custom sink that can
> be applied?  Such as this Fraud Detection example [1].  But in this use
> case instead of sending the alert to a log it sends the message to a
> webhook?
>
> [1]
> https://nightlies.apache.org/flink/flink-docs-release-1.14/docs/try-flink/datastream/
>
> On Mon, Dec 13, 2021 at 8:25 PM Caizhi Weng  wrote:
>
>> Hi!
>>
>> Could you please elaborate more on your use case? Do you want to check
>> the records in a data stream and if some condition is met then send an
>> alert?
>>
>> If that is the case, you can use a UDF for checking and sending alerts.
>> See [1] for detailed explanation about UDF.
>>
>> [1]
>> https://nightlies.apache.org/flink/flink-docs-release-1.14/docs/dev/table/functions/udfs/
>>
>> Robert Cullen  于2021年12月14日周二 04:08写道:
>>
>>> Hello,
>>>
>>> I'm looking for some guidance on how to send alert notifications from a
>>> DataStream to a Slack channel and possibly other alerting tools (ie. AWS
>>> sns, mattermost)
>>>
>>> --
>>> Robert Cullen
>>> 240-475-4490
>>>
>>
>
> --
> Robert Cullen
> 240-475-4490
>


Re: Sending an Alert to Slack, AWS sns, mattermost

2021-12-13 Thread Robert Cullen
Yes, That's the correct use case.  Will this work with the DataStream API?
UDFs are for the Table API, correct?  Is there a custom sink that can be
applied?  Such as this Fraud Detection example [1].  But in this use case
instead of sending the alert to a log it sends the message to a webhook?

[1]
https://nightlies.apache.org/flink/flink-docs-release-1.14/docs/try-flink/datastream/

On Mon, Dec 13, 2021 at 8:25 PM Caizhi Weng  wrote:

> Hi!
>
> Could you please elaborate more on your use case? Do you want to check the
> records in a data stream and if some condition is met then send an alert?
>
> If that is the case, you can use a UDF for checking and sending alerts.
> See [1] for detailed explanation about UDF.
>
> [1]
> https://nightlies.apache.org/flink/flink-docs-release-1.14/docs/dev/table/functions/udfs/
>
> Robert Cullen  于2021年12月14日周二 04:08写道:
>
>> Hello,
>>
>> I'm looking for some guidance on how to send alert notifications from a
>> DataStream to a Slack channel and possibly other alerting tools (ie. AWS
>> sns, mattermost)
>>
>> --
>> Robert Cullen
>> 240-475-4490
>>
>

-- 
Robert Cullen
240-475-4490


Re: Sending an Alert to Slack, AWS sns, mattermost

2021-12-13 Thread Caizhi Weng
Hi!

Could you please elaborate more on your use case? Do you want to check the
records in a data stream and if some condition is met then send an alert?

If that is the case, you can use a UDF for checking and sending alerts. See
[1] for detailed explanation about UDF.

[1]
https://nightlies.apache.org/flink/flink-docs-release-1.14/docs/dev/table/functions/udfs/

Robert Cullen  于2021年12月14日周二 04:08写道:

> Hello,
>
> I'm looking for some guidance on how to send alert notifications from a
> DataStream to a Slack channel and possibly other alerting tools (ie. AWS
> sns, mattermost)
>
> --
> Robert Cullen
> 240-475-4490
>


Sending an Alert to Slack, AWS sns, mattermost

2021-12-13 Thread Robert Cullen
Hello,

I'm looking for some guidance on how to send alert notifications from a
DataStream to a Slack channel and possibly other alerting tools (ie. AWS
sns, mattermost)

-- 
Robert Cullen
240-475-4490