PERL based log analyzer
SourceForge.net Logo
Home Home Contact us Contacts
Overview Documentation Downloads Contacts Links
 
News & Updates
 
July 21, 2008
v 1.0 now available
Quick Links
 
Sourceforge project's page
CeCILL license
CEA web site
An example with a trigger next up previous contents
Next: An example with a Up: A boolean composite event Previous: A little more complicated:   Contents

An example with a trigger

This is just a simple example that extends one of the former examples that I gave in this document. It has no other interest than providing a sample of the use of a trigger. There was an example to start a dead process with use of ``ps -edf'' as a CMND_OUT log. I just added a trigger to say hello to the newly started process. The trigger is activated only the the event that is associated to him triggers from 'event activated' to 'event not activated'.

Kazimir: LogFile = /dev/tty ; EventDir = /tmp/eventdir ; OutputDir = /tmp/outputdir ;\
	LockFile = /tmp/kazimir.lock ; EventUpdateInt = 5 
	
Log: Name = PsEdf ; Type = CMND_OUT ; Path = ps -edf | grep toto | grep -v grep ; UpdateInt = 10s ; TimeFormat = NONE


Pattern: Name = PsToto ; Log = PsEdf ; RegExp =toto; 

Event : Name = TotoNotHere ; Fenetre = 15s; 
Begin 
	!PsToto 
End

Trigger: Name = TototIsBack ; Event = TotoNotHere ;

Order: Name = ordre1 ; Event = TotoNotHere ; Action = StartToto;
Action: Name = StartToto ; Path = /usr/local/bin/toto ;  

Order: Name = TotoReturns ; Event = TototIsBack ; Action = SayHelloToto ;
Action: Name = SayHelloToto ; Path = echo ``Hello Toto''



Philippe Deniel 2008-07-22
Designed by CMG Technologies, adapted by Thomas LEIBOVICI
Design downloaded from Free Templates