# %{message} is always empty

**URL:** https://discuss.elastic.co/t/message-is-always-empty/288765
**Category:** Logstash
**Created:** [November 9, 2021, 2:28pm UTC](https://discuss.elastic.co/t/message-is-always-empty/288765 "2021-11-09T14:28:40Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Robert\_Neagu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/robert_neagu/32/81933_2.png) [@Robert\_Neagu](https://discuss.elastic.co/u/Robert_Neagu)
#### Post date: [November 9, 2021, 2:28pm UTC](https://discuss.elastic.co/t/message-is-always-empty/288765/1 "2021-11-09T14:28:40Z")

</div>

I want to send an email notification if there are any errors inside the Logstash import process.  
For this I'm using the email plugin inside the output section  
output {  
email {  
to =\> "[mail@gmail.com](mailto:mail@gmail.com)"  
from =\> "[server@server.com](mailto:server@server.com)"  
body =\> "%{message}"  
address =\> "address"  
port =\> port  
username =\> "username"  
password =\> "password"  
use\_tls =\> true  
debug =\> true  
authentication =\> "login"  
subject =\> "subject"  
}  
}

I want to check the %{message} to see if there are any errors but the "%{message} is always empty.

Do you know why "%{message}" is always empty or some other way to send an email notification if there are any errors inside the Logstash import process?

---

<div class="post-metadata">

### Author: ![aaron-nimocks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron-nimocks/32/73965_2.png) [@aaron-nimocks](https://discuss.elastic.co/u/aaron-nimocks)
#### Post date: [November 9, 2021, 2:32pm UTC](https://discuss.elastic.co/t/message-is-always-empty/288765/2 "2021-11-09T14:32:56Z")

</div>

Have you tried to replace your output to [stdout](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-stdout.html) so you can see what the data looks like and if there is a field called `message`?

I would try that first and if you still need help post your entire Logstash config so we can see the input and filters along with a sample of the data that is going through the input if possible.

---

<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: [December 7, 2021, 2:33pm UTC](https://discuss.elastic.co/t/message-is-always-empty/288765/3 "2021-12-07T14:33:38Z")

</div>

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