Showing only one message

View: New views
5 Messages — Rating Filter:   Alert me  

Showing only one message

by jgoldman :: Rate this Message:

| View Threaded | Show Only this Message

Please I need some help with this, I need to make somekind of an alert manager, that only the first time that an specific event arrives it shows a message in the console. If some more events of the same kind arrives after the first one, they need to be ignored until another type of event arrives, which will be the event that shows that the alert was handled...
I need some directions on how to make this on esper...
Is there a way of doing this without having a boolean in my code that tells the listener to ignore the incoming events that arrives after the first one??? How is this done with esper????
Please help!

Re: Showing only one message

by Thomas Everding :: Rate this Message:

| View Threaded | Show Only this Message

Hi!

I would use multiple patterns and the followed by operator (->).
This should work if you for instance try to be alerted whenever a threshold is exceeded.

select * as highValue from input where (input.value > x)

select * as lowValue from input where (input.value <= x)

select highValue as alert from pattern [every (lowValue -> highValue)]

You will get an 'alert' event every time the values of your input change from below the threshold to above. Simply invert the last pattern to produce 'all-clear' events.

Hope this helps,
Thomas

2009/10/7 jgoldman <goldman.jorge@...>

Please I need some help with this, I need to make somekind of an alert
manager, that only the first time that an specific event arrives it shows a
message in the console. If some more events of the same kind arrives after
the first one, they need to be ignored until another type of event arrives,
which will be the event that shows that the alert was handled...
I need some directions on how to make this on esper...
Is there a way of doing this without having a boolean in my code that tells
the listener to ignore the incoming events that arrives after the first
one??? How is this done with esper????
Please help!
--
View this message in context: http://www.nabble.com/Showing-only-one-message-tp25788078p25788078.html
Sent from the Esper User list mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email





--
Dipl.-Geoinf. Thomas Everding
Research Associate
Institute for Geoinformatics, University of Muenster
http://ifgi.uni-muenster.de
http://swsl.uni-muenster.de

Re: Showing only one message

by Thomas Bernhardt :: Rate this Message:

| View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
An option can be to use named windows, insert the event into a named window then use a subquery against the named window to figure out whether to alert or not, and an on-delete to delete from the named window to free up for the next possible alert.
-Tom

From: Thomas Everding <t.everding@...>
To: user@...
Sent: Wed, October 7, 2009 11:16:38 AM
Subject: Re: [esper-user] Showing only one message

Hi!

I would use multiple patterns and the followed by operator (->).
This should work if you for instance try to be alerted whenever a threshold is exceeded.

select * as highValue from input where (input.value > x)

select * as lowValue from input where (input.value <= x)

select highValue as alert from pattern [every (lowValue -> highValue)]

You will get an 'alert' event every time the values of your input change from below the threshold to above. Simply invert the last pattern to produce 'all-clear' events.

Hope this helps,
Thomas

2009/10/7 jgoldman <goldman.jorge@...>

Please I need some help with this, I need to make somekind of an alert
manager, that only the first time that an specific event arrives it shows a
message in the console. If some more events of the same kind arrives after
the first one, they need to be ignored until another type of event arrives,
which will be the event that shows that the alert was handled...
I need some directions on how to make this on esper...
Is there a way of doing this without having a boolean in my code that tells
the listener to ignore the incoming events that arrives after the first
one??? How is this done with esper????
Please help!
--
View this message in context: http://www.nabble.com/Showing-only-one-message-tp25788078p25788078.html
Sent from the Esper User list mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email





--
Dipl.-Geoinf. Thomas Everding
Research Associate
Institute for Geoinformatics, University of Muenster
http://ifgi.uni-muenster.de
http://swsl.uni-muenster.de


Re: Showing only one message

by jgoldman :: Rate this Message:

| View Threaded | Show Only this Message

Could you please give me an example, Tom???
I am not a very experienced proggrammer, and my boss is going to kill me...
thanks

Thomas Bernhardt wrote:
An option can be to use named windows, insert the event into a named window then use a subquery against the named window to figure out whether to alert or not, and an on-delete to delete from the named window to free up for the next possible alert.
-Tom


