New node_info API
This commit is contained in:
@@ -112,9 +112,8 @@ class ClusterClient(NamespacedClient):
|
||||
_make_path('_nodes', node_id, 'stats', metric, fields), params=params)
|
||||
return data
|
||||
|
||||
@query_params('all', 'clear', 'http', 'jvm', 'network', 'os', 'plugin',
|
||||
'process', 'settings', 'thread_pool', 'timeout', 'transport')
|
||||
def node_info(self, node_id=None, params=None):
|
||||
@query_params('flat_settings')
|
||||
def node_info(self, node_id=None, metric=None, params=None):
|
||||
"""
|
||||
Retrieve one or more (or all) of the cluster nodes' information.
|
||||
`<http://elasticsearch.org/guide/reference/api/admin-cluster-nodes-info/>`_
|
||||
@@ -122,21 +121,16 @@ class ClusterClient(NamespacedClient):
|
||||
:arg node_id: A comma-separated list of node IDs or names to limit the
|
||||
returned information; use `_local` to return information from the node
|
||||
you're connecting to, leave empty to get information from all nodes
|
||||
:arg all: Return all available information
|
||||
:arg clear: Reset the default settings
|
||||
:arg http: Return information about HTTP
|
||||
:arg jvm: Return information about the JVM
|
||||
:arg network: Return information about network
|
||||
:arg os: Return information about the operating system
|
||||
:arg plugin: Return information about plugins
|
||||
:arg process: Return information about the Elasticsearch process
|
||||
:arg settings: Return information about node settings
|
||||
:arg thread_pool: Return information about the thread pool
|
||||
:arg timeout: Explicit operation timeout
|
||||
:arg transport: Return information about transport
|
||||
:arg metric: A comma-separated list of metrics you wish returned. Leave
|
||||
empty to return all. Possible options are "settings", "os",
|
||||
"process", "jvm", "thread_pool", "network", "transport", "http" and
|
||||
"plugin"
|
||||
:arg flat_settings: Return settings in flat format (default: false)
|
||||
"""
|
||||
if not node_id and metric:
|
||||
node_id = '_all'
|
||||
_, data = self.transport.perform_request('GET',
|
||||
_make_path('_cluster', 'nodes', node_id), params=params)
|
||||
_make_path('_nodes', node_id, metric), params=params)
|
||||
return data
|
||||
|
||||
@query_params('delay', 'exit')
|
||||
|
||||
Reference in New Issue
Block a user