# Sending out emails...nothing happens

**URL:** https://discuss.elastic.co/t/sending-out-emails-nothing-happens/84113
**Category:** Elasticsearch
**Tags:** elastic-stack-alerting
**Created:** [April 30, 2017, 5:01pm UTC](https://discuss.elastic.co/t/sending-out-emails-nothing-happens/84113 "2017-04-30T17:01:12Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![X\_Calibur](https://avatars.discourse-cdn.com/v4/letter/x/b2d939/32.png) [@X\_Calibur](https://discuss.elastic.co/u/X_Calibur)
#### Post date: [April 30, 2017, 5:01pm UTC](https://discuss.elastic.co/t/sending-out-emails-nothing-happens/84113/1 "2017-04-30T17:01:12Z")

</div>

I have the following in my elasticsearch.yml:

xpack.notification.email.account:  
work:  
profile: test  
email\_defaults:  
from: [kibanatest@domain.com](mailto:kibanatest@domain.com)  
smtp:  
auth: false  
host: 10.12.11.125  
port: 25

and configured the following alert:

{  
"metadata": {  
"color": "red"  
},  
"trigger": {  
"schedule": {  
"interval": "30s"  
}  
},  
"input": {  
"search": {  
"request": {  
"indices": "winlogbeat-\*",  
"body": {  
"size": 0,  
"query": {  
"match": {  
"level": "Information"  
}  
}

```
			}
		}
	}
}

```

},  
"condition": {  
"compare": {  
"ctx.payload.hits.total": {  
"gt": 2  
}  
}  
},  
"actions": {  
"work": {  
"throttle\_period": "10m",  
"email": {  
"to": "someone@domain.com",  
"subject": " Encountered {{ctx.payload.hits.total}}" errors",  
"body": "Too many Windows Info, see attached data",  
"attachments": {  
"attached\_data": {  
"data": {  
"format": "json"  
}  
}  
},  
"priority": "high"  
}  
}  
}

But no emails are being generated and the logs not showing anything useful.  
For some reason running GET on /\_xpack/watcher/watch/windows\_errors brings the following:

{  
"found": true,  
"\_id": "windows\_errors",  
"\_status": {  
"version": 80,  
"state": {  
"active": true,  
"timestamp": "2017-04-30T16:09:31.340Z"  
},  
"last\_checked": "2017-04-30T16:51:37.689Z",  
"last\_met\_condition": "2017-04-30T16:51:37.689Z",  
"actions": {}  
},  
"watch": {  
"trigger": {  
"schedule": {  
"interval": "30s"  
}  
},  
"input": {  
"search": {  
"request": {  
"search\_type": "query\_then\_fetch",  
"indices": [  
"winlogbeat-\*"  
],  
"types": [],  
"body": {  
"size": 0,  
"query": {  
"match": {  
"level": "Information"  
}  
}  
}  
}  
}  
},  
"condition": {  
"always": {}  
},  
"actions": {},  
"metadata": {  
"color": "red"  
}  
}  
}

It seems like it didnt pick up any of the actions.  
What did I miss?

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [May 15, 2017, 9:01pm UTC](https://discuss.elastic.co/t/sending-out-emails-nothing-happens/84113/2 "2017-05-15T21:01:54Z")

</div>

Hey,

please format your messages, this is not readable at all. Two things you can do to debug this problem:

- First you can use the [Execute Watch API](https://www.elastic.co/guide/en/watcher/2.4/api-rest.html#api-rest-execute-watch) and paste that output here
- Or you can check out the watcher history and paste the last entry here

You should be able to see what fails.

--Alex

---

<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: [June 12, 2017, 9:09pm UTC](https://discuss.elastic.co/t/sending-out-emails-nothing-happens/84113/3 "2017-06-12T21:09:43Z")

</div>

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