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

How to filter out notifications with ICEventType=ARCHIVE or CHANGE

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 25th, 2007 by Anonymous

I am using RapidInformer to send Smarts notifications as emails, and I want to filter out the archive and state change of notifications.

The Notification Connector subscribes to a Smarts Notification List "RInformer_NL"
In the Smarts Global Console, I have added in the filter:
Attribute: ICEventType matches NOTIFY

This criteria seems to be ignored by Smarts. Any idea why ?

Alternatively, I'm sure that Rinf can to that for me, but I'd like to filter out at the Connector level, rather than as a Route criteria. In the connector definition, I specified "connectors/RapidInformer/RinfEventConnector.groovy" as script. But I have no clear idea what this script is used for, ... as documentation is missing :)

Thanks,
Paul

  • Login or register to post comments

RinfEventConnector.groovy is

On September 25th, 2007 berkay says:
RinfEventConnector.groovy is precisely what you need to use in this case. Smarts notification connector is executing this script for every notification it gets from the Smarts server. Notification connector creates an object called dob and passes to the groovy script. All the notification properties are passed with dob and can be accessed as dob.EventName, dob.ClassName, etc. ICEventType is a property added by the connector (does not exist in Smarts). ICEventType can be NOTIFY, CHANGE, CLEAR or ARCHIVE. You can use this variable in the groovy script to only post messages for new smarts notifications. I think the following script would do what you need.
if(ICEventType == "NOTIFY")
{
        dob.addAttributeValue("Action[0].ActionType", "SendMessage");
        dob.addAttributeValue("Action[0].Text", dob.ClassName + "::" + dob.InstanceName + " is " + dob.EventName);
        dob.each(){key,value ->
        if(value instanceof String)
        {
                dob.addAttributeValue("Action[0]." + key, value);
        }
}
As can be seen, the only change is to put the original code inside the if statement.
  • Login or register to post comments

  • Smarts Dynamic Model: Instrumentation voodoo
  • Tracking XPlanner changes using RapidInformer
  • Smarts Dynamic Model: Lets Start Simple
  • ITSM: Aligning IT management tools with the processes they support

  • Create new account
  • Request new password