Make my_node_id() work with Elasticsearch 1.x.
Make my_node_id() work with Elasticsearch 1.x.

Elasticsearch 1.0.0 replaced the /_cluster/nodes endpoint with
/_nodes. Check which version we're dealing with and choose the
correct API when trying to obtain the node id of the local node
in my_node_id().

anchor/elasticsearchadmin