________________________________
From: Thomas Everding <t.everding@googlemail.com>
To: user@esper.codehaus.org
Sent: Wed, October 7, 2009 11:16:38 AM
Subject: Re: [esper-user] Showing only one message

Hi!

I would use multiple patterns and the followed by operator (->).
This should work if you for instance try to be alerted whenever a threshold is exceeded.

select * as highValue from input where (input.value > x)

select * as lowValue from input where (input.value <= x)

select highValue as alert from pattern [every (lowValue -> highValue)]

You will get an 'alert' event every time the values of your input change from below the threshold to above. Simply invert the last pattern to produce 'all-clear' events.

Hope this helps,
Thomas


2009/10/7 jgoldman <goldman.jorge@gmail.com>

>
>>Please I need some help with this, I need to make somekind of an alert
>>manager, that only the first time that an specific event arrives it shows a
>>message in the console. If some more events of the same kind arrives after
>>the first one, they need to be ignored until another type of event arrives,
>>which will be the event that shows that the alert was handled...
>>I need some directions on how to make this on esper...
>>Is there a way of doing this without having a boolean in my code that tells
>>the listener to ignore the incoming events that arrives after the first
>>one??? How is this done with esper????
>>Please help!
>>--
>>View this message in context: http://www.nabble.com/Showing-only-one-message-tp25788078p25788078.html
>>Sent from the Esper User list mailing list archive at Nabble.com.
>
>
>>---------------------------------------------------------------------
>>To unsubscribe from this list, please visit:
>
>>    http://xircles.codehaus.org/manage_email
>
>
>


--
Dipl.-Geoinf. Thomas Everding
Research Associate
Institute for Geoinformatics, University of Muenster
http://ifgi.uni-muenster.de
http://swsl.uni-muenster.de



     

Re: Showing only one message

by jgoldman :: Rate this Message:

| View Threaded | Show Only this Message

I have tried something like:

 String expressionTextIgnoreAlarms = "select * from pattern [alarmevent=AlarmEvent() -> middleevent=AlarmEvent() until disarmalarmevent=DisarmAlarmEvent()]";
            EPStatement factoryIgnoreAlarmEvent = epService.getEPAdministrator().createEPL(expressionTextIgnoreAlarms);
            factoryIgnoreAlarmEvent.addListener(new IgnoreAlarmListener());

But it did not work and I don't know why...

Thomas Bernhardt wrote:
An option can be to use named windows, insert the event into a named window then use a subquery against the named window to figure out whether to alert or not, and an on-delete to delete from the named window to free up for the next possible alert.
-Tom


________________________________
From: Thomas Everding <t.everding@googlemail.com>
To: user@esper.codehaus.org
Sent: Wed, October 7, 2009 11:16:38 AM
Subject: Re: [esper-user] Showing only one message

Hi!

I would use multiple patterns and the followed by operator (->).
This should work if you for instance try to be alerted whenever a threshold is exceeded.

select * as highValue from input where (input.value > x)

select * as lowValue from input where (input.value <= x)

select highValue as alert from pattern [every (lowValue -> highValue)]

You will get an 'alert' event every time the values of your input change from below the threshold to above. Simply invert the last pattern to produce 'all-clear' events.

Hope this helps,
Thomas


2009/10/7 jgoldman <goldman.jorge@gmail.com>

>
>>Please I need some help with this, I need to make somekind of an alert
>>manager, that only the first time that an specific event arrives it shows a
>>message in the console. If some more events of the same kind arrives after
>>the first one, they need to be ignored until another type of event arrives,
>>which will be the event that shows that the alert was handled...
>>I need some directions on how to make this on esper...
>>Is there a way of doing this without having a boolean in my code that tells
>>the listener to ignore the incoming events that arrives after the first
>>one??? How is this done with esper????
>>Please help!
>>--
>>View this message in context: http://www.nabble.com/Showing-only-one-message-tp25788078p25788078.html
>>Sent from the Esper User list mailing list archive at Nabble.com.
>
>
>>---------------------------------------------------------------------
>>To unsubscribe from this list, please visit:
>
>>    http://xircles.codehaus.org/manage_email
>
>
>


--
Dipl.-Geoinf. Thomas Everding
Research Associate
Institute for Geoinformatics, University of Muenster
http://ifgi.uni-muenster.de
http://swsl.uni-muenster.de