def health(self, indices=None, level="<STR_LIT>", wait_for_status=None,<EOL>wait_for_relocating_shards=None, timeout=<NUM_LIT:30>):
if indices:<EOL><INDENT>path = make_path("<STR_LIT>", "<STR_LIT>", "<STR_LIT:U+002C>".join(indices))<EOL><DEDENT>else:<EOL><INDENT>path = make_path("<STR_LIT>", "<STR_LIT>")<EOL><DEDENT>mapping = {}<EOL>if level != "<STR_LIT>":<EOL><INDENT>if level not in ["<STR_LIT>", "<STR_LIT>", "<STR_LIT>"]:<EOL><INDENT>raise ValueError("<STR_LIT>" % level)<EOL><DEDENT>mapping['<STR_LIT>'] = level<EOL><DEDENT>if wait_for_status:<EOL><INDENT>if wait_for_status not in ["<STR_LIT>", "<STR_LIT>", "<STR_LIT>"]:<EOL><INDENT>raise ValueError("<STR_LIT>" % wait_for_status)<EOL><DEDENT>mapping['<STR_LIT>'] = wait_for_status<EOL>mapping['<STR_LIT>'] = "<STR_LIT>" % timeout<EOL><DEDENT>return self.conn._send_request('<STR_LIT:GET>', path, params=mapping)<EOL>
Check the current :ref:`cluster health <es-guide-reference-api-admin-cluster-health>`.
Request Parameters

The cluster health API accepts the following request parameters:

:param level: Can be one of cluster, indices or shards. Controls the
                details level of the health information returned.
                Defaults to *cluster*.
:param wait_for_status: One of green, yellow or red. Will wait (until
                        the timeout provided) until the status of the
                        cluster changes to the one provided.
                        By default, will not wait for any status.
:param wait_for_relocating_shards: A number controlling to how many
                                   relocating shards to wait for.
                                   Usually will be 0 to indicate to
                                   wait till all relocation have
                                   happened. Defaults to not to wait.
:param timeout: A time based parameter controlling how long to wait
                if one of the wait_for_XXX are provided.
                Defaults to 30s.