How create watcher email alerts and elasticsearch.yml file settings

i am trying to create threshold alert greater than 40000 send the mail .