Logstash output email

Hi,
I have log file contains more than one exception so i want for this file when i found a word "EXCEPTION" just sending me one email.
logstash.conf:

output{
    stdout {
    codec => rubydebug
  }
    if ("EXCEPTION" in [message]) {
    email {
    to => "aa@gmail.com"
    via => 'smtp'
	address => 'smtp.gmail.com'
    domain => 'smtp.gmail.com'
	from => 'jo@gmail.com'
    authentication => "plain"
    username => "jo@gmail.com"
	password => "pass"
	subject => 'Alert '
	body => "there is exception in this file"
	port => 25
	use_tls => true
    }
    }

This will give me when i found the word "EXCEPTION" will send me an email it means if i have 40 EXCEPTION in this file will send me 40 emails so i want just one email.

Any help would be sincerely appreciate!
Thanks.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.