Output email plugin

Hi there i want to use email plugin.i get this error:

Cannot create pipeline {:reason=>"Couldn't find any output plugin named 'email'

this is pipeline.conf:

output {
if	"ERROR" in [LEVEL]
{
elasticsearch {
  hosts=>"localhost:9200"
  }
  }
  email {
        options => [ "smtpIporHost", "smtp.gmail.com",
         "port", "587",
         "userName", "user",
         "password", "mypassword",
         "authenticationType", "plain",
         "starttls","true"
           ]
            from => "transmitter"
            subject => "logstash alert"
            to => "receiver"
            via => "smtp"
            body => "Here is the event line that occured: %{message}"
       }
stdout { codec => rubydebug }
}

Any help is greatly appreciate.

Install the plugin as explained in its documentation.

Yes,thank you for your help.now i get this error:

Unknown setting 'options' for email
Cannot create pipeline {:reason=>"Something is wrong with your configuration."

this is pipeline.conf
output {
email {
to => "receiver"
codec => "plain"
contenttype => "text/html; charset=UTF-8"
options => {
smtpIporHost => "smtp.gmail.com"
port => 465
userName => "user"
password => "password"
starttls => true
}
}
}
thanks.

I believe the options setting was removed a while back. Again, look at the email plugin documentation. It tells you which settings are available to you.

I followed the documentation.now i this get error:

Something happen while delivering an email {:exception=>#<Errno::ECONNREFUSED: Connection refused - Connection refused

output {
 email {
  to => "receiver"
  address => "localhost"
  codec => "plain"
  contenttype => "text/html; charset=UTF-8"
  via => "smtp"
  port => 25
  domain => "localhost"
  from => "logstash.alert@nowhere.com"
  subject => "Test"
  use_tls => false

  }
}

But this isn't equivalent to your previous configuration. Do you have an SMTP server running on localhost? Didn't you want to use Gmail instead?

I don't have SMTP server running on localhost,so,what is the configuration to be worked.

Thanks

I think all the options you specified in your first post have direct equivalents in the new version of the email output so it should be easy to translate them.

I'm not sure your original configuration is correct, though. Port 465 is for SMTPS (i.e. SSL-wrapped SMTP) but you tried to enable STARTTLS which typically is used with port 25 or 587 (never 465).

I am appreciate your help.this is my original configuration:

input {
        file {
        path => "c:/logstash.log"
        start_position => "beginning"
        sincedb_path => "/dev/null"
        codec => multiline {
        pattern => "^%{TIMESTAMP_ISO8601}"
        #negate => true
        what => "previous"
   }
        }
}
filter {
grok{
	  match => { "message" => "%{TIME:timestamp} %{LOGLEVEL:LEVEL} %{GREEDYDATA:errormsg}" }
	}
}
output {
 email {
  to => "receiver"
  address => "localhost"
  codec => "plain"
  contenttype => "text/html; charset=UTF-8"
  via => "smtp"
  port => 25
  domain => "localhost"
  from => "logstash.alert@nowhere.com"
  subject => "Test"
  use_tls => false
  }
}

Big thanks

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