Skip to content

Commit

Permalink
Use /_nodes to get nodes info+stats for compatibility with ElasticS…
Browse files Browse the repository at this point in the history
…earch 1.0

`/_cluster/nodes -> /_nodes according to the breaking changes in ES RC1

Closes karmi#8
  • Loading branch information
vasily-kirichenko authored and karmi committed Jan 19, 2014
1 parent 21219b0 commit 7482067
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ App.nodes = Ember.ArrayController.create({
};

App.set("refreshing", true)
$.getJSON(App.elasticsearch_url+"/_cluster/nodes?jvm", __load_nodes_info);
$.getJSON(App.elasticsearch_url+"/_cluster/nodes/stats?indices&os&process&jvm", __load_nodes_stats);
$.getJSON(App.elasticsearch_url+"/_nodes?jvm", __load_nodes_info);
$.getJSON(App.elasticsearch_url+"/_nodes/stats?indices&os&process&jvm", __load_nodes_stats);
}
});

Expand Down
4 changes: 2 additions & 2 deletions js/libs/cubism.elasticsearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ cubism.elasticsearch = function(context, options, callback) {
// Load information about ElasticSearch nodes from the Nodes Info API
// [http://www.elasticsearch.org/guide/reference/api/admin-cluster-nodes-info.html]
//
d3.json(options.host + "/_cluster/nodes", function(cluster) {
d3.json(options.host + "/_nodes", function(cluster) {
source.cluster = cluster
source.node_names = d3.keys(cluster.nodes)

Expand Down Expand Up @@ -267,7 +267,7 @@ cubism.elasticsearch = function(context, options, callback) {
})

source.toString = function() { return options.host };
source.url = function() { return options.host + "/_cluster/nodes/stats?all" };
source.url = function() { return options.host + "/_nodes/stats?all" };

return source;
};

0 comments on commit 7482067

Please sign in to comment.