Add ZooKeeper support to CDH plugin

implements bp: cdh-zookeeper-support

Change-Id: Ib93f2c698fab49766db3b92b747896200e4d315b
This commit is contained in:
singinforest 2014-11-03 21:24:58 +08:00 committed by Ken Chen
parent 17e4f4dac5
commit 55e8fbc8d3
8 changed files with 531 additions and 3 deletions

View File

@ -37,6 +37,7 @@ OOZIE_SERVICE_NAME = 'oozie01'
HIVE_SERVICE_NAME = 'hive01'
HUE_SERVICE_NAME = 'hue01'
SPARK_SERVICE_NAME = 'spark_on_yarn01'
ZOOKEEPER_SERVICE_NAME = 'zookeeper01'
def have_cm_api_libs():
@ -104,6 +105,8 @@ def get_service(process, cluster=None, instance=None):
return cm_cluster.get_service(HUE_SERVICE_NAME)
elif process in ['SPARK_YARN_HISTORY_SERVER']:
return cm_cluster.get_service(SPARK_SERVICE_NAME)
elif process in ['SERVER']:
return cm_cluster.get_service(ZOOKEEPER_SERVICE_NAME)
else:
raise ValueError(
_("Process %(process)s is not supported by CDH plugin") %
@ -159,6 +162,7 @@ def get_role_name(instance, service):
'SERVICEMONITOR': 'SM',
'WEBHCAT': 'WHC',
'SPARK_YARN_HISTORY_SERVER': 'SHS',
'SERVER': 'S',
}
return '%s_%s' % (shortcuts.get(service, service),
instance.hostname().replace('-', '_'))

View File

@ -107,6 +107,8 @@ hue_service_confs = _load_json(path_to_config + 'hue-service.json')
hue_role_confs = _load_json(path_to_config + 'hue-hue.json')
spark_service_confs = _load_json(path_to_config + 'spark-service.json')
spark_role_confs = _load_json(path_to_config + 'spark-history.json')
zookeeper_server_confs = _load_json(path_to_config + 'zookeeper-server.json')
zookeeper_service_confs = _load_json(path_to_config + 'zookeeper-service.json')
priority_one_confs = _load_json(path_to_config + 'priority-one-confs.json')
@ -150,6 +152,8 @@ def _get_ng_plugin_configs():
cfg += _init_configs(hue_role_confs, 'HUE', 'node')
cfg += _init_configs(spark_service_confs, 'SPARK_ON_YARN', 'cluster')
cfg += _init_configs(spark_role_confs, 'SPARK_ON_YARN', 'node')
cfg += _init_configs(zookeeper_service_confs, 'ZOOKEEPER', 'cluster')
cfg += _init_configs(zookeeper_server_confs, 'ZOOKEEPER', 'node')
return cfg

View File

