Groovy Streaming Clients

Any groovy script that is placed in the following folder

$LOGSCAPE_HOME/scripts/feed
can potentially be used to handle Logscape stream events. Each script in this folder must implement a stream handle.

Depending on the data Logscape may end up streaming a lot of data. Make sure that your script is written appropriately to handle the worst case scenario. Badly written scripts may impact the performance of your manager

The stream handler has the following signature

def handle(String alertName,String host,String file,String msg, Map fields)
def handle(String alertName,String host,String file,String msg, Map fields) 
{
	....
} 

Here a 'hello world' event handler example. It's important to have the keyword 'this' at the end of the file or the event streaming will not work

 
package test.ws.sample
/**
* API methods for live feed handling
* @param params
*/
def start(String... params){
}
def stop(){
}
def handle(String alertName, String host, String file, String content, Map fields){
           println "Host:" + host + " File:" + file + " Content:" + content + " Fields:" + field
}
/**
* Must return this!
*/
this