# Problem With logstash output email plugin

**URL:** <https://discuss.elastic.co/t/problem-with-logstash-output-email-plugin/84379>\
**Category:** Logstash\
**Created:** [May 3, 2017, 9:03am UTC](https://discuss.elastic.co/t/problem-with-logstash-output-email-plugin/84379 "2017-05-03T09:03:36Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Baco](https://avatars.discourse-cdn.com/v4/letter/b/94ad74/32.png) [@Baco](https://discuss.elastic.co/u/Baco)\
**Post date:** [May 3, 2017, 9:03am UTC](https://discuss.elastic.co/t/problem-with-logstash-output-email-plugin/84379/1 "2017-05-03T09:03:36Z")

</div>

Could you help me with this error on my logstash 5.3 ?

couldn't find any output plugin named 'email'.

Thanks

---

<div class="post-metadata">

**Author:** ![Raja1](https://avatars.discourse-cdn.com/v4/letter/r/85f322/32.png) [@Raja1](https://discuss.elastic.co/u/Raja1)\
**Post date:** [May 3, 2017, 9:07am UTC](https://discuss.elastic.co/t/problem-with-logstash-output-email-plugin/84379/2 "2017-05-03T09:07:37Z")

</div>

Could you please provide your configuration.  
and did you followed this link while making the configuration  
[https://www.elastic.co/guide/en/logstash/current/plugins-outputs-email.html](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-email.html)

---

<div class="post-metadata">

**Author:** ![Baco](https://avatars.discourse-cdn.com/v4/letter/b/94ad74/32.png) [@Baco](https://discuss.elastic.co/u/Baco)\
**Post date:** [May 3, 2017, 9:37am UTC](https://discuss.elastic.co/t/problem-with-logstash-output-email-plugin/84379/3 "2017-05-03T09:37:48Z")

</div>

Thanks you your Answers.

Yes I followed this link.

This is my configuration:  
output {  
elasticsearch {  
hosts =\> "localhost:9200"  
}

```
    stdout {
            codec => rubydebug
            }

```

email {  
to =\> "c.bacotest@gmail.com"  
body =\> "%{message}"  
subject =\> "Alerte Logs"  
}

```
}
```

---

<div class="post-metadata">

**Author:** ![Raja1](https://avatars.discourse-cdn.com/v4/letter/r/85f322/32.png) [@Raja1](https://discuss.elastic.co/u/Raja1)\
**Post date:** [May 3, 2017, 9:41am UTC](https://discuss.elastic.co/t/problem-with-logstash-output-email-plugin/84379/4 "2017-05-03T09:41:58Z")

</div>

Could you please provide the logs and also make sure enable debug mode and then provide the logs

---

<div class="post-metadata">

**Author:** ![Baco](https://avatars.discourse-cdn.com/v4/letter/b/94ad74/32.png) [@Baco](https://discuss.elastic.co/u/Baco)\
**Post date:** [May 3, 2017, 10:03am UTC](https://discuss.elastic.co/t/problem-with-logstash-output-email-plugin/84379/5 "2017-05-03T10:03:30Z")

</div>

This is the log appeared on the console:

[2017-05-03T11:51:15,205][ERROR][logstash.agent] Cannot load an invalid configuration {:reason=\>"Couldn't find any output plugin named 'email'. Are you sure this is correct? Trying to load the email output plugin resulted in this error: Problems loading the requested plugin named email of type output. Error: NameError NameError"}

How to have the logs without debug?

Thanks

---

<div class="post-metadata">

**Author:** ![Raja1](https://avatars.discourse-cdn.com/v4/letter/r/85f322/32.png) [@Raja1](https://discuss.elastic.co/u/Raja1)\
**Post date:** [May 3, 2017, 10:24am UTC](https://discuss.elastic.co/t/problem-with-logstash-output-email-plugin/84379/6 "2017-05-03T10:24:05Z")

</div>

It is strange. Elastic team has to answer this question.

How to have the logs without debug?

You can change **log.level: info** in logstash.yml file so that you will not see debug logs.

---

<div class="post-metadata">

**Author:** ![Raja1](https://avatars.discourse-cdn.com/v4/letter/r/85f322/32.png) [@Raja1](https://discuss.elastic.co/u/Raja1)\
**Post date:** [May 3, 2017, 10:32am UTC](https://discuss.elastic.co/t/problem-with-logstash-output-email-plugin/84379/7 "2017-05-03T10:32:41Z")

</div>

One thing i can suggest you. whenever you make configuration follow some order.. Always elasticsearch configuration should be in last in output section.

Also when you are using email you should use smtp configuration because without having SMTP port i dont think you can trigger the mails.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [May 3, 2017, 11:21am UTC](https://discuss.elastic.co/t/problem-with-logstash-output-email-plugin/84379/8 "2017-05-03T11:21:47Z")

</div>

Have you tried installing the email output plugin using the instructions in the documentation?

---

<div class="post-metadata">

**Author:** ![Baco](https://avatars.discourse-cdn.com/v4/letter/b/94ad74/32.png) [@Baco](https://discuss.elastic.co/u/Baco)\
**Post date:** [May 3, 2017, 12:05pm UTC](https://discuss.elastic.co/t/problem-with-logstash-output-email-plugin/84379/9 "2017-05-03T12:05:29Z")

</div>

Hello @Raja1 ,

I tried your suggestions but the same error is always present.

Thanks you for your help.

---

<div class="post-metadata">

**Author:** ![Baco](https://avatars.discourse-cdn.com/v4/letter/b/94ad74/32.png) [@Baco](https://discuss.elastic.co/u/Baco)\
**Post date:** [May 3, 2017, 12:06pm UTC](https://discuss.elastic.co/t/problem-with-logstash-output-email-plugin/84379/10 "2017-05-03T12:06:57Z")

</div>

Hello @magnusbaeck,

Yes I tried and I followed this link : [https://www.elastic.co/guide/en/logstash/current/plugins-outputs-email.html](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-email.html)

Thanks

---

<div class="post-metadata">

**Author:** ![Baco](https://avatars.discourse-cdn.com/v4/letter/b/94ad74/32.png) [@Baco](https://discuss.elastic.co/u/Baco)\
**Post date:** [May 23, 2017, 1:17pm UTC](https://discuss.elastic.co/t/problem-with-logstash-output-email-plugin/84379/11 "2017-05-23T13:17:23Z")

</div>

Hello,

I find the solution to the problem.

Elastic stack 5.4 does not have a default email plugin. There is a way to install it so that it works:

bin/logstash-plugin install logstash-output-email

Thanks

---

<div class="post-metadata">

**Author:** ![shubham.iot](https://avatars.discourse-cdn.com/v4/letter/s/a88e57/32.png) [@shubham.iot](https://discuss.elastic.co/u/shubham.iot)\
**Post date:** [June 19, 2017, 2:33pm UTC](https://discuss.elastic.co/t/problem-with-logstash-output-email-plugin/84379/12 "2017-06-19T14:33:32Z")

</div>

@Baco

Hi Baco,

I am getting this error

**ERROR: File /usr/share/logstash/Gemfile does not exist or is not writable, aborting**

While try this command

**bin/logstash-plugin install logstash-output-email**

---

<div class="post-metadata">

**Author:** ![Baco](https://avatars.discourse-cdn.com/v4/letter/b/94ad74/32.png) [@Baco](https://discuss.elastic.co/u/Baco)\
**Post date:** [June 20, 2017, 2:43pm UTC](https://discuss.elastic.co/t/problem-with-logstash-output-email-plugin/84379/13 "2017-06-20T14:43:48Z")

</div>

Hello @shubham.iot

I had not this error when I tried this command but I think you are privileges problem for the users.

Are you verify if logstash-plugin exist in bin and if the user has the privilege to run it?

---

<div class="post-metadata">

**Author:** ![shubham.iot](https://avatars.discourse-cdn.com/v4/letter/s/a88e57/32.png) [@shubham.iot](https://discuss.elastic.co/u/shubham.iot)\
**Post date:** [June 23, 2017, 5:24pm UTC](https://discuss.elastic.co/t/problem-with-logstash-output-email-plugin/84379/14 "2017-06-23T17:24:45Z")

</div>

Hi @Baco @magnusbaeck

Thanks for your reply. It really matters a lot for me.

I verified logstash-plugin exists in bin folder in /usr/share/logstash/.  
I don't know how to check the user privilege but I gave all the permissions by using this command

**sudo chmod 777 /usr/share/logstash**

and used this also

**$ cd /usr/share/logstash  
$ sudo chmod 777 ./bin/logstash-plugin**

I still getting the same error :

**ERROR: File /usr/share/logstash/Gemfile does not exist or is not writable, aborting**

I have one more question also how you start elasticsearch, logstash and kibana?  
Like I start elasticsearch by using this **sudo /etc/init.d/elasticsearch start**  
and I start kibana by using this **sudo /etc/init.d/kibana start**  
but while doing same for logstash I get this error:  
**sudo: /etc/init.d/logstash: command not found**

I don't know whenever I start logstash as a service using this command  
**sudo systemctl start logstash.service**  
I didn't get any back message from terminal. I am using systemctl becuase I am on ubuntu 16.0.4. using latest version of all ELK.

---

<div class="post-metadata">

**Author:** ![Baco](https://avatars.discourse-cdn.com/v4/letter/b/94ad74/32.png) [@Baco](https://discuss.elastic.co/u/Baco)\
**Post date:** [June 27, 2017, 3:25pm UTC](https://discuss.elastic.co/t/problem-with-logstash-output-email-plugin/84379/15 "2017-06-27T15:25:17Z")

</div>

Hello @shubham.iot

For your error when install logstash-output-email, I have no idea and advice you to do some search on google and to open a new topic. Perhaps someone had a same problem.

To start elasticsearch, take a look at theses links:  
[https://www.elastic.co/downloads/elasticsearch](https://www.elastic.co/downloads/elasticsearch)  
[https://www.elastic.co/downloads/kibana](https://www.elastic.co/downloads/kibana)  
[https://www.elastic.co/downloads/logstash](https://www.elastic.co/downloads/logstash)

Cordialy

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 25, 2017, 3:25pm UTC](https://discuss.elastic.co/t/problem-with-logstash-output-email-plugin/84379/16 "2017-07-25T15:25:21Z")

</div>

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