@ -42,6 +42,7 @@ OOZIE_SERVICE_TYPE = 'OOZIE'
HIVE_SERVICE_TYPE = 'HIVE'
HUE_SERVICE_TYPE = 'HUE'
SPARK_SERVICE_TYPE = 'SPARK_ON_YARN'
ZOOKEEPER_SERVICE_TYPE = 'ZOOKEEPER'
PATH_TO_CORE_SITE_XML = '/etc/hadoop/conf/core-site.xml'
HADOOP_LIB_DIR = '/usr/lib/hadoop-mapreduce'
@ -65,7 +66,8 @@ PACKAGES = [
'oozie',
'oracle-j2sdk1.7',
'spark-history-server',
'unzip'
'unzip',
'zookeeper'
]
LOG = logging.getLogger(__name__)
@ -345,6 +347,9 @@ def _create_services(cluster):
cm_cluster = api.create_cluster(cluster.name, CDH_VERSION)
if len(pu.get_zookeepers(cluster)) > 0:
cm_cluster.create_service(cu.ZOOKEEPER_SERVICE_NAME,
ZOOKEEPER_SERVICE_TYPE)
cm_cluster.create_service(cu.HDFS_SERVICE_NAME, HDFS_SERVICE_TYPE)
cm_cluster.create_service(cu.YARN_SERVICE_NAME, YARN_SERVICE_TYPE)
cm_cluster.create_service(cu.OOZIE_SERVICE_NAME, OOZIE_SERVICE_TYPE)
@ -359,6 +364,11 @@ def _create_services(cluster):
def _configure_services(cluster):
cm_cluster = cu.get_cloudera_cluster(cluster)
if len(pu.get_zookeepers(cluster)) > 0:
zookeeper = cm_cluster.get_service(cu.ZOOKEEPER_SERVICE_NAME)
zookeeper.update_config(_get_configs(ZOOKEEPER_SERVICE_TYPE,
cluster=cluster))
hdfs = cm_cluster.get_service(cu.HDFS_SERVICE_NAME)
hdfs.update_config(_get_configs(HDFS_SERVICE_TYPE, cluster=cluster))
@ -478,6 +488,10 @@ def _install_extjs(cluster):
def start_cluster(cluster):
cm_cluster = cu.get_cloudera_cluster(cluster)
if len(pu.get_zookeepers(cluster)) > 0:
zookeeper = cm_cluster.get_service(cu.ZOOKEEPER_SERVICE_NAME)
cu.start_service(zookeeper)
hdfs = cm_cluster.get_service(cu.HDFS_SERVICE_NAME)
cu.format_namenode(hdfs)
cu.start_service(hdfs)
@ -527,7 +541,8 @@ def get_open_ports(node_group):
'HIVESERVER2': [10000],
'HUE_SERVER': [8888],
'OOZIE_SERVER': [11000, 11001],
'SPARK_YARN_HISTORY_SERVER': [18088]
'SPARK_YARN_HISTORY_SERVER': [18088],
'SERVER': [2181, 3181, 4181, 9010]
}
for process in node_group.node_processes:

View File

@ -55,7 +55,8 @@ class CDHPluginProvider(p.ProvisioningPluginBase):
"HIVEMETASTORE": ['HIVEMETASTORE'],
"WEBHCAT": ['WEBHCAT'],
"HUE": ['HUE_SERVER'],
"SPARK_ON_YARN": ['SPARK_YARN_HISTORY_SERVER']
"SPARK_ON_YARN": ['SPARK_YARN_HISTORY_SERVER'],
"ZOOKEEPER": ['SERVER']
}
def get_configs(self, hadoop_version):

View File

@ -31,6 +31,7 @@ oozie_service_name = 'oozie01'
hive_service_name = 'hive01'
hue_service_name = 'hue01'
spark_service_name = 'spark_on_yarn01'
zookeeper_service_name = 'zookeeper01'
def get_cm_api():
@ -98,6 +99,9 @@ def main():
spark = cluster.get_service(spark_service_name)
process_service(spark, 'spark')
zookeeper = cluster.get_service(zookeeper_service_name)
process_service(zookeeper, 'zookeeper')
if __name__ == '__main__':
main()

View File

