I'm trying to figure out if there is any programmatic way to tell what settings an ES cluster is using. In particular, I can't seem to get at the settings it gets from elasticsearch.yml. I'm looking at cluster-level and index-level settings and I don't see what I expect. Is there any way to get ES to tell me this stuff? I ultimately want to use the java API, but I can't even find a way to do it through the REST API.
The background here is that I need my program to behave differently depending on the cluster's shard allocation settings. For example, if I want to make a new index, I need it to do something different if allocation is turned off. I have shard allocation turned off in my elasticsearch.yml, but nothing in cluster settings or index settings seems to say anything about that, so I can't tell programmatically whether allocation is allowed or not.