Email plugin (LS 2.1.1 windows) for Gmail

Hi colleagues!

I have an issue with LS 2.1.1 windows, in email plugin for gmail configuration. Thus, the email is not sent. Despite of the email is not sent, the indices are created normally.
When I iniciate logstash, the output of Power Shell sends the error below:

C:\logstash-2.1.1\bin>logstash -f logstashTMC.conf
io/console not supported; tty will not be manipulated
Settings: Default filter workers: 1
Logstash startup completed

C:/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/mail-2.6.3/lib/mail/network/delivery_methods/sendmail.rb:72 warning: unsupported popen option: err

The logstash.conf configuration is below:

output {
	elasticsearch { 
		hosts => ["localhost:9200"] 
		index => 'systemout_tmc'
	}	
	email {
		address => "smtp.gmail.com"
		port => 587
		use_tls => true
		authentication => "plain"
		from => "xxx@gmail.com"
		username => "xxx@gmail.com"
		password => "xxx"
		subject => "TEST"
		to => "xxx@gmail.com"
		via => "sendmail"
		body => "TEST"
	}
}

Any ideia folks?

Thanks for help.

The error message is weird, but unless you have installed a sendmail-compatible program on your Windows box you'll want to keep via at its default value ("smtp").

Hi Magnus.

I have not installed a sendmail-compatible, so I have changed via => "sendmail" to via => "smtp".
But it has returned a permission error:

C:\logstash-2.1.1\bin>logstash -f logstashTMC.conf
io/console not supported; tty will not be manipulated
Settings: Default filter workers: 1
Logstash startup completed

←[31mSomething happen while delivering an email {:exception=>#< SocketError: Permission denied: no further information>, :level=>:error}←[0m

Notice that the xxx@gmail.com account, which sends the email, has habilitated the smtp service.

What this error permission would be?

Are outgoing connections blocked in the Windows firewall? If not I don't know what's going on.

The email plugin needs to have the firewall desabilitted to send emails?
I have searched about Elastalert, it does the samething that email plugin of LS does?

Thanks!

The email plugin needs to have the firewall desabilitted to send emails?

You don't have to disable the firewall completely, but you obviously need to be able to connect to smtp.gmail.com:587. Perhaps there's a proxy in the way? Is there another SMTP server in your network that you can connect to instead?

I have searched about Elastalert, it does the samething that email plugin of LS does?

I have never heard of Elastalert.

Hi Magnus!

The situation was due the firewall blocking. I allowed the SMTP 587 port and it worked.

Thanks a lot!