@ -0,0 +1,350 @@
[
{
"desc": "The health test thresholds for monitoring of free space on the filesystem that contains this role's log directory. Specified as a percentage of the capacity on that filesystem. This setting is not used if a Log Directory Free Space Monitoring Absolute Thresholds setting is configured.",
"display_name": "Log Directory Free Space Monitoring Percentage Thresholds",
"name": "log_directory_free_space_percentage_thresholds",
"value": "{\"critical\":\"never\",\"warning\":\"never\"}"
},
{
"desc": "<p>This file contains the rules which govern how log messages are turned into events by the custom log4j appender that this role loads. It is in JSON format, and is composed of a list of rules. Every log message is evaluated against each of these rules in turn to decide whether or not to send an event for that message.</p><p>Each rule has some or all of the following fields:</p><ul><li><span class='code'>alert</span> - whether or not events generated from this rule should be promoted to alerts. A value of \"true\" will cause alerts to be generated. If not specified, the default is \"false\".</li><li><span class='code'>rate</span> <strong>(mandatory)</strong> - the maximum number of log messages matching this rule that may be sent as events every minute. If more than <tt>rate</tt> matching log messages are received in a single minute, the extra messages are ignored. If rate is less than 0, the number of messages per minute is unlimited.</li><li><span class='code'>periodminutes</span> - the number of minutes during which the publisher will only publish <tt>rate</tt> events or fewer. If not specified, the default is <strong>one minute</strong></li><li><span class='code'>threshold</span> - apply this rule only to messages with this log4j severity level or above. An example is \"WARN\" for warning level messages or higher.</li><li><span class='code'>content</span> - match only those messages whose contents match this regular expression.</li><li><span class='code'>exceptiontype</span> - match only those messages which are part of an exception message. The exception type must match this regular expression.</li></ul><br/><p>Example:<span class='code'>{\"alert\": false, \"rate\": 10, \"exceptiontype\": \"java.lang.StringIndexOutOfBoundsException\"}</span></p><p>This rule will send events to Cloudera Manager for every <span class='code'>StringIndexOutOfBoundsException</span>, up to a maximum of 10 every minute.</p>",
"display_name": "Rules to Extract Events from Log Files",
"name": "log_event_whitelist",
"value": "{\n \"version\": \"0\",\n \"rules\": [\n {\"alert\": false, \"rate\": 1, \"periodminutes\": 1, \"threshold\":\"FATAL\"},\n {\"alert\": false, \"rate\": 0, \"threshold\":\"WARN\", \"content\": \".* is deprecated. Instead, use .*\"},\n {\"alert\": false, \"rate\": 0, \"threshold\":\"WARN\", \"content\": \".* is deprecated. Use .* instead\"},\n {\"alert\": false, \"rate\": 1, \"periodminutes\": 2, \"exceptiontype\": \".*\"},\n {\"alert\": false, \"rate\": 1, \"periodminutes\": 1, \"threshold\":\"WARN\"}\n ]\n}\n"
},
{
"desc": "The port to monitor for inter-server communication",
"display_name": "Quorum Port",
"name": "quorumPort",
"value": "3181"
},
{
"desc": "The period to review when computing the moving average of the outstanding requests queue size. Specified in minutes.",
"display_name": "ZooKeeper Server Outstanding Requests Monitoring Period",
"name": "zookeeper_server_outstanding_requests_window",
"value": "3"
},
{
"desc": "The port to monitor for leadership election",
"display_name": "Election Port",
"name": "electionPort",
"value": "4181"
},
{
"desc": "Specifies the name of the user that has read-only privileges when using password file based authentication for JMX access. JMX authentication must be enabled for this setting to take effect.",
"display_name": "Name of User with Read-Only access to the JMX Agent",
"name": "jmx_passwd_file_readonly_user",
"value": "monitorRole"
},
{
"desc": "The health check thresholds of the weighted average size of the ZooKeeper Server connection count over a recent period. See ZooKeeper Server Connection Count Monitoring Period.",
"display_name": "ZooKeeper Server Connection Count Thresholds",
"name": "zookeeper_server_connection_count_thresholds",
"value": "{\"critical\":\"never\",\"warning\":\"never\"}"
},
{
"desc": "Weight for the read I/O requests issued by this role. The greater the weight, the higher the priority of the requests when the host experiences I/O contention. Must be between 100 and 1000. Defaults to 1000 for processes not managed by Cloudera Manager.",
"display_name": "Cgroup I/O Weight",
"name": "rm_io_weight",
"value": "500"
},
{
"desc": "The disk location that ZooKeeper will use to store its transaction logs.",
"display_name": "Transaction Log Directory",
"name": "dataLogDir",
"value": "/var/lib/zookeeper"
},
{
"desc": "The port used by the JMX agent to service requests",
"display_name": "JMX Agent Port",
"name": "server_jmx_agent_port",
"value": "9010"
},
{
"desc": "The health test thresholds for the weighted average time spent in Java garbage collection. Specified as a percentage of elapsed wall clock time.",
"display_name": "Garbage Collection Duration Thresholds",
"name": "zookeeper_server_gc_duration_thresholds",
"value": "{\"critical\":\"60.0\",\"warning\":\"30.0\"}"
},
{
"desc": "The tolerance window that will be used in the detection of a ZooKeeper server's membership in a quorum. Specified in minutes.",
"display_name": "Quorum Membership Detection Window",
"name": "zookeeper_server_quorum_membership_detection_window",
"value": "3"
},
{
"desc": "Enables the health test that the Server's process state is consistent with the role configuration",
"display_name": "Server Process Health Test",
"name": "zookeeper_server_scm_health_enabled",
"value": "true"
},
{
"desc": "The address (IPv4, IPv6, or hostname) to monitor for client connections. This is the address that clients attempt to connect to. This setting is optional, because by default, ZooKeeper binds in such a way that any connection to the client port for any address/interface/NIC on the server will be accepted.",
"display_name": "Client Port Address",
"name": "clientPortAddress",
"value": null
},
{
"desc": "When computing the overall Server health, consider the host's health.",
"display_name": "Server Host Health Test",
"name": "zookeeper_server_host_health_enabled",
"value": "true"
},
{
"desc": "The disk location that ZooKeeper will use to store its database snapshots.",
"display_name": "Data Directory",
"name": "dataDir",
"value": "/var/lib/zookeeper"
},
{
"desc": "The health test thresholds of the number of file descriptors used. Specified as a percentage of file descriptor limit.",
"display_name": "File Descriptor Monitoring Thresholds",
"name": "zookeeper_server_fd_thresholds",
"value": "{\"critical\":\"70.0\",\"warning\":\"50.0\"}"
},
{
"desc": "The health check thresholds of the weighted average size of the ZooKeeper Server outstanding requests queue over a recent period. See ZooKeeper Server Outstanding Requests Monitoring Period.",
"display_name": "ZooKeeper Server Outstanding Requests Thresholds",
"name": "zookeeper_server_outstanding_requests_thresholds",
"value": "{\"critical\":\"never\",\"warning\":\"never\"}"
},
{
"desc": "Maximum size in bytes for the Java Process heap memory. Passed to Java -Xmx.",
"display_name": "Java Heap Size of ZooKeeper Server in Bytes",
"name": "zookeeper_server_java_heapsize",
"value": "1073741824"
},
{
"desc": "When set, this role's process is automatically (and transparently) restarted in the event of an unexpected failure.",
"display_name": "Automatically Restart Process",
"name": "process_auto_restart",
"value": "true"
},
{
"desc": "<p>The configured triggers for this role. This is a JSON formatted list of triggers. These triggers are evaluated as part as the health system. Every trigger expression is parsed, and if the trigger condition is met, the list of actions provided in the trigger expression is executed.</p><p>Each trigger has all of the following fields:</p><ul><li><code>triggerName</code> <strong>(mandatory)</strong> - the name of the trigger. This value must be unique for the specific role. </li><li><code>triggerExpression</code> <strong>(mandatory)</strong> - a tsquery expression representing the trigger. </li><li><code>streamThreshold</code> <strong>(optional)</strong> - the maximum number of streams that can satisfy a condition of a trigger before the condition fires. By default set to 0, and any stream returned will cause the condition to fire. </li><li><code>enabled</code> <strong> (optional)</strong> - by default set to 'true'. If set to 'false' the trigger will not be evaluated.</li></ul></p><p>For example, here is a JSON formatted trigger configured for a DataNode that fires if the DataNode has more than 1500 file-descriptors opened:</p><p><pre>[{\"triggerName\": \"sample-trigger\",\n \"triggerExpression\": \"IF (SELECT fd_open WHERE roleName=$ROLENAME and last(fd_open) > 1500) DO health:bad\",\n \"streamThreshold\": 0, \"enabled\": \"true\"}]</pre></p><p>Consult the trigger rules documentation for more details on how to write triggers using tsquery.</p><p>The JSON format is evolving and may change in the future and as a result backward compatibility is not guaranteed between releases at this time.</p>",
"display_name": "Role Triggers",
"name": "role_triggers",
"value": "[]"
},
{
"desc": "The minimum session timeout, in milliseconds, that the ZooKeeper Server will allow the client to negotiate",
"display_name": "Minimum Session Timeout",
"name": "minSessionTimeout",
"value": "4000"
},
{
"desc": "Specifies the name of the user that has read-write privileges when using password file based authentication for JMX access. JMX authentication must be enabled for this setting to take effect.",
"display_name": "Name of User with Read-Write Access to the JMX Agent",
"name": "jmx_passwd_file_readwrite_user",
"value": "controlRole"
},
{
"desc": "Soft memory limit to assign to this role, enforced by the Linux kernel. When the limit is reached, the kernel will reclaim pages charged to the process if and only if the host is facing memory pressure. If reclaiming fails, the kernel may kill the process. Both anonymous as well as page cache pages contribute to the limit. Use a value of -1 B to specify no limit. By default processes not managed by Cloudera Manager will have no limit.",
"display_name": "Cgroup Memory Soft Limit",
"name": "rm_memory_soft_limit",
"value": "-1"
},
{
"desc": "When set, generates heap dump file when java.lang.OutOfMemoryError is thrown.",
"display_name": "Dump Heap When Out of Memory",
"name": "oom_heap_dump_enabled",
"value": "false"
},
{
"desc": "The health check thresholds for monitoring of free space on the filesystem that contains the ZooKeeper server's data directory. Specified as a percentage of the capacity on that filesystem. This setting is not used if a Data Directory Free Space Monitoring Absolute Thresholds setting is configured.",
"display_name": "Data Directory Free Space Monitoring Percentage Thresholds",
"name": "zookeeper_server_data_directory_free_space_percentage_thresholds",
"value": "{\"critical\":\"never\",\"warning\":\"never\"}"
},
{
"desc": "Hard memory limit to assign to this role, enforced by the Linux kernel. When the limit is reached, the kernel will reclaim pages charged to the process. If reclaiming fails, the kernel may kill the process. Both anonymous as well as page cache pages contribute to the limit. Use a value of -1 B to specify no limit. By default processes not managed by Cloudera Manager will have no limit.",
"display_name": "Cgroup Memory Hard Limit",
"name": "rm_memory_hard_limit",
"value": "-1"
},
{
"desc": "The period to review when computing unexpected exits.",
"display_name": "Unexpected Exits Monitoring Period",
"name": "unexpected_exits_window",
"value": "5"
},
{
"desc": "Enables authentication when interacting with the JMX agent on the ZooKeeper server.",
"display_name": "Enable Authenticated Communication with the JMX Agent",
"name": "enable_jmx_authentication",
"value": "false"
},
{
"desc": "The period to review when computing the moving average of the connection count. Specified in minutes.",
"display_name": "ZooKeeper Server Connection Count Monitoring Period",
"name": "zookeeper_server_connection_count_window",
"value": "3"
},
{
"desc": "For advanced use only, a string to be inserted into <strong>log4j.properties</strong> for this role only.",
"display_name": "Server Logging Advanced Configuration Snippet (Safety Valve)",
"name": "log4j_safety_valve",
"value": null
},
{
"desc": "For advanced use only, a string to be inserted into <strong>zoo.cfg</strong> for this role only.",
"display_name": "Server Advanced Configuration Snippet (Safety Valve) for zoo.cfg",
"name": "zookeeper_config_safety_valve",
"value": null
},
{
"desc": "The health test thresholds for monitoring of free space on the filesystem that contains this role's log directory.",
"display_name": "Log Directory Free Space Monitoring Absolute Thresholds",
"name": "log_directory_free_space_absolute_thresholds",
"value": "{\"critical\":\"5.36870912E9\",\"warning\":\"1.073741824E10\"}"
},
{
"desc": "The maximum number of concurrent connections (at the socket level) that a single client, identified by the IP address, may make to a single member of the ZooKeeper ensemble. This setting is used to prevent certain classes of DoS attacks, including file descriptor exhaustion. To remove the limit on concurrent connections, set this value to 0.",
"display_name": "Maximum Client Connections",
"name": "maxClientCnxns",
"value": "60"
},
{
"desc": "If configured, overrides the process soft and hard rlimits (also called ulimits) for file descriptors to the configured value.",
"display_name": "Maximum Process File Descriptors",
"name": "rlimit_fds",
"value": null
},
{
"desc": "These arguments will be passed as part of the Java command line. Commonly, garbage collection flags or extra debugging flags would be passed here.",
"display_name": "Java Configuration Options for Zookeeper Server",
"name": "zk_server_java_opts",
"value": ""
},
{
"desc": "When set, Cloudera Manager will send alerts when the health of this role reaches the threshold specified by the EventServer setting eventserver_health_events_alert_threshold",
"display_name": "Enable Health Alerts for this Role",
"name": "enable_alerts",
"value": "true"
},
{
"desc": "The maximum size, in megabytes, per log file for Server logs. Typically used by log4j.",
"display_name": "Server Max Log Size",
"name": "max_log_size",
"value": "200"
},
{
"desc": "When set, a SIGKILL signal is sent to the role process when java.lang.OutOfMemoryError is thrown.",
"display_name": "Kill When Out of Memory",
"name": "oom_sigkill_enabled",
"value": "true"
},
{
"desc": "The maximum session timeout, in milliseconds, that the ZooKeeper Server will allow the client to negotiate",
"display_name": "Maximum Session Timeout",
"name": "maxSessionTimeout",
"value": "40000"
},
{
"desc": "The health test thresholds for unexpected exits encountered within a recent period specified by the unexpected_exits_window configuration for the role.",
"display_name": "Unexpected Exits Thresholds",
"name": "unexpected_exits_thresholds",
"value": "{\"critical\":\"any\",\"warning\":\"never\"}"
},
{
"desc": "The health check thresholds for monitoring of free space on the filesystem that contains the ZooKeeper server's data log directory.",
"display_name": "Data Log Directory Free Space Monitoring Absolute Thresholds",
"name": "zookeeper_server_data_log_directory_free_space_absolute_thresholds",
"value": "{\"critical\":\"5.36870912E9\",\"warning\":\"1.073741824E10\"}"
},
{
"desc": "When set, Cloudera Manager will send alerts when this entity's configuration changes.",
"display_name": "Enable Configuration Change Alerts",
"name": "enable_config_alerts",
"value": "false"
},
{
"desc": "The port to monitor for client connections. This is the port that clients attempt to connect to.",
"display_name": "Client Port",
"name": "clientPort",
"value": "2181"
},
{
"desc": "The period to review when computing the moving average of garbage collection time.",
"display_name": "Garbage Collection Duration Monitoring Period",
"name": "zookeeper_server_gc_duration_window",
"value": "5"
},
{
"desc": "Specifies the password of the user that has read-write privileges when using password file based authentication for JMX access. JMX authentication must be enabled for this setting to take effect.",
"display_name": "Password of user with read-write access to the JMX agent",
"name": "jmx_passwd_file_readwrite_user_password",
"value": "CONTROL"
},
{
"desc": "Directory where ZooKeeper will place its log files.",
"display_name": "ZooKeeper Log Directory",
"name": "zk_server_log_dir",
"value": "/var/log/zookeeper"
},
{
"desc": "The maximum number of rolled log files to keep for Server logs. Typically used by log4j.",
"display_name": "Server Maximum Log File Backups",
"name": "max_log_backup_index",
"value": "10"
},
{
"desc": "Enables the JMX agent on the ZooKeeper server. Turning this off on any of the ZooKeeper servers that are part of a service will prevent Cloudera Manager from being able to monitor that server and may affect the monitoring provided on the entire service.",
"display_name": "Enable JMX Agent",
"name": "enable_jmx_agent",
"value": "true"
},
{
"desc": "The percentage thresholds of the ratio of the maximum request latency to the maximum client-negotiable session timeout since the server was started.",
"display_name": "Maximum Latency Monitoring Thresholds",
"name": "zookeeper_server_max_latency_thresholds",
"value": "{\"critical\":\"100.0\",\"warning\":\"75.0\"}"
},
{
"desc": "Number of CPU shares to assign to this role. The greater the number of shares, the larger the share of the host's CPUs that will be given to this role when the host experiences CPU contention. Must be between 2 and 262144. Defaults to 1024 for processes not managed by Cloudera Manager.",
"display_name": "Cgroup CPU Shares",
"name": "rm_cpu_shares",
"value": "1024"
},
{
"desc": "Path to directory where heap dumps are generated when java.lang.OutOfMemoryError error is thrown. This directory is automatically created if it doesn't exist. However, if this directory already exists, role user must have write access to this directory. If this directory is shared amongst multiple roles, it should have 1777 permissions. Note that the heap dump files are created with 600 permissions and are owned by the role user. The amount of free space in this directory should be greater than the maximum Java Process heap size configured for this role.",
"display_name": "Heap Dump Directory",
"name": "oom_heap_dump_dir",
"value": "/tmp"
},
{
"desc": "The health check thresholds for monitoring of free space on the filesystem that contains the ZooKeeper Server's data directory.",
"display_name": "Data Directory Free Space Monitoring Absolute Thresholds",
"name": "zookeeper_server_data_directory_free_space_absolute_thresholds",
"value": "{\"critical\":\"5.36870912E9\",\"warning\":\"1.073741824E10\"}"
},
{
"desc": "Enables the quorum membership check for this ZooKeeper Server.",
"display_name": "Enable the Quorum Membership Check",
"name": "zookeeper_server_quorum_membership_enabled",
"value": "true"
},
{
"desc": "The health check thresholds for monitoring of free space on the filesystem that contains the ZooKeeper server's data log directory. Specified as a percentage of the capacity on that filesystem. This setting is not used if a Data Log Directory Free Space Monitoring Absolute Thresholds setting is configured.",
"display_name": "Data Log Directory Free Space Monitoring Percentage Thresholds",
"name": "zookeeper_server_data_log_directory_free_space_percentage_thresholds",
"value": "{\"critical\":\"never\",\"warning\":\"never\"}"
},
{
"desc": "Unique identifier for each ZooKeeper server, typically starts at 1",
"display_name": "ZooKeeper Server ID",
"name": "serverId",
"value": null
},
{
"desc": "The minimum log level for Server logs",
"display_name": "Server Logging Threshold",
"name": "log_threshold",
"value": "INFO"
},
{
"desc": "Specifies the password of the user that has read-only privileges when using password file based authentication for JMX access. JMX authentication must be enabled for this setting to take effect.",
"display_name": "Password of User with Read-Only Access to the JMX agent",
"name": "jmx_passwd_file_readonly_user_password",
"value": "MONITOR"
}
]

