Skip to content

Instantly share code, notes, and snippets.

@dcguim
Created November 18, 2015 15:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcguim/063d5a5b6921885e9788 to your computer and use it in GitHub Desktop.
Save dcguim/063d5a5b6921885e9788 to your computer and use it in GitHub Desktop.
var elasticsearch = require('elasticsearch')
var client = new elasticsearch.Client({
host: 'localhost:9200',
log: 'trace'
});
client.ping({
requestTimeout:30000,
hello:"elasticsearch"
}, function(error) {
if (error) {
console.error('elasticsearch cluster is down!');
} else {
console.log("All is well");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment