You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jl...@apache.org on 2014/12/17 21:05:56 UTC
[24/37] ambari git commit: AMBARI-8745: Common Services: Refactor
HDP2.0.6 FLUME, GANGLIA, HBASE services (Jayush Luniya)
AMBARI-8745: Common Services: Refactor HDP2.0.6 FLUME, GANGLIA, HBASE services (Jayush Luniya)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b4cd4cb7
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b4cd4cb7
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b4cd4cb7
Branch: refs/heads/trunk
Commit: b4cd4cb71ffe406d1d75824ea29880e9f824ae20
Parents: 17b7155
Author: Jayush Luniya <jl...@hortonworks.com>
Authored: Wed Dec 17 11:58:43 2014 -0800
Committer: Jayush Luniya <jl...@hortonworks.com>
Committed: Wed Dec 17 11:58:43 2014 -0800
----------------------------------------------------------------------
.../common-services/FLUME/1.4.0.2.0/alerts.json | 18 +
.../1.4.0.2.0/configuration/flume-conf.xml | 33 +
.../FLUME/1.4.0.2.0/configuration/flume-env.xml | 79 +
.../FLUME/1.4.0.2.0/metainfo.xml | 68 +
.../FLUME/1.4.0.2.0/metrics.json | 716 +
.../package/files/alert_flume_agent_status.py | 99 +
.../FLUME/1.4.0.2.0/package/scripts/flume.py | 206 +
.../1.4.0.2.0/package/scripts/flume_check.py | 40 +
.../1.4.0.2.0/package/scripts/flume_handler.py | 79 +
.../FLUME/1.4.0.2.0/package/scripts/params.py | 80 +
.../templates/flume-metrics2.properties.j2 | 22 +
.../1.4.0.2.0/package/templates/flume.conf.j2 | 24 +
.../package/templates/log4j.properties.j2 | 67 +
.../common-services/GANGLIA/3.5.0/alerts.json | 137 +
.../GANGLIA/3.5.0/configuration/ganglia-env.xml | 77 +
.../common-services/GANGLIA/3.5.0/metainfo.xml | 127 +
.../GANGLIA/3.5.0/package/files/checkGmetad.sh | 37 +
.../GANGLIA/3.5.0/package/files/checkGmond.sh | 62 +
.../3.5.0/package/files/checkRrdcached.sh | 34 +
.../GANGLIA/3.5.0/package/files/gmetad.init | 73 +
.../GANGLIA/3.5.0/package/files/gmetadLib.sh | 204 +
.../GANGLIA/3.5.0/package/files/gmond.init | 73 +
.../GANGLIA/3.5.0/package/files/gmondLib.sh | 538 +
.../GANGLIA/3.5.0/package/files/rrdcachedLib.sh | 47 +
.../GANGLIA/3.5.0/package/files/setupGanglia.sh | 141 +
.../GANGLIA/3.5.0/package/files/startGmetad.sh | 68 +
.../GANGLIA/3.5.0/package/files/startGmond.sh | 85 +
.../3.5.0/package/files/startRrdcached.sh | 79 +
.../GANGLIA/3.5.0/package/files/stopGmetad.sh | 43 +
.../GANGLIA/3.5.0/package/files/stopGmond.sh | 54 +
.../3.5.0/package/files/stopRrdcached.sh | 41 +
.../3.5.0/package/files/teardownGanglia.sh | 28 +
.../GANGLIA/3.5.0/package/scripts/functions.py | 31 +
.../GANGLIA/3.5.0/package/scripts/ganglia.py | 97 +
.../3.5.0/package/scripts/ganglia_monitor.py | 243 +
.../package/scripts/ganglia_monitor_service.py | 27 +
.../3.5.0/package/scripts/ganglia_server.py | 123 +
.../package/scripts/ganglia_server_service.py | 27 +
.../GANGLIA/3.5.0/package/scripts/params.py | 164 +
.../3.5.0/package/scripts/status_params.py | 25 +
.../3.5.0/package/templates/ganglia.conf.j2 | 34 +
.../package/templates/gangliaClusters.conf.j2 | 43 +
.../3.5.0/package/templates/gangliaEnv.sh.j2 | 46 +
.../3.5.0/package/templates/gangliaLib.sh.j2 | 85 +
.../GANGLIA/3.5.0/package/templates/rrd.py.j2 | 361 +
.../HBASE/0.96.0.2.0/alerts.json | 124 +
.../0.96.0.2.0/configuration/hbase-env.xml | 135 +
.../0.96.0.2.0/configuration/hbase-log4j.xml | 143 +
.../0.96.0.2.0/configuration/hbase-policy.xml | 53 +
.../0.96.0.2.0/configuration/hbase-site.xml | 331 +
.../HBASE/0.96.0.2.0/metainfo.xml | 144 +
.../HBASE/0.96.0.2.0/metrics.json | 13635 +++++++++++++++++
.../package/files/draining_servers.rb | 164 +
.../package/files/hbaseSmokeVerify.sh | 34 +
.../0.96.0.2.0/package/scripts/__init__.py | 19 +
.../0.96.0.2.0/package/scripts/functions.py | 40 +
.../HBASE/0.96.0.2.0/package/scripts/hbase.py | 158 +
.../0.96.0.2.0/package/scripts/hbase_client.py | 43 +
.../package/scripts/hbase_decommission.py | 74 +
.../0.96.0.2.0/package/scripts/hbase_master.py | 76 +
.../package/scripts/hbase_regionserver.py | 78 +
.../0.96.0.2.0/package/scripts/hbase_service.py | 51 +
.../HBASE/0.96.0.2.0/package/scripts/params.py | 147 +
.../0.96.0.2.0/package/scripts/service_check.py | 79 +
.../0.96.0.2.0/package/scripts/status_params.py | 26 +
.../HBASE/0.96.0.2.0/package/scripts/upgrade.py | 49 +
...-metrics2-hbase.properties-GANGLIA-MASTER.j2 | 108 +
...doop-metrics2-hbase.properties-GANGLIA-RS.j2 | 102 +
.../package/templates/hbase-smoke.sh.j2 | 44 +
.../package/templates/hbase_client_jaas.conf.j2 | 23 +
.../templates/hbase_grant_permissions.j2 | 39 +
.../package/templates/hbase_master_jaas.conf.j2 | 26 +
.../templates/hbase_regionserver_jaas.conf.j2 | 26 +
.../package/templates/regionservers.j2 | 20 +
.../stacks/HDP/2.0.6/services/FLUME/alerts.json | 18 -
.../services/FLUME/configuration/flume-conf.xml | 33 -
.../services/FLUME/configuration/flume-env.xml | 79 -
.../HDP/2.0.6/services/FLUME/metainfo.xml | 44 +-
.../HDP/2.0.6/services/FLUME/metrics.json | 716 -
.../package/files/alert_flume_agent_status.py | 99 -
.../services/FLUME/package/scripts/flume.py | 206 -
.../FLUME/package/scripts/flume_check.py | 40 -
.../FLUME/package/scripts/flume_handler.py | 79 -
.../services/FLUME/package/scripts/params.py | 80 -
.../templates/flume-metrics2.properties.j2 | 22 -
.../FLUME/package/templates/flume.conf.j2 | 24 -
.../FLUME/package/templates/log4j.properties.j2 | 67 -
.../HDP/2.0.6/services/GANGLIA/alerts.json | 137 -
.../GANGLIA/configuration/ganglia-env.xml | 77 -
.../HDP/2.0.6/services/GANGLIA/metainfo.xml | 103 +-
.../GANGLIA/package/files/checkGmetad.sh | 37 -
.../GANGLIA/package/files/checkGmond.sh | 62 -
.../GANGLIA/package/files/checkRrdcached.sh | 34 -
.../services/GANGLIA/package/files/gmetad.init | 73 -
.../services/GANGLIA/package/files/gmetadLib.sh | 204 -
.../services/GANGLIA/package/files/gmond.init | 73 -
.../services/GANGLIA/package/files/gmondLib.sh | 538 -
.../GANGLIA/package/files/rrdcachedLib.sh | 47 -
.../GANGLIA/package/files/setupGanglia.sh | 141 -
.../GANGLIA/package/files/startGmetad.sh | 68 -
.../GANGLIA/package/files/startGmond.sh | 85 -
.../GANGLIA/package/files/startRrdcached.sh | 79 -
.../GANGLIA/package/files/stopGmetad.sh | 43 -
.../services/GANGLIA/package/files/stopGmond.sh | 54 -
.../GANGLIA/package/files/stopRrdcached.sh | 41 -
.../GANGLIA/package/files/teardownGanglia.sh | 28 -
.../GANGLIA/package/scripts/functions.py | 31 -
.../services/GANGLIA/package/scripts/ganglia.py | 97 -
.../GANGLIA/package/scripts/ganglia_monitor.py | 243 -
.../package/scripts/ganglia_monitor_service.py | 27 -
.../GANGLIA/package/scripts/ganglia_server.py | 123 -
.../package/scripts/ganglia_server_service.py | 27 -
.../services/GANGLIA/package/scripts/params.py | 164 -
.../GANGLIA/package/scripts/status_params.py | 25 -
.../GANGLIA/package/templates/ganglia.conf.j2 | 34 -
.../package/templates/gangliaClusters.conf.j2 | 43 -
.../GANGLIA/package/templates/gangliaEnv.sh.j2 | 46 -
.../GANGLIA/package/templates/gangliaLib.sh.j2 | 85 -
.../GANGLIA/package/templates/rrd.py.j2 | 361 -
.../stacks/HDP/2.0.6/services/HBASE/alerts.json | 124 -
.../services/HBASE/configuration/hbase-env.xml | 135 -
.../HBASE/configuration/hbase-log4j.xml | 143 -
.../HBASE/configuration/hbase-policy.xml | 53 -
.../services/HBASE/configuration/hbase-site.xml | 331 -
.../HDP/2.0.6/services/HBASE/metainfo.xml | 120 +-
.../HDP/2.0.6/services/HBASE/metrics.json | 13635 -----------------
.../HBASE/package/files/draining_servers.rb | 164 -
.../HBASE/package/files/hbaseSmokeVerify.sh | 34 -
.../services/HBASE/package/scripts/__init__.py | 19 -
.../services/HBASE/package/scripts/functions.py | 40 -
.../services/HBASE/package/scripts/hbase.py | 158 -
.../HBASE/package/scripts/hbase_client.py | 43 -
.../HBASE/package/scripts/hbase_decommission.py | 74 -
.../HBASE/package/scripts/hbase_master.py | 76 -
.../HBASE/package/scripts/hbase_regionserver.py | 78 -
.../HBASE/package/scripts/hbase_service.py | 51 -
.../services/HBASE/package/scripts/params.py | 147 -
.../HBASE/package/scripts/service_check.py | 79 -
.../HBASE/package/scripts/status_params.py | 26 -
.../services/HBASE/package/scripts/upgrade.py | 49 -
...-metrics2-hbase.properties-GANGLIA-MASTER.j2 | 108 -
...doop-metrics2-hbase.properties-GANGLIA-RS.j2 | 102 -
.../HBASE/package/templates/hbase-smoke.sh.j2 | 44 -
.../package/templates/hbase_client_jaas.conf.j2 | 23 -
.../templates/hbase_grant_permissions.j2 | 39 -
.../package/templates/hbase_master_jaas.conf.j2 | 26 -
.../templates/hbase_regionserver_jaas.conf.j2 | 26 -
.../HBASE/package/templates/regionservers.j2 | 20 -
.../python/stacks/2.0.6/FLUME/test_flume.py | 79 +-
.../stacks/2.0.6/FLUME/test_service_check.py | 8 +-
.../2.0.6/GANGLIA/test_ganglia_monitor.py | 26 +-
.../stacks/2.0.6/GANGLIA/test_ganglia_server.py | 20 +-
.../stacks/2.0.6/HBASE/test_hbase_client.py | 16 +-
.../stacks/2.0.6/HBASE/test_hbase_master.py | 57 +-
.../2.0.6/HBASE/test_hbase_regionserver.py | 39 +-
.../2.0.6/HBASE/test_hbase_service_check.py | 14 +-
156 files changed, 20959 insertions(+), 20780 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/b4cd4cb7/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/alerts.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/alerts.json b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/alerts.json
new file mode 100644
index 0000000..80244d2
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/alerts.json
@@ -0,0 +1,18 @@
+{
+ "FLUME": {
+ "service": [],
+ "FLUME_HANDLER": [
+ {
+ "name": "flume_agent_status",
+ "label": "Flume Agent Status",
+ "description": "This host-level alert is triggerd if any of the expected flume agent processes are not available.",
+ "interval": 1,
+ "scope": "ANY",
+ "source": {
+ "type": "SCRIPT",
+ "path": "HDP/2.0.6/services/FLUME/package/files/alert_flume_agent_status.py"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/b4cd4cb7/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/configuration/flume-conf.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/configuration/flume-conf.xml b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/configuration/flume-conf.xml
new file mode 100644
index 0000000..8ff764b
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/configuration/flume-conf.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+
+<configuration supports_final="false">
+ <property>
+ <name>content</name>
+ <description>Flume agent configurations.
+ Specifying the configuration here applies to all hosts in this configuration-group. Please use host specific configuration-groups to provide different configurations on different hosts.
+ For configuring multiple agents on the same host, provide the combined agent configurations here. Each agent should have a different name.</description>
+ <value>
+# Flume agent config
+ </value>
+ </property>
+</configuration>
http://git-wip-us.apache.org/repos/asf/ambari/blob/b4cd4cb7/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/configuration/flume-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/configuration/flume-env.xml b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/configuration/flume-env.xml
new file mode 100644
index 0000000..bb56f9c
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/configuration/flume-env.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+
+<configuration>
+ <property>
+ <name>flume_conf_dir</name>
+ <value>/etc/flume/conf</value>
+ <description>Location to save configuration files</description>
+ </property>
+ <property>
+ <name>flume_log_dir</name>
+ <value>/var/log/flume</value>
+ <description>Location to save log files</description>
+ </property>
+ <property>
+ <name>flume_user</name>
+ <value>flume</value>
+ <property-type>USER</property-type>
+ <description>Flume User</description>
+ </property>
+
+ <!-- flume-env.sh -->
+ <property>
+ <name>content</name>
+ <description>This is the jinja template for flume-env.sh file</description>
+ <value>
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# If this file is placed at FLUME_CONF_DIR/flume-env.sh, it will be sourced
+# during Flume startup.
+
+# Enviroment variables can be set here.
+
+export JAVA_HOME={{java_home}}
+
+# Give Flume more memory and pre-allocate, enable remote monitoring via JMX
+# export JAVA_OPTS="-Xms100m -Xmx2000m -Dcom.sun.management.jmxremote"
+
+# Note that the Flume conf directory is always included in the classpath.
+#TODO temporary addition
+export FLUME_CLASSPATH=$FLUME_CLASSPATH:/usr/lib/flume/lib/*
+
+export HIVE_HOME={{flume_hive_home}}
+export HCAT_HOME={{flume_hcat_home}}
+ </value>
+ </property>
+</configuration>
http://git-wip-us.apache.org/repos/asf/ambari/blob/b4cd4cb7/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/metainfo.xml b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/metainfo.xml
new file mode 100644
index 0000000..cb05b02
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/metainfo.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<metainfo>
+ <schemaVersion>2.0</schemaVersion>
+ <services>
+ <service>
+ <name>FLUME</name>
+ <displayName>Flume</displayName>
+ <comment>A distributed service for collecting, aggregating, and moving large amounts of streaming data into HDFS</comment>
+ <version>1.4.0.2.0</version>
+ <components>
+ <component>
+ <name>FLUME_HANDLER</name>
+ <displayName>Flume</displayName>
+ <category>SLAVE</category>
+ <cardinality>1+</cardinality>
+ <commandScript>
+ <script>scripts/flume_handler.py</script>
+ <scriptType>PYTHON</scriptType>
+ <timeout>600</timeout>
+ </commandScript>
+ </component>
+ </components>
+
+ <osSpecifics>
+ <osSpecific>
+ <osFamily>any</osFamily>
+ <packages>
+ <package>
+ <name>flume</name>
+ </package>
+ </packages>
+ </osSpecific>
+ </osSpecifics>
+
+ <commandScript>
+ <script>scripts/flume_check.py</script>
+ <scriptType>PYTHON</scriptType>
+ <timeout>300</timeout>
+ </commandScript>
+
+ <requiredServices>
+ <service>HDFS</service>
+ </requiredServices>
+
+ <configuration-dependencies>
+ <config-type>flume-env</config-type>
+ <config-type>flume-conf</config-type>
+ </configuration-dependencies>
+
+ </service>
+ </services>
+</metainfo>
http://git-wip-us.apache.org/repos/asf/ambari/blob/b4cd4cb7/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/metrics.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/metrics.json b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/metrics.json
new file mode 100644
index 0000000..2114c12
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/metrics.json
@@ -0,0 +1,716 @@
+{
+ "FLUME_HANDLER": {
+ "Component": [
+ {
+ "type": "ganglia",
+ "metrics": {
+ "metrics/boottime":{
+ "metric":"boottime",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/cpu/cpu_aidle":{
+ "metric":"cpu_aidle",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/cpu/cpu_idle":{
+ "metric":"cpu_idle",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/cpu/cpu_nice":{
+ "metric":"cpu_nice",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/cpu/cpu_num":{
+ "metric":"cpu_num",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/cpu/cpu_speed":{
+ "metric":"cpu_speed",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/cpu/cpu_system":{
+ "metric":"cpu_system",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/cpu/cpu_user":{
+ "metric":"cpu_user",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/cpu/cpu_wio":{
+ "metric":"cpu_wio",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/disk/disk_free":{
+ "metric":"disk_free",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/disk/disk_total":{
+ "metric":"disk_total",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/disk/part_max_used":{
+ "metric":"part_max_used",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/jvm/gcCount":{
+ "metric":"jvm.metrics.gcCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/jvm/gcTimeMillis":{
+ "metric":"jvm.metrics.gcTimeMillis",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/jvm/logError":{
+ "metric":"jvm.metrics.logError",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/jvm/logFatal":{
+ "metric":"jvm.metrics.logFatal",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/jvm/logInfo":{
+ "metric":"jvm.metrics.logInfo",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/jvm/logWarn":{
+ "metric":"jvm.metrics.logWarn",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/jvm/maxMemoryM":{
+ "metric":"jvm.metrics.maxMemoryM",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/jvm/memHeapCommittedM":{
+ "metric":"jvm.metrics.memHeapCommittedM",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/jvm/memHeapUsedM":{
+ "metric":"jvm.metrics.memHeapUsedM",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/jvm/memNonHeapCommittedM":{
+ "metric":"jvm.metrics.memNonHeapCommittedM",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/jvm/memNonHeapUsedM":{
+ "metric":"jvm.metrics.memNonHeapUsedM",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/jvm/threadsBlocked":{
+ "metric":"jvm.metrics.threadsBlocked",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/jvm/threadsNew":{
+ "metric":"jvm.metrics.threadsNew",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/jvm/threadsRunnable":{
+ "metric":"jvm.metrics.threadsRunnable",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/jvm/threadsTerminated":{
+ "metric":"jvm.metrics.threadsTerminated",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/jvm/threadsTimedWaiting":{
+ "metric":"jvm.metrics.threadsTimedWaiting",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/jvm/threadsWaiting":{
+ "metric":"jvm.metrics.threadsWaiting",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/CHANNEL/$2/ChannelCapacity":{
+ "metric":"(\\w+).CHANNEL.(\\w+).ChannelCapacity",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/CHANNEL/$2/StartTime":{
+ "metric":"(\\w+).CHANNEL.(\\w+).StartTime",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/CHANNEL/$2/EventTakeAttemptCount":{
+ "metric":"(\\w+).CHANNEL.(\\w+).EventTakeAttemptCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/CHANNEL/$2/EventTakeSuccessCount":{
+ "metric":"(\\w+).CHANNEL.(\\w+).EventTakeSuccessCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/CHANNEL/$2/EventPutAttemptCount":{
+ "metric":"(\\w+).CHANNEL.(\\w+).EventPutAttemptCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/CHANNEL/$2/StopTime":{
+ "metric":"(\\w+).CHANNEL.(\\w+).StopTime",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/CHANNEL/$2/ChannelFillPercentage":{
+ "metric":"(\\w+).CHANNEL.(\\w+).ChannelFillPercentage",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/CHANNEL/$2/ChannelSize":{
+ "metric":"(\\w+).CHANNEL.(\\w+).ChannelSize",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/CHANNEL/$2/EventPutSuccessCount":{
+ "metric":"(\\w+).CHANNEL.(\\w+).EventPutSuccessCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SINK/$2/ConnectionCreatedCount":{
+ "metric":"(\\w+).SINK.(\\w+).ConnectionCreatedCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SINK/$2/BatchCompleteCount":{
+ "metric":"(\\w+).SINK.(\\w+).BatchCompleteCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SINK/$2/EventDrainSuccessCount":{
+ "metric":"(\\w+).SINK.(\\w+).EventDrainSuccessCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SINK/$2/StartTime":{
+ "metric":"(\\w+).SINK.(\\w+).StartTime",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SINK/$2/EventDrainAttemptCount":{
+ "metric":"(\\w+).SINK.(\\w+).EventDrainAttemptCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SINK/$2/ConnectionFailedCount":{
+ "metric":"(\\w+).SINK.(\\w+).ConnectionFailedCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SINK/$2/BatchUnderflowCount":{
+ "metric":"(\\w+).SINK.(\\w+).BatchUnderflowCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SINK/$2/ConnectionClosedCount":{
+ "metric":"(\\w+).SINK.(\\w+).ConnectionClosedCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SINK/$2/StopTime":{
+ "metric":"(\\w+).SINK.(\\w+).StopTime",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SINK/$2/BatchEmptyCount":{
+ "metric":"(\\w+).SINK.(\\w+).BatchEmptyCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SOURCE/$2/AppendBatchReceivedCount":{
+ "metric":"(\\w+).SOURCE.(\\w+).AppendBatchReceivedCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SOURCE/$2/AppendAcceptedCount":{
+ "metric":"(\\w+).SOURCE.(\\w+).AppendAcceptedCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SOURCE/$2/StartTime":{
+ "metric":"(\\w+).SOURCE.(\\w+).StartTime",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SOURCE/$2/OpenConnectionCount":{
+ "metric":"(\\w+).SOURCE.(\\w+).OpenConnectionCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SOURCE/$2/AppendBatchAcceptedCount":{
+ "metric":"(\\w+).SOURCE.(\\w+).AppendBatchAcceptedCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SOURCE/$2/AppendReceivedCount":{
+ "metric":"(\\w+).SOURCE.(\\w+).AppendReceivedCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SOURCE/$2/EventReceivedCount":{
+ "metric":"(\\w+).SOURCE.(\\w+).EventReceivedCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SOURCE/$2/StopTime":{
+ "metric":"(\\w+).SOURCE.(\\w+).StopTime",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SOURCE/$2/EventAcceptedCount":{
+ "metric":"(\\w+).SOURCE.(\\w+).EventAcceptedCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+
+ "metrics/flume/$1.substring(0)/CHANNEL/$2.replaceAll(\"[^-]+\",\"\")EventTakeSuccessCount/rate/min": {
+ "metric":"(\\w+).CHANNEL.(\\w+).EventTakeSuccessCount._rate._min",
+ "pointInTime":false,
+ "temporal":true
+ },
+ "metrics/flume/$1.substring(0)/CHANNEL/$2.replaceAll(\"[^-]+\",\"\")EventTakeSuccessCount/rate/max": {
+ "metric":"(\\w+).CHANNEL.(\\w+).EventTakeSuccessCount._rate._max",
+ "pointInTime":false,
+ "temporal":true
+ },
+ "metrics/flume/$1.substring(0)/CHANNEL/$2.replaceAll(\"[^-]+\",\"\")EventTakeSuccessCount/rate/avg": {
+ "metric":"(\\w+).CHANNEL.(\\w+).EventTakeSuccessCount._rate._avg",
+ "pointInTime":false,
+ "temporal":true
+ },
+ "metrics/flume/$1.substring(0)/CHANNEL/$2.replaceAll(\"[^-]+\",\"\")EventTakeSuccessCount/rate/sum": {
+ "metric":"(\\w+).CHANNEL.(\\w+).EventTakeSuccessCount._rate._sum",
+ "pointInTime":false,
+ "temporal":true
+ },
+
+ "metrics/flume/$1.substring(0)/CHANNEL/$2.replaceAll(\"[^-]+\",\"\")EventPutSuccessCount/rate/avg": {
+ "metric":"(\\w+).CHANNEL.(\\w+).EventPutSuccessCount._rate._avg",
+ "pointInTime":false,
+ "temporal":true
+ },
+ "metrics/flume/$1.substring(0)/CHANNEL/$2.replaceAll(\"[^-]+\",\"\")EventPutSuccessCount/rate/max": {
+ "metric":"(\\w+).CHANNEL.(\\w+).EventPutSuccessCount._rate._max",
+ "pointInTime":false,
+ "temporal":true
+ },
+ "metrics/flume/$1.substring(0)/CHANNEL/$2.replaceAll(\"[^-]+\",\"\")EventPutSuccessCount/rate/min": {
+ "metric":"(\\w+).CHANNEL.(\\w+).EventPutSuccessCount._rate._min",
+ "pointInTime":false,
+ "temporal":true
+ },
+ "metrics/flume/$1.substring(0)/CHANNEL/$2.replaceAll(\"[^-]+\",\"\")EventPutSuccessCount/rate/sum": {
+ "metric":"(\\w+).CHANNEL.(\\w+).EventPutSuccessCount._rate._sum",
+ "pointInTime":false,
+ "temporal":true
+ },
+
+ "metrics/flume/$1.substring(0)/CHANNEL/$2.replaceAll(\"[^-]+\",\"\")ChannelSize/avg": {
+ "metric":"(\\w+).CHANNEL.(\\w+).ChannelSize._avg",
+ "pointInTime":false,
+ "temporal":true
+ },
+ "metrics/flume/$1.substring(0)/CHANNEL/$2.replaceAll(\"[^-]+\",\"\")ChannelSize/max": {
+ "metric":"(\\w+).CHANNEL.(\\w+).ChannelSize._max",
+ "pointInTime":false,
+ "temporal":true
+ },
+ "metrics/flume/$1.substring(0)/CHANNEL/$2.replaceAll(\"[^-]+\",\"\")ChannelSize/min": {
+ "metric":"(\\w+).CHANNEL.(\\w+).ChannelSize._min",
+ "pointInTime":false,
+ "temporal":true
+ },
+ "metrics/flume/$1.substring(0)/CHANNEL/$2.replaceAll(\"[^-]+\",\"\")ChannelSize/sum": {
+ "metric":"(\\w+).CHANNEL.(\\w+).ChannelSize._sum",
+ "pointInTime":false,
+ "temporal":true
+ }
+
+ }
+ }
+ ],
+ "HostComponent": [
+ {
+ "type": "ganglia",
+ "metrics": {
+ "metrics/boottime":{
+ "metric":"boottime",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/cpu/cpu_aidle":{
+ "metric":"cpu_aidle",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/cpu/cpu_idle":{
+ "metric":"cpu_idle",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/cpu/cpu_nice":{
+ "metric":"cpu_nice",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/cpu/cpu_num":{
+ "metric":"cpu_num",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/cpu/cpu_speed":{
+ "metric":"cpu_speed",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/cpu/cpu_system":{
+ "metric":"cpu_system",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/cpu/cpu_user":{
+ "metric":"cpu_user",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/cpu/cpu_wio":{
+ "metric":"cpu_wio",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/disk/disk_free":{
+ "metric":"disk_free",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/disk/disk_total":{
+ "metric":"disk_total",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/disk/part_max_used":{
+ "metric":"part_max_used",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/jvm/gcCount":{
+ "metric":"jvm.metrics.gcCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/jvm/gcTimeMillis":{
+ "metric":"jvm.metrics.gcTimeMillis",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/jvm/logError":{
+ "metric":"jvm.metrics.logError",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/jvm/logFatal":{
+ "metric":"jvm.metrics.logFatal",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/jvm/logInfo":{
+ "metric":"jvm.metrics.logInfo",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/jvm/logWarn":{
+ "metric":"jvm.metrics.logWarn",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/jvm/maxMemoryM":{
+ "metric":"jvm.metrics.maxMemoryM",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/jvm/memHeapCommittedM":{
+ "metric":"jvm.metrics.memHeapCommittedM",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/jvm/memHeapUsedM":{
+ "metric":"jvm.metrics.memHeapUsedM",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/jvm/memNonHeapCommittedM":{
+ "metric":"jvm.metrics.memNonHeapCommittedM",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/jvm/memNonHeapUsedM":{
+ "metric":"jvm.metrics.memNonHeapUsedM",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/jvm/threadsBlocked":{
+ "metric":"jvm.metrics.threadsBlocked",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/jvm/threadsNew":{
+ "metric":"jvm.metrics.threadsNew",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/jvm/threadsRunnable":{
+ "metric":"jvm.metrics.threadsRunnable",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/jvm/threadsTerminated":{
+ "metric":"jvm.metrics.threadsTerminated",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/jvm/threadsTimedWaiting":{
+ "metric":"jvm.metrics.threadsTimedWaiting",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/jvm/threadsWaiting":{
+ "metric":"jvm.metrics.threadsWaiting",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/CHANNEL/$2/ChannelCapacity":{
+ "metric":"(\\w+).CHANNEL.(\\w+).ChannelCapacity",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/CHANNEL/$2/StartTime":{
+ "metric":"(\\w+).CHANNEL.(\\w+).StartTime",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/CHANNEL/$2/EventTakeAttemptCount":{
+ "metric":"(\\w+).CHANNEL.(\\w+).EventTakeAttemptCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/CHANNEL/$2/EventTakeSuccessCount":{
+ "metric":"(\\w+).CHANNEL.(\\w+).EventTakeSuccessCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/CHANNEL/$2/EventPutAttemptCount":{
+ "metric":"(\\w+).CHANNEL.(\\w+).EventPutAttemptCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/CHANNEL/$2/StopTime":{
+ "metric":"(\\w+).CHANNEL.(\\w+).StopTime",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/CHANNEL/$2/ChannelFillPercentage":{
+ "metric":"(\\w+).CHANNEL.(\\w+).ChannelFillPercentage",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/CHANNEL/$2/ChannelSize":{
+ "metric":"(\\w+).CHANNEL.(\\w+).ChannelSize",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/CHANNEL/$2/EventPutSuccessCount":{
+ "metric":"(\\w+).CHANNEL.(\\w+).EventPutSuccessCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SINK/$2/ConnectionCreatedCount":{
+ "metric":"(\\w+).SINK.(\\w+).ConnectionCreatedCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SINK/$2/BatchCompleteCount":{
+ "metric":"(\\w+).SINK.(\\w+).BatchCompleteCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SINK/$2/EventDrainSuccessCount":{
+ "metric":"(\\w+).SINK.(\\w+).EventDrainSuccessCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SINK/$2/StartTime":{
+ "metric":"(\\w+).SINK.(\\w+).StartTime",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SINK/$2/EventDrainAttemptCount":{
+ "metric":"(\\w+).SINK.(\\w+).EventDrainAttemptCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SINK/$2/ConnectionFailedCount":{
+ "metric":"(\\w+).SINK.(\\w+).ConnectionFailedCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SINK/$2/BatchUnderflowCount":{
+ "metric":"(\\w+).SINK.(\\w+).BatchUnderflowCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SINK/$2/ConnectionClosedCount":{
+ "metric":"(\\w+).SINK.(\\w+).ConnectionClosedCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SINK/$2/StopTime":{
+ "metric":"(\\w+).SINK.(\\w+).StopTime",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SINK/$2/BatchEmptyCount":{
+ "metric":"(\\w+).SINK.(\\w+).BatchEmptyCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SOURCE/$2/AppendBatchReceivedCount":{
+ "metric":"(\\w+).SOURCE.(\\w+).AppendBatchReceivedCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SOURCE/$2/AppendAcceptedCount":{
+ "metric":"(\\w+).SOURCE.(\\w+).AppendAcceptedCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SOURCE/$2/StartTime":{
+ "metric":"(\\w+).SOURCE.(\\w+).StartTime",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SOURCE/$2/OpenConnectionCount":{
+ "metric":"(\\w+).SOURCE.(\\w+).OpenConnectionCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SOURCE/$2/AppendBatchAcceptedCount":{
+ "metric":"(\\w+).SOURCE.(\\w+).AppendBatchAcceptedCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SOURCE/$2/AppendReceivedCount":{
+ "metric":"(\\w+).SOURCE.(\\w+).AppendReceivedCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SOURCE/$2/EventReceivedCount":{
+ "metric":"(\\w+).SOURCE.(\\w+).EventReceivedCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SOURCE/$2/StopTime":{
+ "metric":"(\\w+).SOURCE.(\\w+).StopTime",
+ "pointInTime":true,
+ "temporal":true
+ },
+ "metrics/flume/$1/SOURCE/$2/EventAcceptedCount":{
+ "metric":"(\\w+).SOURCE.(\\w+).EventAcceptedCount",
+ "pointInTime":true,
+ "temporal":true
+ },
+
+ "metrics/flume/$1.substring(0)/CHANNEL/$2.replaceAll(\"[^-]+\",\"\")EventTakeSuccessCount/rate/avg": {
+ "metric":"(\\w+).CHANNEL.(\\w+).EventTakeSuccessCount._rate._avg",
+ "pointInTime":false,
+ "temporal":true
+ },
+ "metrics/flume/$1.substring(0)/CHANNEL/$2.replaceAll(\"[^-]+\",\"\")EventTakeSuccessCount/rate/max": {
+ "metric":"(\\w+).CHANNEL.(\\w+).EventTakeSuccessCount._rate._max",
+ "pointInTime":false,
+ "temporal":true
+ },
+ "metrics/flume/$1.substring(0)/CHANNEL/$2.replaceAll(\"[^-]+\",\"\")EventTakeSuccessCount/rate/min": {
+ "metric":"(\\w+).CHANNEL.(\\w+).EventTakeSuccessCount._rate._min",
+ "pointInTime":false,
+ "temporal":true
+ },
+ "metrics/flume/$1.substring(0)/CHANNEL/$2.replaceAll(\"[^-]+\",\"\")EventTakeSuccessCount/rate/sum": {
+ "metric":"(\\w+).CHANNEL.(\\w+).EventTakeSuccessCount._rate._sum",
+ "pointInTime":false,
+ "temporal":true
+ },
+
+ "metrics/flume/$1.substring(0)/CHANNEL/$2.replaceAll(\"[^-]+\",\"\")EventPutSuccessCount/rate/avg": {
+ "metric":"(\\w+).CHANNEL.(\\w+).EventPutSuccessCount._rate._avg",
+ "pointInTime":false,
+ "temporal":true
+ },
+ "metrics/flume/$1.substring(0)/CHANNEL/$2.replaceAll(\"[^-]+\",\"\")EventPutSuccessCount/rate/max": {
+ "metric":"(\\w+).CHANNEL.(\\w+).EventPutSuccessCount._rate._max",
+ "pointInTime":false,
+ "temporal":true
+ },
+ "metrics/flume/$1.substring(0)/CHANNEL/$2.replaceAll(\"[^-]+\",\"\")EventPutSuccessCount/rate/min": {
+ "metric":"(\\w+).CHANNEL.(\\w+).EventPutSuccessCount._rate._min",
+ "pointInTime":false,
+ "temporal":true
+ },
+ "metrics/flume/$1.substring(0)/CHANNEL/$2.replaceAll(\"[^-]+\",\"\")EventPutSuccessCount/rate/sum": {
+ "metric":"(\\w+).CHANNEL.(\\w+).EventPutSuccessCount._rate._sum",
+ "pointInTime":false,
+ "temporal":true
+ },
+
+ "metrics/flume/$1.substring(0)/CHANNEL/$2.replaceAll(\"[^-]+\",\"\")ChannelSize/avg": {
+ "metric":"(\\w+).CHANNEL.(\\w+).ChannelSize._avg",
+ "pointInTime":false,
+ "temporal":true
+ },
+ "metrics/flume/$1.substring(0)/CHANNEL/$2.replaceAll(\"[^-]+\",\"\")ChannelSize/max": {
+ "metric":"(\\w+).CHANNEL.(\\w+).ChannelSize._max",
+ "pointInTime":false,
+ "temporal":true
+ },
+ "metrics/flume/$1.substring(0)/CHANNEL/$2.replaceAll(\"[^-]+\",\"\")ChannelSize/min": {
+ "metric":"(\\w+).CHANNEL.(\\w+).ChannelSize._min",
+ "pointInTime":false,
+ "temporal":true
+ },
+ "metrics/flume/$1.substring(0)/CHANNEL/$2.replaceAll(\"[^-]+\",\"\")ChannelSize/sum": {
+ "metric":"(\\w+).CHANNEL.(\\w+).ChannelSize._sum",
+ "pointInTime":false,
+ "temporal":true
+ }
+
+ }
+ }
+ ]
+ }
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/b4cd4cb7/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/files/alert_flume_agent_status.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/files/alert_flume_agent_status.py b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/files/alert_flume_agent_status.py
new file mode 100644
index 0000000..b183bbc
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/files/alert_flume_agent_status.py
@@ -0,0 +1,99 @@
+#!/usr/bin/env python
+
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+"""
+
+import socket
+
+from resource_management.libraries.functions.flume_agent_helper import find_expected_agent_names
+from resource_management.libraries.functions.flume_agent_helper import get_flume_status
+
+RESULT_CODE_OK = 'OK'
+RESULT_CODE_CRITICAL = 'CRITICAL'
+RESULT_CODE_UNKNOWN = 'UNKNOWN'
+
+FLUME_CONF_DIR_KEY = '{{flume-env/flume_conf_dir}}'
+
+FLUME_RUN_DIR = '/var/run/flume'
+
+def get_tokens():
+ """
+ Returns a tuple of tokens in the format {{site/property}} that will be used
+ to build the dictionary passed into execute
+ """
+ return (FLUME_CONF_DIR_KEY,)
+
+
+def execute(parameters=None, host_name=None):
+ """
+ Returns a tuple containing the result code and a pre-formatted result label
+
+ Keyword arguments:
+ parameters (dictionary): a mapping of parameter key to value
+ host_name (string): the name of this host where the alert is running
+ """
+
+ if parameters is None:
+ return (RESULT_CODE_UNKNOWN, ['There were no parameters supplied to the script.'])
+
+ flume_conf_directory = None
+ if FLUME_CONF_DIR_KEY in parameters:
+ flume_conf_directory = parameters[FLUME_CONF_DIR_KEY]
+
+ if flume_conf_directory is None:
+ return (RESULT_CODE_UNKNOWN, ['The Flume configuration directory is a required parameter.'])
+
+ if host_name is None:
+ host_name = socket.getfqdn()
+
+ processes = get_flume_status(flume_conf_directory, FLUME_RUN_DIR)
+ expected_agents = find_expected_agent_names(flume_conf_directory)
+
+ alert_label = ''
+ alert_state = RESULT_CODE_OK
+
+ if len(processes) == 0 and len(expected_agents) == 0:
+ alert_label = 'No agents defined on {0}'.format(host_name)
+ else:
+ ok = []
+ critical = []
+ text_arr = []
+
+ for process in processes:
+ if not process.has_key('status') or process['status'] == 'NOT_RUNNING':
+ critical.append(process['name'])
+ else:
+ ok.append(process['name'])
+
+ if len(critical) > 0:
+ text_arr.append("{0} {1} NOT running".format(", ".join(critical),
+ "is" if len(critical) == 1 else "are"))
+
+ if len(ok) > 0:
+ text_arr.append("{0} {1} running".format(", ".join(ok),
+ "is" if len(ok) == 1 else "are"))
+
+ plural = len(critical) > 1 or len(ok) > 1
+ alert_label = "Agent{0} {1} {2}".format(
+ "s" if plural else "",
+ " and ".join(text_arr),
+ "on " + host_name)
+
+ alert_state = RESULT_CODE_CRITICAL if len(critical) > 0 else RESULT_CODE_OK
+
+ return (alert_state, [alert_label])
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/b4cd4cb7/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume.py b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume.py
new file mode 100644
index 0000000..f4870ad
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume.py
@@ -0,0 +1,206 @@
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+"""
+
+import glob
+import json
+import os
+from resource_management import *
+from resource_management.libraries.functions.flume_agent_helper import is_flume_process_live
+from resource_management.libraries.functions.flume_agent_helper import find_expected_agent_names
+
+def flume(action = None):
+ import params
+
+ if action == 'config':
+ # remove previously defined meta's
+ for n in find_expected_agent_names(params.flume_conf_dir):
+ os.unlink(os.path.join(params.flume_conf_dir, n, 'ambari-meta.json'))
+
+ Directory(params.flume_conf_dir, recursive=True)
+ Directory(params.flume_log_dir, owner=params.flume_user)
+
+ flume_agents = {}
+ if params.flume_conf_content is not None:
+ flume_agents = build_flume_topology(params.flume_conf_content)
+
+ for agent in flume_agents.keys():
+ flume_agent_conf_dir = os.path.join(params.flume_conf_dir, agent)
+ flume_agent_conf_file = os.path.join(flume_agent_conf_dir, 'flume.conf')
+ flume_agent_meta_file = os.path.join(flume_agent_conf_dir, 'ambari-meta.json')
+ flume_agent_log4j_file = os.path.join(flume_agent_conf_dir, 'log4j.properties')
+ flume_agent_env_file = os.path.join(flume_agent_conf_dir, 'flume-env.sh')
+
+ Directory(flume_agent_conf_dir)
+
+ PropertiesFile(flume_agent_conf_file,
+ properties=flume_agents[agent],
+ mode = 0644)
+
+ File(flume_agent_log4j_file,
+ content=Template('log4j.properties.j2', agent_name = agent),
+ mode = 0644)
+
+ File(flume_agent_meta_file,
+ content = json.dumps(ambari_meta(agent, flume_agents[agent])),
+ mode = 0644)
+
+ File(flume_agent_env_file,
+ owner=params.flume_user,
+ content=InlineTemplate(params.flume_env_sh_template)
+ )
+
+ if params.has_metric_collector:
+ File(os.path.join(flume_agent_conf_dir, "flume-metrics2.properties"),
+ owner=params.flume_user,
+ content=Template("flume-metrics2.properties.j2")
+ )
+
+ elif action == 'start':
+ # desired state for service should be STARTED
+ if len(params.flume_command_targets) == 0:
+ _set_desired_state('STARTED')
+
+ # It is important to run this command as a background process.
+
+
+ flume_base = as_user(format("{flume_bin} agent --name {{0}} --conf {{1}} --conf-file {{2}} {{3}}"), params.flume_user, env={'JAVA_HOME': params.java_home}) + " &"
+
+ for agent in cmd_target_names():
+ flume_agent_conf_dir = params.flume_conf_dir + os.sep + agent
+ flume_agent_conf_file = flume_agent_conf_dir + os.sep + "flume.conf"
+ flume_agent_pid_file = params.flume_run_dir + os.sep + agent + ".pid"
+
+ if not os.path.isfile(flume_agent_conf_file):
+ continue
+
+ if not is_flume_process_live(flume_agent_pid_file):
+ # TODO someday make the ganglia ports configurable
+ extra_args = ''
+ if params.ganglia_server_host is not None:
+ extra_args = '-Dflume.monitoring.type=ganglia -Dflume.monitoring.hosts={0}:{1}'
+ extra_args = extra_args.format(params.ganglia_server_host, '8655')
+ if params.has_metric_collector:
+ extra_args = '-Dflume.monitoring.type=org.apache.hadoop.metrics2.sink.flume.FlumeTimelineMetricsSink'
+
+ flume_cmd = flume_base.format(agent, flume_agent_conf_dir,
+ flume_agent_conf_file, extra_args)
+
+ Execute(flume_cmd,
+ wait_for_finish=False,
+ environment={'JAVA_HOME': params.java_home}
+ )
+
+ # sometimes startup spawns a couple of threads - so only the first line may count
+ pid_cmd = format('pgrep -o -u {flume_user} -f ^{java_home}.*{agent}.* > {flume_agent_pid_file}')
+ Execute(pid_cmd, logoutput=True, tries=20, try_sleep=6)
+
+ pass
+ elif action == 'stop':
+ # desired state for service should be INSTALLED
+ if len(params.flume_command_targets) == 0:
+ _set_desired_state('INSTALLED')
+
+ pid_files = glob.glob(params.flume_run_dir + os.sep + "*.pid")
+
+ if 0 == len(pid_files):
+ return
+
+ agent_names = cmd_target_names()
+
+
+ for agent in agent_names:
+ pid_file = params.flume_run_dir + os.sep + agent + '.pid'
+ pid = format('`cat {pid_file}` > /dev/null 2>&1')
+ Execute(format('kill {pid}'), ignore_failures=True)
+ File(pid_file, action = 'delete')
+
+
+def ambari_meta(agent_name, agent_conf):
+ res = {}
+
+ sources = agent_conf[agent_name + '.sources'].split(' ')
+ res['sources_count'] = len(sources)
+
+ sinks = agent_conf[agent_name + '.sinks'].split(' ')
+ res['sinks_count'] = len(sinks)
+
+ channels = agent_conf[agent_name + '.channels'].split(' ')
+ res['channels_count'] = len(channels)
+
+ return res
+
+
+# define a map of dictionaries, where the key is agent name
+# and the dictionary is the name/value pair
+def build_flume_topology(content):
+
+ result = {}
+ agent_names = []
+
+ for line in content.split('\n'):
+ rline = line.strip()
+ if 0 != len(rline) and not rline.startswith('#'):
+ pair = rline.split('=')
+ lhs = pair[0].strip()
+ rhs = pair[1].strip()
+
+ part0 = lhs.split('.')[0]
+
+ if lhs.endswith(".sources"):
+ agent_names.append(part0)
+
+ if not result.has_key(part0):
+ result[part0] = {}
+
+ result[part0][lhs] = rhs
+
+ # trim out non-agents
+ for k in result.keys():
+ if not k in agent_names:
+ del result[k]
+
+ return result
+
+
+def cmd_target_names():
+ import params
+
+ if len(params.flume_command_targets) > 0:
+ return params.flume_command_targets
+ else:
+ return find_expected_agent_names(params.flume_conf_dir)
+
+
+def _set_desired_state(state):
+ import params
+ filename = os.path.join(params.flume_run_dir, 'ambari-state.txt')
+ File(filename,
+ content = state,
+ )
+
+
+def get_desired_state():
+ import params
+
+ try:
+ with open(os.path.join(params.flume_run_dir, 'ambari-state.txt'), 'r') as fp:
+ return fp.read()
+ except:
+ return 'INSTALLED'
+
http://git-wip-us.apache.org/repos/asf/ambari/blob/b4cd4cb7/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_check.py b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_check.py
new file mode 100644
index 0000000..b93b8e8
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_check.py
@@ -0,0 +1,40 @@
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+"""
+
+from resource_management import *
+
+
+class FlumeServiceCheck(Script):
+
+ def service_check(self, env):
+ import params
+
+ env.set_params(params)
+ if params.security_enabled:
+ principal_replaced = params.http_principal.replace("_HOST", params.hostname)
+ Execute(format("{kinit_path_local} -kt {http_keytab} {principal_replaced}"),
+ user=params.smoke_user)
+
+ Execute(format('env JAVA_HOME={java_home} {flume_bin} version'),
+ logoutput=True,
+ tries = 3,
+ try_sleep = 20)
+
+if __name__ == "__main__":
+ FlumeServiceCheck().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/b4cd4cb7/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_handler.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_handler.py b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_handler.py
new file mode 100644
index 0000000..a13f507
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_handler.py
@@ -0,0 +1,79 @@
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+"""
+
+from flume import flume
+from flume import get_desired_state
+
+from resource_management import *
+from resource_management.libraries.functions.flume_agent_helper import find_expected_agent_names
+from resource_management.libraries.functions.flume_agent_helper import get_flume_status
+
+class FlumeHandler(Script):
+ def install(self, env):
+ import params
+
+ self.install_packages(env)
+ env.set_params(params)
+
+ def start(self, env, rolling_restart=False):
+ import params
+
+ env.set_params(params)
+ self.configure(env)
+
+ flume(action='start')
+
+ def stop(self, env, rolling_restart=False):
+ import params
+
+ env.set_params(params)
+
+ flume(action='stop')
+
+ def configure(self, env):
+ import params
+
+ env.set_params(params)
+
+ flume(action='config')
+
+ def status(self, env):
+ import params
+ env.set_params(params)
+
+
+ processes = get_flume_status(params.flume_conf_dir, params.flume_run_dir)
+ expected_agents = find_expected_agent_names(params.flume_conf_dir)
+
+ json = {}
+ json['processes'] = processes
+ self.put_structured_out(json)
+
+ # only throw an exception if there are agents defined and there is a
+ # problem with the processes; if there are no agents defined, then
+ # the service should report STARTED (green) ONLY if the desired state is started. otherwise, INSTALLED (red)
+ if len(expected_agents) > 0:
+ for proc in processes:
+ if not proc.has_key('status') or proc['status'] == 'NOT_RUNNING':
+ raise ComponentIsNotRunning()
+ elif len(expected_agents) == 0 and 'INSTALLED' == get_desired_state():
+ raise ComponentIsNotRunning()
+
+if __name__ == "__main__":
+ FlumeHandler().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/b4cd4cb7/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/params.py
new file mode 100644
index 0000000..2997867
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/params.py
@@ -0,0 +1,80 @@
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+"""
+
+from resource_management.libraries.functions.version import format_hdp_stack_version, compare_versions
+from resource_management import *
+
+config = Script.get_config()
+
+user_group = config['configurations']['cluster-env']['user_group']
+proxyuser_group = config['configurations']['hadoop-env']['proxyuser_group']
+
+security_enabled = False
+
+hdp_stack_version = str(config['hostLevelParams']['stack_version'])
+hdp_stack_version = format_hdp_stack_version(hdp_stack_version)
+
+#hadoop params
+if hdp_stack_version != "" and compare_versions(hdp_stack_version, '2.2') >= 0:
+ flume_bin = '/usr/hdp/current/flume-server/bin/flume-ng'
+ flume_hive_home = '/usr/hdp/current/hive-metastore'
+ flume_hcat_home = '/usr/hdp/current/hive-webhcat'
+else:
+ flume_bin = '/usr/bin/flume-ng'
+ flume_hive_home = '/usr/lib/hive'
+ flume_hcat_home = '/usr/lib/hive-hcatalog'
+
+flume_conf_dir = '/etc/flume/conf'
+java_home = config['hostLevelParams']['java_home']
+flume_log_dir = '/var/log/flume'
+flume_run_dir = '/var/run/flume'
+flume_user = 'flume'
+flume_group = 'flume'
+
+if 'flume-env' in config['configurations'] and 'flume_user' in config['configurations']['flume-env']:
+ flume_user = config['configurations']['flume-env']['flume_user']
+
+if (('flume-conf' in config['configurations']) and('content' in config['configurations']['flume-conf'])):
+ flume_conf_content = config['configurations']['flume-conf']['content']
+else:
+ flume_conf_content = None
+
+if (('flume-log4j' in config['configurations']) and ('content' in config['configurations']['flume-log4j'])):
+ flume_log4j_content = config['configurations']['flume-log4j']['content']
+else:
+ flume_log4j_content = None
+
+targets = default('/commandParams/flume_handler', None)
+flume_command_targets = [] if targets is None else targets.split(',')
+
+flume_env_sh_template = config['configurations']['flume-env']['content']
+
+ganglia_server_hosts = default('/clusterHostInfo/ganglia_server_host', [])
+ganglia_server_host = None
+if 0 != len(ganglia_server_hosts):
+ ganglia_server_host = ganglia_server_hosts[0]
+
+hostname = None
+if config.has_key('hostname'):
+ hostname = config['hostname']
+
+ams_collector_hosts = default("/clusterHostInfo/metric_collector_hosts", [])
+has_metric_collector = not len(ams_collector_hosts) == 0
+if has_metric_collector:
+ metric_collector_host = ams_collector_hosts[0]
http://git-wip-us.apache.org/repos/asf/ambari/blob/b4cd4cb7/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/templates/flume-metrics2.properties.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/templates/flume-metrics2.properties.j2 b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/templates/flume-metrics2.properties.j2
new file mode 100644
index 0000000..7458bf8
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/templates/flume-metrics2.properties.j2
@@ -0,0 +1,22 @@
+{#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#}
+
+collector={{metric_collector_host}}:8188
+collectionFrequency=60000
+maxRowCacheSize=10000
+sendInterval=59000
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/b4cd4cb7/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/templates/flume.conf.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/templates/flume.conf.j2 b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/templates/flume.conf.j2
new file mode 100644
index 0000000..4dee67f
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/templates/flume.conf.j2
@@ -0,0 +1,24 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+
+# flume.conf: Add your flume configuration here and start flume
+# Note if you are using the Windows srvice or Unix service
+# provided by the HDP distribution, they will assume the
+# agent's name in this file to be 'a1'
+#
+{{flume_agent_conf_content}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/b4cd4cb7/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/templates/log4j.properties.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/templates/log4j.properties.j2 b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/templates/log4j.properties.j2
new file mode 100644
index 0000000..3b34db8
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/templates/log4j.properties.j2
@@ -0,0 +1,67 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# Define some default values that can be overridden by system properties.
+#
+# For testing, it may also be convenient to specify
+# -Dflume.root.logger=DEBUG,console when launching flume.
+
+#flume.root.logger=DEBUG,console
+flume.root.logger=INFO,LOGFILE
+flume.log.dir={{flume_log_dir}}
+flume.log.file=flume-{{agent_name}}.log
+
+log4j.logger.org.apache.flume.lifecycle = INFO
+log4j.logger.org.jboss = WARN
+log4j.logger.org.mortbay = INFO
+log4j.logger.org.apache.avro.ipc.NettyTransceiver = WARN
+log4j.logger.org.apache.hadoop = INFO
+
+# Define the root logger to the system property "flume.root.logger".
+log4j.rootLogger=${flume.root.logger}
+
+
+# Stock log4j rolling file appender
+# Default log rotation configuration
+log4j.appender.LOGFILE=org.apache.log4j.RollingFileAppender
+log4j.appender.LOGFILE.MaxFileSize=100MB
+log4j.appender.LOGFILE.MaxBackupIndex=10
+log4j.appender.LOGFILE.File=${flume.log.dir}/${flume.log.file}
+log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
+log4j.appender.LOGFILE.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss,SSS} %-5p [%t] (%C.%M:%L) %x - %m%n
+
+
+# Warning: If you enable the following appender it will fill up your disk if you don't have a cleanup job!
+# This uses the updated rolling file appender from log4j-extras that supports a reliable time-based rolling policy.
+# See http://logging.apache.org/log4j/companions/extras/apidocs/org/apache/log4j/rolling/TimeBasedRollingPolicy.html
+# Add "DAILY" to flume.root.logger above if you want to use this
+log4j.appender.DAILY=org.apache.log4j.rolling.RollingFileAppender
+log4j.appender.DAILY.rollingPolicy=org.apache.log4j.rolling.TimeBasedRollingPolicy
+log4j.appender.DAILY.rollingPolicy.ActiveFileName=${flume.log.dir}/${flume.log.file}
+log4j.appender.DAILY.rollingPolicy.FileNamePattern=${flume.log.dir}/${flume.log.file}.%d{yyyy-MM-dd}
+log4j.appender.DAILY.layout=org.apache.log4j.PatternLayout
+log4j.appender.DAILY.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss,SSS} %-5p [%t] (%C.%M:%L) %x - %m%n
+
+
+# console
+# Add "console" to flume.root.logger above if you want to use this
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.target=System.err
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern=%d (%t) [%p - %l] %m%n
http://git-wip-us.apache.org/repos/asf/ambari/blob/b4cd4cb7/ambari-server/src/main/resources/common-services/GANGLIA/3.5.0/alerts.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/GANGLIA/3.5.0/alerts.json b/ambari-server/src/main/resources/common-services/GANGLIA/3.5.0/alerts.json
new file mode 100644
index 0000000..7605787
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/GANGLIA/3.5.0/alerts.json
@@ -0,0 +1,137 @@
+{
+ "GANGLIA": {
+ "service": [],
+ "GANGLIA_SERVER": [
+ {
+ "name": "ganglia_server_process",
+ "label": "Ganglia Server Process",
+ "description": "This host-level alert is triggered if the Ganglia server process cannot be established to be up and listening on the network.",
+ "interval": 1,
+ "scope": "ANY",
+ "enabled": true,
+ "source": {
+ "type": "PORT",
+ "uri": "8651",
+ "default_port": 8651,
+ "reporting": {
+ "ok": {
+ "text": "TCP OK - {0:.3f}s response on port {1}"
+ },
+ "warning": {
+ "text": "TCP OK - {0:.3f}s response on port {1}",
+ "value": 1.5
+ },
+ "critical": {
+ "text": "Connection failed: {0} to {1}:{2}",
+ "value": 5.0
+ }
+ }
+ }
+ },
+ {
+ "name": "ganglia_monitor_hdfs_namenode",
+ "label": "Ganglia NameNode Process Monitor",
+ "description": "This host-level alert is triggered if the Ganglia gmond process which handles receiving metrics for HDFS NameNode is not up and listening.",
+ "interval": 1,
+ "scope": "ANY",
+ "enabled": true,
+ "source": {
+ "type": "PORT",
+ "uri": "8661",
+ "default_port": 8661,
+ "reporting": {
+ "ok": {
+ "text": "TCP OK - {0:.3f}s response on port {1}"
+ },
+ "warning": {
+ "text": "TCP OK - {0:.3f}s response on port {1}",
+ "value": 1.5
+ },
+ "critical": {
+ "text": "Connection failed: {0} to {1}:{2}",
+ "value": 5.0
+ }
+ }
+ }
+ },
+ {
+ "name": "ganglia_monitor_hbase_master",
+ "label": "Ganglia HBase Master Process Monitor",
+ "description": "This host-level alert is triggered if the Ganglia gmond process which handles receiving metrics for the HBase Master process is not up and listening.",
+ "interval": 1,
+ "scope": "ANY",
+ "enabled": true,
+ "source": {
+ "type": "PORT",
+ "uri": "8663",
+ "default_port": 8663,
+ "reporting": {
+ "ok": {
+ "text": "TCP OK - {0:.3f}s response on port {1}"
+ },
+ "warning": {
+ "text": "TCP OK - {0:.3f}s response on port {1}",
+ "value": 1.5
+ },
+ "critical": {
+ "text": "Connection failed: {0} to {1}:{2}",
+ "value": 5.0
+ }
+ }
+ }
+ },
+ {
+ "name": "ganglia_monitor_yarn_resourcemanager",
+ "label": "Ganglia ResourceManager Process Monitor",
+ "description": "This host-level alert is triggered if the Ganglia gmond process which handles receiving metrics for the YARN ResourceManager process is not up and listening.",
+ "interval": 1,
+ "scope": "ANY",
+ "enabled": true,
+ "source": {
+ "type": "PORT",
+ "uri": "8664",
+ "default_port": 8664,
+ "reporting": {
+ "ok": {
+ "text": "TCP OK - {0:.3f}s response on port {1}"
+ },
+ "warning": {
+ "text": "TCP OK - {0:.3f}s response on port {1}",
+ "value": 1.5
+ },
+ "critical": {
+ "text": "Connection failed: {0} to {1}:{2}",
+ "value": 5.0
+ }
+ }
+ }
+ },
+ {
+ "name": "ganglia_monitor_mapreduce_history_server",
+ "label": "Ganglia History Server Process Monitor",
+ "description": "This host-level alert is triggered if the Ganglia gmond process which handles receiving metrics for the MapReduce History Server process is not up and listening.",
+ "interval": 1,
+ "scope": "ANY",
+ "enabled": true,
+ "source": {
+ "type": "PORT",
+ "uri": "8666",
+ "default_port": 8666,
+ "reporting": {
+ "ok": {
+ "text": "TCP OK - {0:.3f}s response on port {1}"
+ },
+ "warning": {
+ "text": "TCP OK - {0:.3f}s response on port {1}",
+ "value": 1.5
+ },
+ "critical": {
+ "text": "Connection failed: {0} to {1}:{2}",
+ "value": 5.0
+ }
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/b4cd4cb7/ambari-server/src/main/resources/common-services/GANGLIA/3.5.0/configuration/ganglia-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/GANGLIA/3.5.0/configuration/ganglia-env.xml b/ambari-server/src/main/resources/common-services/GANGLIA/3.5.0/configuration/ganglia-env.xml
new file mode 100644
index 0000000..3328acf
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/GANGLIA/3.5.0/configuration/ganglia-env.xml
@@ -0,0 +1,77 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+
+<configuration>
+ <property>
+ <name>ganglia_conf_dir</name>
+ <value>/etc/ganglia/hdp</value>
+ <description>Config directory for Ganglia</description>
+ </property>
+ <property>
+ <name>ganglia_runtime_dir</name>
+ <value>/var/run/ganglia/hdp</value>
+ <description>Run directories for Ganglia</description>
+ </property>
+ <property>
+ <name>gmetad_user</name>
+ <value>nobody</value>
+ <property-type>USER GROUP</property-type>
+ <description>User </description>
+ </property>
+ <property>
+ <name>gmond_user</name>
+ <value>nobody</value>
+ <property-type>USER GROUP</property-type>
+ <description>User </description>
+ </property>
+ <property>
+ <name>rrdcached_base_dir</name>
+ <value>/var/lib/ganglia/rrds</value>
+ <description>Default directory for saving the rrd files on ganglia server</description>
+ </property>
+ <property>
+ <name>rrdcached_timeout</name>
+ <value>3600</value>
+ <description>(-w) Data is written to disk every timeout seconds. If this option is not specified the default interval of 300 seconds will be used.</description>
+ </property>
+ <property>
+ <name>rrdcached_flush_timeout</name>
+ <value>7200</value>
+ <description>(-f) Every timeout seconds the entire cache is searched for old values which are written to disk. This only concerns files to which updates have stopped, so setting this to a high value, such as 3600 seconds, is acceptable in most cases. This timeout defaults to 3600 seconds.</description>
+ </property>
+ <property>
+ <name>rrdcached_delay</name>
+ <value>1800</value>
+ <description>(-z) If specified, rrdcached will delay writing of each RRD for a random number of seconds in the range [0,delay). This will avoid too many writes being queued simultaneously. This value should be no greater than the value specified in -w. By default, there is no delay.</description>
+ </property>
+ <property>
+ <name>rrdcached_write_threads</name>
+ <value>4</value>
+ <description>(-t) Specifies the number of threads used for writing RRD files. The default is 4. Increasing this number will allow rrdcached to have more simultaneous I/O requests into the kernel. This may allow the kernel to re-order disk writes, resulting in better disk throughput.</description>
+ </property>
+ <property>
+ <name>additional_clusters</name>
+ <value> </value>
+ <description>Add additional desired Ganglia metrics cluster in the form "name1:port1,name2:port2". Ensure that the names and ports are unique across all cluster and ports are available on ganglia server host. Ambari has reserved ports 8667-8669 within its own pool.</description>
+ </property>
+
+</configuration>
http://git-wip-us.apache.org/repos/asf/ambari/blob/b4cd4cb7/ambari-server/src/main/resources/common-services/GANGLIA/3.5.0/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/GANGLIA/3.5.0/metainfo.xml b/ambari-server/src/main/resources/common-services/GANGLIA/3.5.0/metainfo.xml
new file mode 100644
index 0000000..4e96ade
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/GANGLIA/3.5.0/metainfo.xml
@@ -0,0 +1,127 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<metainfo>
+ <schemaVersion>2.0</schemaVersion>
+ <services>
+ <service>
+ <name>GANGLIA</name>
+ <displayName>Ganglia</displayName>
+ <comment>Ganglia Metrics Collection system (<a href="http://oss.oetiker.ch/rrdtool/" target="_blank">RRDTool</a> will be installed too)</comment>
+ <version>3.5.0</version>
+ <components>
+ <component>
+ <name>GANGLIA_SERVER</name>
+ <displayName>Ganglia Server</displayName>
+ <category>MASTER</category>
+ <cardinality>1</cardinality>
+ <commandScript>
+ <script>scripts/ganglia_server.py</script>
+ <scriptType>PYTHON</scriptType>
+ <timeout>600</timeout>
+ </commandScript>
+ </component>
+
+ <component>
+ <name>GANGLIA_MONITOR</name>
+ <displayName>Ganglia Monitor</displayName>
+ <category>SLAVE</category>
+ <cardinality>ALL</cardinality>
+ <auto-deploy>
+ <enabled>true</enabled>
+ </auto-deploy>
+ <commandScript>
+ <script>scripts/ganglia_monitor.py</script>
+ <scriptType>PYTHON</scriptType>
+ <timeout>600</timeout>
+ </commandScript>
+ </component>
+ </components>
+ <osSpecifics>
+ <osSpecific>
+ <osFamily>redhat5,redhat6,suse11</osFamily>
+ <packages>
+ <package>
+ <name>python-rrdtool-1.4.5</name>
+ </package>
+ <package>
+ <name>libganglia-3.5.0-99</name>
+ </package>
+ <package>
+ <name>ganglia-devel-3.5.0-99</name>
+ </package>
+ <package>
+ <name>ganglia-gmetad-3.5.0-99</name>
+ </package>
+ <package>
+ <name>ganglia-web-3.5.7-99.noarch</name>
+ </package>
+ <package>
+ <name>ganglia-gmond-3.5.0-99</name>
+ </package>
+ <package>
+ <name>ganglia-gmond-modules-python-3.5.0-99</name>
+ </package>
+ </packages>
+ </osSpecific>
+ <osSpecific>
+ <osFamily>ubuntu12</osFamily>
+ <packages>
+ <package>
+ <name>python-rrdtool</name>
+ </package>
+ <package>
+ <name>gmetad</name>
+ </package>
+ <package>
+ <name>ganglia-webfrontend</name>
+ </package>
+ <package>
+ <name>ganglia-monitor-python</name>
+ </package>
+ <package>
+ <name>rrdcached</name>
+ </package>
+ </packages>
+ </osSpecific>
+ <osSpecific>
+ <osFamily>suse11</osFamily>
+ <packages>
+ <package>
+ <name>apache2</name>
+ </package>
+ <package>
+ <name>apache2?mod_php*</name>
+ </package>
+ </packages>
+ </osSpecific>
+ <osSpecific>
+ <osFamily>redhat5,redhat6</osFamily>
+ <packages>
+ <package>
+ <name>httpd</name>
+ </package>
+ </packages>
+ </osSpecific>
+ </osSpecifics>
+ <configuration-dependencies>
+ <config-type>ganglia-env</config-type>
+ </configuration-dependencies>
+ <monitoringService>true</monitoringService>
+ </service>
+ </services>
+</metainfo>