View File

@ -0,0 +1,146 @@
[
{
"desc": "Configures the path of the root znode under which all canary updates are performed",
"display_name": "ZooKeeper Canary Root Znode Path",
"name": "zookeeper_canary_root_path",
"value": "/cloudera_manager_zookeeper_canary"
},
{
"desc": "The user that this service's processes should run as.",
"display_name": "System User",
"name": "process_username",
"value": "zookeeper"
},
{
"desc": "The frequency in which the log4j event publication appender will retry sending undelivered log events to the Event server, in seconds",
"display_name": "Log Event Retry Frequency",
"name": "log_event_retry_frequency",
"value": "30"
},
{
"desc": "Amount of time, in ticks, to allow followers to sync with ZooKeeper. If followers fall too far behind a leader, they are dropped.",
"display_name": "Synchronization Limit",
"name": "syncLimit",
"value": "5"
},
{
"desc": "When enabled, ZooKeeper auto purge feature retains this many most recent snapshots and the corresponding transaction logs in the dataDir and dataLogDir respectively and deletes the rest. Defaults to 5. Minimum value is 3.",
"display_name": "Auto Purge Snapshots Retain Count",
"name": "autopurgeSnapRetainCount",
"value": "5"
},
{
"desc": "The time interval in hours for which the purge task has to be triggered. Set to a positive integer (1 and above) to enable the auto purging. Defaults to 24.",
"display_name": "Auto Purge Time Interval",
"name": "autopurgeInterval",
"value": "24"
},
{
"desc": "Enable Kerberos authentication for ZooKeeper.",
"display_name": "Enable Kerberos Authentication",
"name": "enableSecurity",
"value": "false"
},
{
"desc": "The number of snapshot files and corresponding transaction logs to keep when running the Cleanup command.",
"display_name": "Cleanup Retain Count",
"name": "cleanupRetainCount",
"value": "5"
},
{
"desc": "Enables the health check that a client can connect to ZooKeeper and perform basic operations",
"display_name": "ZooKeeper Canary Health Check",
"name": "zookeeper_canary_health_enabled",
"value": "true"
},
{
"desc": "Configures the timeout used by the canary sessions with ZooKeeper servers",
"display_name": "ZooKeeper Canary Session Timeout",
"name": "zookeeper_canary_session_timeout",
"value": "30000"
},
{
"desc": "The group that this service's processes should run as.",
"display_name": "System Group",
"name": "process_groupname",
"value": "zookeeper"
},
{
"desc": "When set, Cloudera Manager will send alerts when the health of this service reaches the threshold specified by the EventServer setting eventserver_health_events_alert_threshold",
"display_name": "Enable Service Level Health Alerts",
"name": "enable_alerts",
"value": "true"
},
{
"desc": "Amount of time, in ticks, to allow followers to connect and sync to a leader. Increase this value as needed, if the amount of data managed by ZooKeeper is large.",
"display_name": "Initialization Limit",
"name": "initLimit",
"value": "10"
},
{
"desc": "For advanced use only, key-value pairs (one on each line) to be inserted into a role's environment. Applies to configurations of all roles in this service except client configuration.",
"display_name": "ZooKeeper Service Environment Advanced Configuration Snippet (Safety Valve)",
"name": "zookeeper_env_safety_valve",
"value": null
},
{
"desc": "Configures the timeout used by the canary for connection establishment with ZooKeeper servers",
"display_name": "ZooKeeper Canary Connection Timeout",
"name": "zookeeper_canary_connection_timeout",
"value": "10000"
},
{
"desc": "Configures the timeout used by the canary for ZooKeeper operations",
"display_name": "ZooKeeper Canary Operation Timeout",
"name": "zookeeper_canary_operation_timeout",
"value": "30000"
},
{
"desc": "<p>The configured triggers for this service. This is a JSON formatted list of triggers. These triggers are evaluated as part as the health system. Every trigger expression is parsed, and if the trigger condition is met, the list of actions provided in the trigger expression is executed.</p><p>Each trigger has all of the following fields:</p><ul><li><code>triggerName</code> <strong>(mandatory)</strong> - the name of the trigger. This value must be unique for the specific service. </li><li><code>triggerExpression</code> <strong>(mandatory)</strong> - a tsquery expression representing the trigger. </li><li><code>streamThreshold</code> <strong>(optional)</strong> - the maximum number of streams that can satisfy a condition of a trigger before the condition fires. By default set to 0, and any stream returned will cause the condition to fire. </li><li><code>enabled</code> <strong> (optional)</strong> - by default set to 'true'. If set to 'false' the trigger will not be evaluated.</li></ul></p><p>For example, here is a JSON formatted trigger that fires if there are more than 10 DataNodes with more than 500 file-descriptors opened:</p><p><pre>[{\"triggerName\": \"sample-trigger\",\n \"triggerExpression\": \"IF (SELECT fd_open WHERE roleType = DataNode and last(fd_open) > 500) DO health:bad\",\n \"streamThreshold\": 10, \"enabled\": \"true\"}]</pre></p><p>Consult the trigger rules documentation for more details on how to write triggers using tsquery.</p><p>The JSON format is evolving and may change in the future and as a result backward compatibility is not guaranteed between releases at this time.</p>",
"display_name": "Service Triggers",
"name": "service_triggers",
"value": "[]"
},
{
"desc": "The length of time, in milliseconds, of a single tick, which is the basic time unit used by ZooKeeper. A tick is used to regulate heartbeats and timeouts.",
"display_name": "Tick Time",
"name": "tickTime",
"value": "2000"
},
{
"desc": "When set, each role will identify important log events and forward them to Cloudera Manager.",
"display_name": "Enable Log Event Capture",
"name": "catch_events",
"value": "true"
},
{
"desc": "When set, Cloudera Manager will send alerts when this entity's configuration changes.",
"display_name": "Enable Configuration Change Alerts",
"name": "enable_config_alerts",
"value": "false"
},
{
"desc": "The health test thresholds of the overall Server health. The check returns \"Concerning\" health if the percentage of \"Healthy\" Servers falls below the warning threshold. The check is unhealthy if the total percentage of \"Healthy\" and \"Concerning\" Servers falls below the critical threshold.",
"display_name": "Healthy Server Monitoring Thresholds",
"name": "zookeeper_servers_healthy_thresholds",
"value": "{\"critical\":\"51.0\",\"warning\":\"99.0\"}"
},
{
"desc": "For advanced use only, a list of derived configuration properties that will be used by the Service Monitor instead of the default ones.",
"display_name": "Service Monitor Derived Configs Advanced Configuration Snippet (Safety Valve)",
"name": "smon_derived_configs_safety_valve",
"value": null
},
{
"desc": "Whether the leader accepts client connections.",
"display_name": "Leader Serves",
"name": "leaderServes",
"value": "yes"
},
{
"desc": "Automatically create data directories at startup, if they do not exist. Enabling this configuration should be used with care as it will suppress any errors in setup of data directories.",
"display_name": "Enable auto-creation of data directories",
"name": "zookeeper_datadir_autocreate",
"value": "false"
}
]

View File

@ -58,3 +58,7 @@ def get_hue(cluster):
def get_spark_historyserver(cluster):
return u.get_instance(cluster, 'SPARK_YARN_HISTORY_SERVER')
def get_zookeepers(cluster):
return u.get_instances(cluster, 'SERVER')