-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Detect errors within Zookeeper.
parser = argparse.ArgumentParser(prog=__application__, description='report zk node statistics')
parser.add_argument('-z', '--zookeeper', default=None, required=False, type=verify_zk,
help='Zookeeper connection string - eg. "zk01.host.com:2181"')
parser.add_argument('-i', '--serverid', default=None, required=False, type=int,
help='Query the zookeeper node described by the given id within configuration')
parser.add_argument('-l', '--localhost', required=False, action='store_true',
help='Use localhost only for generating statistics, when this option is given, '
'no remote zookeepers will be queried. Any leader statistics will simply be skipped if the '
'localhost is not a leader!, this option is useful for when you want to log Zookeeper '
'status periodically by executing this script on all of your Zookeeper nodes, but also '
'to avoid too much cross-talk between hosts, and only report local statistics.')
parser.add_argument('-c', '--config-path', required=False, type=str,
help='ZooKeeper configuration path, if not specified these paths will be used: %s' % ZK_SEARCH_LOCATIONS)
# -- LOGGING -----------------------------------------------------------------------------------
parser.add_argument('--log-admin-commands', required=False, nargs='*', default=False,
help='Log the output of the given admin commands')
parser.add_argument('--log-admin-commands-leader', required=False, nargs='*', default=False,
help='Log the output of the given admin commands, only if we are the ensemble leader')
parser.add_argument('--log-entry-per-line', required=False, nargs='*', default=False,
help='Write a log entry per-line of output (syslog limits at 1,000 characters per log entry)')
# -- CHECKS ------------------------------------------------------------------------------------
parser.add_argument('--check-all', required=False, action='store_true', default=False,
help='Perform all checks')
parser.add_argument('--check-config-servers', required=False, action='store_true', default=False,
help='Check zookeeper servers are set within configuration (not standalone)')
parser.add_argument('--check-my-id', required=False, action='store_true', default=False,
help='Check my id is configured (if myid config file can be located)')
parser.add_argument('--check-live-nodes-consistency', required=False, action='store_true', default=False,
help='Check solrs /live_nodes are consistent across the zookeeper ensemble (leader only)')
parser.add_argument('--check-zookeeper-ensemble-connections', required=False, action='store_true', default=False,
help='Ensure there are connections between this node and other zookeeper nodes '
'Only run if the configuration on this machine indicates WE ARE A ZooKeeper HOST')
parser.add_argument('--check-solr-connections', required=False, action='store_true', default=False,
help='Ensure there are zookeeper connections somewhere within the cluster '
'Verifies that no solr node is connected to a standalone or non-responsive node (leader only)')
parser.add_argument('--check-standalone', required=False, action='store_true', default=False,
help='Ensure we are not in standalone mode')
parser.add_argument('--check-collection-status', required=False, action='store_true', default=False,
help='Check collection and replica status according to zookeeper')
parser.add_argument('--check-collection-leader', required=False, action='store_true', default=False,
help='Check to ensure the collection leader file exists')
parser.add_argument('--check-collection-leader-consistency', required=False, action='store_true', default=False,
help='Check to ensure there is agreement of collection leaders across zookeeper')
parser.add_argument('--check-overseer-queue', required=False, action='store_true', default=False,
help='Check to ensure the overseer queue is not too large')
parser.add_argument('--check-overseer-collection-work-queue', required=False, action='store_true', default=False,
help='Check to ensure the collection work queue isnt too large')
parser.add_argument('--check-overseer-election', required=False, action='store_true', default=False,
help='Check to ensure the election nodes are consistent, and that all solr live-nodes are represented')
# -- Check ephemeral/watches --------------------------------------
parser.add_argument('--check-ephemeral-versions', required=False, action='store_true', default=False,
help='Ensure ephemeral watches znode versions are consistent (leader only)')
parser.add_argument('--check-ephemeral-sessions', required=False, action='store_true', default=False,
help='Check to ensure all ephemeral nodes have valid sessions associated with them. ZOOKEEPER-2355 can cause orphaned ephemeral nodes')
parser.add_argument('--check-watch-versions', required=False, action='store_true', default=False,
help='Ensure all watched znodes versions are consistent (leader only)')
parser.add_argument('--check-ephemerals-count', required=False, action='store_true', default=False,
help='Check to ensure there is an ephemerals count greater than zero according to "mntr"')
parser.add_argument('--check-watches-count', required=False, action='store_true', default=False,
help='Check to ensure there is a watches count greater than zero according to "mntr"')
parser.add_argument('--check-ephemerals-similarity', required=False, action='store_true', default=False,
help='Check to ensure there is an ephemerals count within 33% of eachother across nodes using "mntr" (leader only)')
parser.add_argument('--check-solr-watches', required=False, action='store_true', default=False,
help='Check to ensure each live solr host has appropriate watches')
parser.add_argument('--check-client-watches', required=False, action='store_true', default=False,
help='Check to ensure each solr client has appropriate and consistent watches')
parser.add_argument('--check-zookeeper-version-consistency', required=False, action='store_true', default=False,
help='Check to ensure there is consistency of versions across zookeeper ensemble (leader only)')
return parser
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels