How to configure email alert with Gmail in elasticsearch on ubuntu 16.04/18.04/20.04 LTS


 

In this post, We will configure Xpack notification with Gmail’s smtp alert with elasticsearch on ubuntu LTS.


Elasticsearch is an internet searcher dependent on the Lucene library. It gives a conveyed, multitenant-fit full-text internet searcher with a HTTP web interface and composition free JSON reports. Elasticsearch is created in Java. 


I believe you have already installed the elasticsearch on your ubuntu machine if not so then can you use given url to install the elasticsearch on ubuntu.


https://www.techbeginner.in/2021/01/how-to-install-elasticsearch-on-ubuntu.html

 

Step 1: SMTP Configuration 
 

You need to open the elasticsearch’s main configuration with text editor and add the following syntax for the same.

sudo vim /etc/elasticsearch/elasticsearch.yml

Add the given code in the end of the elasticsearch configuration file.

 xpack.notification.email.account:
    gmail_account:
        profile: gmail
        smtp:
            auth: true
            starttls.enable: true
            host: smtp.gmail.com
            port: 587
            user: xxxxxxxxxxxx
            password: xxxxxxxxxxxxx

 

Save and exit from the vim text editor.

 

Step 2: Restart the Service  

You need to restart the elasticsearch service to get new changes, execute the given command for the same.

sudo systemctl restart elasticsearch
sudo systemctl status elasticsearch

Conclusion

We have successfully configure Gmail’s smtp server in elasticsearch in our Ubuntu server.

How to configure email alert with Gmail in elasticsearch on ubuntu 16.04/18.04/20.04 LTS

One thought on “How to configure email alert with Gmail in elasticsearch on ubuntu 16.04/18.04/20.04 LTS

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top