Category Archives: Programming

Send EMail (GMail/Google Mail) using Java Mail API

Send EMail (GMail/Google Mail) using Java Mail API

           This article details on how to send mail (GMail/Google Mail) using Java API. Google by default does not allow any 3rd party applications to access GMail account from any programming language. Google provide an option to turn on Less secure apps to get access from external applications. The following program works if… Read More »

Execute Raw Elasticsearch Query using Transport Client – Java API

Execute Raw Elasticsearch Query using Transport Client – Java API

           The following sample program details on how to execute raw Elasticsearch query using Transport Client (Java API).  Maven Dependencies: <dependencies> <dependency> <groupId>org.elasticsearch</groupId> <artifactId>elasticsearch</artifactId> <version>1.5.0</version> </dependency> <dependency> <groupId>org.json</groupId> <artifactId>json</artifactId> <version>20140107</version> </dependency> </dependencies>            Add the above MAVAN dependencies to the POM file or add the JARs specified in… Read More »

Setup Quartz Scheduler with MYSQL Database

Setup Quartz Scheduler with MYSQL Database

Setup Quartz Scheduler with MYSQL Database

Setup Quartz Scheduler with MYSQL Database

This article details on how to setup Quartz server with MYSQL database. Setup MYSQL Download the latest version of Quartz distribution from the website http://quartz-scheduler.org/downloads and extract it. The distribution will be in TAR format. Install MYSQL and go to command line interface to create the required database and tables. Create a database named quartz. Now use… Read More »

Import Data from Mongo DB to Elasticsearch using Elasticsearch River

Import Data from Mongo DB to Elasticsearch using Elasticsearch River

Import Data from Mongo DB to Elasticsearch using Elasticsearch River

Import Data from Mongo DB to Elasticsearch using Elasticsearch River

           Importing data from Mongo DB to Elasticsearch requires Mongo DB to have replica set enabled. Once the replica set is enabled, Mongo DB populates the oplog (operation log) as and when we add documents to the collection in the database (except database named local, which is used by Mongo DB to… Read More »

Monitor Elasticsearch Servers with Shell Script – E-Mail Notification

Monitor Elasticsearch Servers with Shell Script - E-Mail Notification

Monitor Elasticsearch Servers with Shell Script – E-Mail Notification

Monitor Elasticsearch Servers with Shell Script - E-Mail Notification

           The following shell script can be used to monitor Elasticsearch servers. The basic idea is that the server (IP:9200) will respond with a color code(Green, Red and Yellow). We use the color code to know the status of the server and notify the users through configured E-Mail addresses. An E-Mail… Read More »