Home
  • RapidOSS
  • Support
  • About Us
Home » sForums » Forum

Need help to filter messages in Route

iFountain Forum is no longer in use. Support functionality is moved to iFountain Issue Tracker. You are not allowed to post a new topic on this forum, please create a new ticket on iFountain Issue Tracker. You need to create a new account and login to use issue tracker.
Posted September 18th, 2007 by Anonymous

I have a route that sends to an email channel the messages received from Smarts notifications.

Smarts sends me notification for each state change, i.e NOTIFY and ARCHIVE. I'd like to filter out the message that contain:
ICEventType: NOTIFY

Should I use the "Contains Word(s)" or "Free From Expression" criteria ? What is the syntax ?

Thanks,
Paul

  • Login or register to post comments

filtering Smarts notifications

On September 18th, 2007 berkay says:

You can use the Free Form Expression. The expressions are same as they are in RapidConnector and RapidInsight. In your example, you'd use:

ICEventType == "NOTIFY" as your filter.

Note that you also should put the name of the user that posts notifications from Smarts to the From: field to filter only the messages from Smarts.

  • Login or register to post comments

OccurrenceCount is a

On September 27th, 2007 pdunon (not verified) says:

OccurrenceCount is a multiple of 10 ?

To avoid being flooded with emails when a flapping situation occurs, I'd like to send an email when the OccurrenceCount of a notification is either 1 or a multiple of 10.

What is the channel filter syntax ? Something like:
ICEventType == "NOTIFY" && ((OccurrenceCount == 1) || (OccurrenceCount _is_a_multiple_of_ 10))

Thanks for your help,
Paul

  • Login or register to post comments

routing expressions is not

On September 27th, 2007 berkay says:
routing expressions is not designed to handle something like "is multiple of. ". The best approach in this case is probably using the connector groovy script. This way, unnecessary events would not make get into RapidInformer to begin with. Connector script is written in groovy and has access to java functions, hence it can be used to post messages to RapidInformer only when OccurrenceCount is 1,11,21,31,... etc. Here is what you will have to do:
try
{
        if(dob.OccurrenceCount.toInteger() % 10 != 1)
        {
                willProcess = false;
        }       
}
catch(Exception occurrenceCountIsNullOrNonInteger){}

if(willProcess)
{
        if(dob.ICEventType == "NOTIFY" || dob.ICEventType == "CLEAR")
        {
                dob.FirstNotifiedAt = convertToHumanReadableFormat(dob.FirstNotifiedAt);
                dob.LastNotifiedAt = convertToHumanReadableFormat(dob.LastNotifiedAt);
                dob.LastClearedAt = convertToHumanReadableFormat(dob.LastClearedAt);
                dob.LastChangedAt = convertToHumanReadableFormat(dob.LastChangedAt);
                dob.addAttributeValue("Action[0].ActionType", "SendMessage");
                dob.addAttributeValue("Action[0].Text", dob.ClassDisplayName + "::" + dob.InstanceDisplayName + " is " + dob.EventDisplayName);
                dob.each(){key,value ->
                        if(value instanceof String)
                        {
                                dob.addAttributeValue("Action[0]." + key, value);
                        }
                }
        }
}
  • Login or register to post comments

  • Create new account
  • Request new password