ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [17/17] ambari git commit: AMBARI-8276 - Alerts: Remove Nagios Service From The Stack (jonathanhurley)
Date Tue, 11 Nov 2014 20:43:20 GMT
AMBARI-8276 - Alerts: Remove Nagios Service From The Stack (jonathanhurley)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e4ededeb
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e4ededeb
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e4ededeb

Branch: refs/heads/trunk
Commit: e4ededeb69dde413b35a6400197b23a889b3963d
Parents: 0bf6672
Author: Jonathan Hurley <jhurley@hortonworks.com>
Authored: Tue Nov 11 11:03:37 2014 -0500
Committer: Jonathan Hurley <jhurley@hortonworks.com>
Committed: Tue Nov 11 15:42:45 2014 -0500

----------------------------------------------------------------------
 .../system_action_definitions.xml               |   10 -
 .../custom_actions/nagios_update_ignore.py      |  101 --
 .../custom_actions/validate_configs.py          |    7 -
 .../src/main/resources/properties.json          |    1 -
 .../src/main/resources/role_command_order.json  |   14 +-
 .../0.8/blueprints/multinode-default.json       |    8 -
 .../0.8/blueprints/singlenode-default.json      |    8 -
 .../0.8/hooks/before-INSTALL/scripts/params.py  |    6 -
 .../0.8/hooks/before-START/scripts/params.py    |    2 -
 .../stacks/BIGTOP/0.8/role_command_order.json   |   13 +-
 .../services/GANGLIA/package/files/gmondLib.sh  |    1 -
 .../0.8/services/HDFS/package/scripts/params.py |    4 -
 .../NAGIOS/configuration/nagios-env.xml         |   53 -
 .../BIGTOP/0.8/services/NAGIOS/metainfo.xml     |  160 --
 .../NAGIOS/package/files/check_aggregate.php    |  248 ----
 .../NAGIOS/package/files/check_ambari_alerts.py |   80 -
 .../package/files/check_checkpoint_time.py      |  112 --
 .../services/NAGIOS/package/files/check_cpu.php |  109 --
 .../services/NAGIOS/package/files/check_cpu.pl  |  114 --
 .../NAGIOS/package/files/check_cpu_ha.php       |  116 --
 .../package/files/check_datanode_storage.php    |  100 --
 .../NAGIOS/package/files/check_hdfs_blocks.php  |  102 --
 .../package/files/check_hdfs_capacity.php       |  109 --
 .../files/check_hive_metastore_status.sh        |   45 -
 .../NAGIOS/package/files/check_hue_status.sh    |   31 -
 .../files/check_mapred_local_dir_used.sh        |   34 -
 .../package/files/check_name_dir_status.php     |   93 --
 .../NAGIOS/package/files/check_namenodes_ha.sh  |   83 --
 .../package/files/check_nodemanager_health.sh   |   45 -
 .../NAGIOS/package/files/check_oozie_status.sh  |   45 -
 .../NAGIOS/package/files/check_rpcq_latency.php |  104 --
 .../package/files/check_rpcq_latency_ha.php     |  115 --
 .../package/files/check_templeton_status.sh     |   46 -
 .../NAGIOS/package/files/check_webui.sh         |  103 --
 .../NAGIOS/package/files/check_webui_ha.sh      |   64 -
 .../NAGIOS/package/files/check_wrapper.sh       |   94 --
 .../package/files/hdp_mon_nagios_addons.conf    |   24 -
 .../NAGIOS/package/files/hdp_nagios_init.php    |   81 --
 .../NAGIOS/package/files/nagios_alerts.php      |  513 -------
 .../services/NAGIOS/package/files/sys_logger.py |  186 ---
 .../NAGIOS/package/scripts/functions.py         |   47 -
 .../services/NAGIOS/package/scripts/nagios.py   |  109 --
 .../NAGIOS/package/scripts/nagios_server.py     |  111 --
 .../package/scripts/nagios_server_config.py     |   98 --
 .../NAGIOS/package/scripts/nagios_service.py    |  103 --
 .../services/NAGIOS/package/scripts/params.py   |  287 ----
 .../NAGIOS/package/scripts/status_params.py     |   29 -
 .../NAGIOS/package/templates/contacts.cfg.j2    |  109 --
 .../package/templates/hadoop-commands.cfg.j2    |  166 ---
 .../package/templates/hadoop-hostgroups.cfg.j2  |   33 -
 .../package/templates/hadoop-hosts.cfg.j2       |   53 -
 .../templates/hadoop-servicegroups.cfg.j2       |  119 --
 .../package/templates/hadoop-services.cfg.j2    |  804 ----------
 .../NAGIOS/package/templates/nagios.cfg.j2      | 1365 -----------------
 .../NAGIOS/package/templates/nagios.conf.j2     |   84 --
 .../services/NAGIOS/package/templates/nagios.j2 |  164 ---
 .../NAGIOS/package/templates/resource.cfg.j2    |   51 -
 .../stacks/BIGTOP/0.8/services/stack_advisor.py |    4 +-
 .../1.3.2/hooks/before-ANY/scripts/params.py    |    6 -
 .../hooks/before-INSTALL/scripts/params.py      |    6 -
 .../1.3.2/hooks/before-START/scripts/params.py  |    2 -
 .../stacks/HDP/1.3.2/role_command_order.json    |   15 +-
 .../services/GANGLIA/package/files/gmondLib.sh  |    1 -
 .../services/HDFS/package/scripts/params.py     |    4 -
 .../NAGIOS/configuration/nagios-env.xml         |   53 -
 .../HDP/1.3.2/services/NAGIOS/metainfo.xml      |  125 --
 .../NAGIOS/package/files/check_aggregate.php    |  247 ----
 .../services/NAGIOS/package/files/check_cpu.php |  109 --
 .../services/NAGIOS/package/files/check_cpu.pl  |  114 --
 .../NAGIOS/package/files/check_cpu_ha.php       |  116 --
 .../package/files/check_datanode_storage.php    |  100 --
 .../NAGIOS/package/files/check_hdfs_blocks.php  |  102 --
 .../package/files/check_hdfs_capacity.php       |  109 --
 .../files/check_hive_metastore_status.sh        |   45 -
 .../package/files/check_hive_thrift_port.py     |   72 -
 .../NAGIOS/package/files/check_hue_status.sh    |   31 -
 .../files/check_mapred_local_dir_used.sh        |   34 -
 .../package/files/check_name_dir_status.php     |   93 --
 .../NAGIOS/package/files/check_namenodes_ha.sh  |   83 --
 .../package/files/check_nodemanager_health.sh   |   45 -
 .../NAGIOS/package/files/check_oozie_status.sh  |   45 -
 .../NAGIOS/package/files/check_rpcq_latency.php |  104 --
 .../package/files/check_templeton_status.sh     |   46 -
 .../NAGIOS/package/files/check_webui.sh         |   89 --
 .../NAGIOS/package/files/hdp_nagios_init.php    |   81 --
 .../services/NAGIOS/package/files/mm_wrapper.py |  334 -----
 .../NAGIOS/package/scripts/functions.py         |   47 -
 .../services/NAGIOS/package/scripts/nagios.py   |   94 --
 .../NAGIOS/package/scripts/nagios_server.py     |  103 --
 .../package/scripts/nagios_server_config.py     |   95 --
 .../NAGIOS/package/scripts/nagios_service.py    |   69 -
 .../services/NAGIOS/package/scripts/params.py   |  161 ---
 .../NAGIOS/package/scripts/status_params.py     |   26 -
 .../NAGIOS/package/templates/contacts.cfg.j2    |  109 --
 .../package/templates/hadoop-commands.cfg.j2    |  147 --
 .../package/templates/hadoop-hostgroups.cfg.j2  |   52 -
 .../package/templates/hadoop-hosts.cfg.j2       |   54 -
 .../templates/hadoop-servicegroups.cfg.j2       |  105 --
 .../package/templates/hadoop-services.cfg.j2    |  613 --------
 .../NAGIOS/package/templates/nagios.cfg.j2      | 1368 ------------------
 .../NAGIOS/package/templates/nagios.conf.j2     |   81 --
 .../services/NAGIOS/package/templates/nagios.j2 |  165 ---
 .../NAGIOS/package/templates/resource.cfg.j2    |   70 -
 .../stacks/HDP/1.3.2/services/stack_advisor.py  |    2 +-
 .../stacks/HDP/1.3.3/role_command_order.json    |   15 +-
 .../stacks/HDP/1.3/role_command_order.json      |   15 +-
 .../HDP/2.0.6.GlusterFS/role_command_order.json |   14 +-
 .../2.0.6/hooks/before-ANY/scripts/params.py    |    6 -
 .../hooks/before-INSTALL/scripts/params.py      |    6 -
 .../2.0.6/hooks/before-START/scripts/params.py  |    2 -
 .../stacks/HDP/2.0.6/role_command_order.json    |   14 +-
 .../services/GANGLIA/package/files/gmondLib.sh  |    1 -
 .../services/HDFS/package/scripts/params.py     |    4 -
 .../NAGIOS/configuration/nagios-env.xml         |   53 -
 .../HDP/2.0.6/services/NAGIOS/metainfo.xml      |  163 ---
 .../NAGIOS/package/files/check_aggregate.php    |  248 ----
 .../NAGIOS/package/files/check_ambari_alerts.py |   80 -
 .../package/files/check_checkpoint_time.py      |  123 --
 .../services/NAGIOS/package/files/check_cpu.php |  109 --
 .../services/NAGIOS/package/files/check_cpu.pl  |  114 --
 .../NAGIOS/package/files/check_cpu_ha.php       |  116 --
 .../package/files/check_datanode_storage.php    |  100 --
 .../NAGIOS/package/files/check_hdfs_blocks.php  |  102 --
 .../package/files/check_hdfs_capacity.php       |  109 --
 .../files/check_hive_metastore_status.sh        |   45 -
 .../package/files/check_hive_thrift_port.py     |   72 -
 .../NAGIOS/package/files/check_hue_status.sh    |   31 -
 .../files/check_mapred_local_dir_used.sh        |   34 -
 .../package/files/check_name_dir_status.php     |   93 --
 .../NAGIOS/package/files/check_namenodes_ha.sh  |   83 --
 .../package/files/check_nodemanager_health.sh   |   45 -
 .../NAGIOS/package/files/check_oozie_status.sh  |   45 -
 .../NAGIOS/package/files/check_rpcq_latency.php |  104 --
 .../package/files/check_rpcq_latency_ha.php     |  115 --
 .../package/files/check_templeton_status.sh     |   46 -
 .../NAGIOS/package/files/check_webui.sh         |  103 --
 .../NAGIOS/package/files/check_webui_ha.sh      |   64 -
 .../package/files/hdp_mon_nagios_addons.conf    |   24 -
 .../NAGIOS/package/files/hdp_nagios_init.php    |   81 --
 .../services/NAGIOS/package/files/mm_wrapper.py |  335 -----
 .../NAGIOS/package/files/nagios_alerts.php      |  515 -------
 .../services/NAGIOS/package/files/sys_logger.py |  197 ---
 .../NAGIOS/package/scripts/functions.py         |   47 -
 .../services/NAGIOS/package/scripts/nagios.py   |  109 --
 .../NAGIOS/package/scripts/nagios_server.py     |  111 --
 .../package/scripts/nagios_server_config.py     |   99 --
 .../NAGIOS/package/scripts/nagios_service.py    |  103 --
 .../services/NAGIOS/package/scripts/params.py   |  363 -----
 .../NAGIOS/package/scripts/status_params.py     |   29 -
 .../NAGIOS/package/templates/contacts.cfg.j2    |  109 --
 .../package/templates/hadoop-commands.cfg.j2    |  166 ---
 .../package/templates/hadoop-hostgroups.cfg.j2  |   33 -
 .../package/templates/hadoop-hosts.cfg.j2       |   53 -
 .../templates/hadoop-servicegroups.cfg.j2       |  128 --
 .../package/templates/hadoop-services.cfg.j2    |  869 -----------
 .../NAGIOS/package/templates/nagios.cfg.j2      | 1365 -----------------
 .../NAGIOS/package/templates/nagios.conf.j2     |   84 --
 .../services/NAGIOS/package/templates/nagios.j2 |  164 ---
 .../NAGIOS/package/templates/resource.cfg.j2    |   51 -
 .../stacks/HDP/2.0.6/services/stack_advisor.py  |    2 +-
 .../stacks/HDP/2.0/role_command_order.json      |   14 +-
 .../blueprints/multinode-default.json           |    8 -
 .../blueprints/singlenode-default.json          |    8 -
 .../HDP/2.1.GlusterFS/role_command_order.json   |   13 +-
 .../HDP/2.1/blueprints/multinode-default.json   |    8 -
 .../HDP/2.1/blueprints/singlenode-default.json  |    8 -
 .../stacks/HDP/2.1/role_command_order.json      |   14 +-
 .../stacks/HDP/2.1/services/NAGIOS/metainfo.xml |   40 -
 .../stacks/HDP/2.1/services/stack_advisor.py    |    2 +-
 .../stacks/HDP/2.2/role_command_order.json      |   14 +-
 .../server/agent/TestHeartbeatMonitor.java      |   85 +-
 .../server/api/services/AmbariMetaInfoTest.java |   29 +-
 .../ComponentSSLConfigurationTest.java          |   26 +-
 .../AmbariManagementControllerTest.java         |  240 +--
 .../ganglia/GangliaPropertyProviderTest.java    |  209 +--
 .../GangliaReportPropertyProviderTest.java      |   24 +-
 .../GSInstallerComponentProviderTest.java       |    9 +-
 .../GSInstallerHostComponentProviderTest.java   |    9 +-
 .../GSInstallerServiceProviderTest.java         |   41 +-
 .../internal/HttpPropertyProviderTest.java      |   49 +-
 .../controller/internal/RequestImplTest.java    |   10 +-
 .../nagios/NagiosPropertyProviderTest.java      |  584 --------
 .../server/metadata/RoleCommandOrderTest.java   |   44 +-
 .../ambari/server/metadata/RoleGraphTest.java   |   95 +-
 .../ambari/server/stack/StackManagerTest.java   |   51 +-
 .../server/stageplanner/TestStagePlanner.java   |    7 +-
 .../stacks/1.3.2/NAGIOS/test_mm_wrapper.py      |  549 -------
 .../stacks/1.3.2/NAGIOS/test_nagios_server.py   |  282 ----
 .../1.3.2/configs/default.hbasedecom.json       |   11 -
 .../python/stacks/1.3.2/configs/default.json    |   15 +-
 .../1.3.2/configs/default.non_gmetad_host.json  |   11 -
 .../stacks/1.3.2/configs/default_client.json    |   11 -
 .../python/stacks/1.3.2/configs/secured.json    |   28 +-
 .../stacks/1.3.2/configs/secured_client.json    |   36 +-
 .../1.3.2/configs/secured_no_jce_name.json      |   18 +-
 .../1.3.2/hooks/before-ANY/test_before_any.py   |    8 -
 .../stacks/2.0.6/NAGIOS/test_mm_wrapper.py      |  549 -------
 .../stacks/2.0.6/NAGIOS/test_nagios_server.py   |  315 ----
 .../2.0.6/configs/default.hbasedecom.json       |    3 -
 .../python/stacks/2.0.6/configs/default.json    |   15 +-
 .../2.0.6/configs/default.non_gmetad_host.json  |    3 -
 .../stacks/2.0.6/configs/default_client.json    |   11 -
 .../python/stacks/2.0.6/configs/flume_22.json   |   15 +-
 .../stacks/2.0.6/configs/flume_target.json      |    8 -
 .../python/stacks/2.0.6/configs/ha_default.json |   14 +-
 .../python/stacks/2.0.6/configs/ha_secured.json |   14 +-
 .../python/stacks/2.0.6/configs/secured.json    |   13 -
 .../stacks/2.0.6/configs/secured_client.json    |   13 -
 .../2.0.6/configs/secured_no_jce_name.json      |   22 +-
 .../2.0.6/hooks/before-ANY/test_before_any.py   |    8 -
 .../test/python/stacks/2.1/common/services.json |   81 +-
 .../stacks/2.1/common/test_stack_advisor.py     |    2 +-
 .../test/python/stacks/2.1/configs/default.json |   16 -
 .../test/python/stacks/2.1/configs/secured.json |   13 -
 .../python/stacks/2.2/common/1/services.json    |   81 +-
 .../python/stacks/2.2/common/2/services.json    |   84 +-
 .../multinode-default.json                      |    2 +-
 .../resources/api_testscripts/curl-addnagios.sh |   21 -
 .../curl-setup-multiple-hbase-master.sh         |    9 +-
 ambari-server/src/test/resources/deploy_HDP2.sh |    2 +-
 .../src/test/resources/gsInstaller-hosts.txt    |    1 -
 .../src/test/resources/nagios_alerts.txt        |  605 --------
 .../HDP/1.2.0/services/NAGIOS/metainfo.xml      |   95 --
 .../services/NAGIOS/configuration/global.xml    |   50 -
 .../HDP/1.3.0/services/NAGIOS/metainfo.xml      |   95 --
 .../HDP/1.3.1/services/NAGIOS/metainfo.xml      |   95 --
 .../HDP/1.3.4/services/NAGIOS/metainfo.xml      |   94 --
 .../HDP/2.0.1/services/NAGIOS/metainfo.xml      |   90 --
 .../HDP/2.0.5/services/NAGIOS/metainfo.xml      |   89 --
 .../stacks/HDP/2.0.6/role_command_order.json    |   14 +-
 .../HDP/2.0.6/services/NAGIOS/metainfo.xml      |  139 --
 .../stacks/HDP/2.0.7/role_command_order.json    |   14 +-
 .../HDP/2.0.7/services/NAGIOS/metainfo.xml      |  136 --
 .../stacks/HDP/2.0.8/role_command_order.json    |   14 +-
 .../HDP/2.0.8/services/FAKENAGIOS/metainfo.xml  |   51 +
 .../stacks/HDP/2.1.1/role_command_order.json    |   14 +-
 .../stacks/OTHER/1.0/role_command_order.json    |   14 +-
 .../OTHER/1.0/role_command_order.json           |   14 +-
 ambari-server/src/test/resources/test_api.sh    |    6 -
 .../src/test/resources/test_multnode_api.sh     |    6 -
 .../nagios/conf.d/hdp_mon_nagios_addons.conf    |    7 -
 .../addOns/nagios/plugins/check_aggregate.php   |  195 ---
 .../src/addOns/nagios/plugins/check_hadoop.sh   |   96 --
 .../src/addOns/nagios/plugins/check_hbase.sh    |   91 --
 .../addOns/nagios/plugins/check_hdfs_blocks.php |   72 -
 .../nagios/plugins/check_hdfs_capacity.php      |   68 -
 .../plugins/check_hive_metastore_status.sh      |   32 -
 .../nagios/plugins/check_name_dir_status.php    |   59 -
 .../addOns/nagios/plugins/check_oozie_status.sh |   35 -
 .../nagios/plugins/check_rpcq_latency.php       |   67 -
 .../src/addOns/nagios/plugins/check_webui.sh    |   73 -
 .../src/addOns/nagios/plugins/sys_logger.py     |  197 ---
 .../src/addOns/nagios/scripts/nagios_alerts.php |  513 -------
 253 files changed, 495 insertions(+), 26373 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/e4ededeb/ambari-server/src/main/resources/custom_action_definitions/system_action_definitions.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/custom_action_definitions/system_action_definitions.xml b/ambari-server/src/main/resources/custom_action_definitions/system_action_definitions.xml
index c65a496..cd5d5f7 100644
--- a/ambari-server/src/main/resources/custom_action_definitions/system_action_definitions.xml
+++ b/ambari-server/src/main/resources/custom_action_definitions/system_action_definitions.xml
@@ -20,16 +20,6 @@
 
 <actionDefinitions>
   <actionDefinition>
-    <actionName>nagios_update_ignore</actionName>
-    <actionType>SYSTEM</actionType>
-    <inputs>[nagios_ignore]</inputs>
-    <targetService>NAGIOS</targetService>
-    <targetComponent>NAGIOS_SERVER</targetComponent>
-    <defaultTimeout>60</defaultTimeout>
-    <description>Used to create an alert blackout</description>
-    <targetType>ANY</targetType>
-  </actionDefinition>
-  <actionDefinition>
     <actionName>check_host</actionName>
     <actionType>SYSTEM</actionType>
     <inputs></inputs>

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4ededeb/ambari-server/src/main/resources/custom_actions/nagios_update_ignore.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/custom_actions/nagios_update_ignore.py b/ambari-server/src/main/resources/custom_actions/nagios_update_ignore.py
deleted file mode 100644
index b7026e2..0000000
--- a/ambari-server/src/main/resources/custom_actions/nagios_update_ignore.py
+++ /dev/null
@@ -1,101 +0,0 @@
-#!/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.
-
-Ambari Agent
-
-"""
-
-import json
-import sys
-#import traceback
-from resource_management import *
-
-
-class NagiosIgnore(Script):
-  def actionexecute(self, env):
-    config = Script.get_config()
-
-    ignores = None
-
-    structured_output_example = {
-      'result': 'Ignore table updated.'
-    }
-
-    try:
-      if (config.has_key('passiveInfo')):
-        ignores = config['passiveInfo']
-      else:
-        structured_output_example['result'] = "Key 'passiveInfo' not found, skipping"
-        Logger.info("Key 'passiveInfo' was not found, skipping")
-        self.put_structured_out(structured_output_example)
-    except Exception:
-      structured_output_example['result'] = "Error accessing passiveInfo"
-      self.put_structured_out(structured_output_example)
-      Logger.debug("Error accessing passiveInfo")
-      return
-
-    if ignores is None:
-      Logger.info("Nothing to do - maintenance info was not provided")
-      return
-    
-    new_file_entries = []
-
-    if ignores is not None:
-      for define in ignores:
-        try:
-          host = str(define['host'])
-          service = str(define['service'])
-          component = str(define['component'])
-          key = host + " " + service + " " + component
-          Logger.info("found entry for host=" + host +
-            ", service=" + service +
-            ", component=" + component)
-
-          new_file_entries.append(key)
-        except KeyError:
-          Logger.debug("Could not load host, service, or component for " + str(define))
-          pass
-
-    writeFile(new_file_entries)
-
-    self.put_structured_out(structured_output_example)
-
-def writeFile(entries):
-  buf = ""
-  for entry in entries:
-    buf += entry + "\n"
-
-  f = None
-  try:
-    f = open('/var/nagios/ignore.dat', 'w')
-    f.write(buf)
-    if 0 == len(entries):
-      Logger.info("Cleared all entries from '/var/nagios/ignore.dat'")
-    elif 1 == len(entries):
-      Logger.info("Persisted '/var/nagios/ignore.dat' with 1 entry")
-    else:
-      Logger.info("Persisted '/var/nagios/ignore.dat' with " + str(len(entries)) + " entries")
-  except:
-    Logger.info("Could not open '/var/nagios/ignore.dat' to update")
-    pass
-  finally:
-    if f is not None:
-      f.close()
-
-if __name__ == "__main__":
-  NagiosIgnore().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4ededeb/ambari-server/src/main/resources/custom_actions/validate_configs.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/custom_actions/validate_configs.py b/ambari-server/src/main/resources/custom_actions/validate_configs.py
index c245dbb..4529539 100644
--- a/ambari-server/src/main/resources/custom_actions/validate_configs.py
+++ b/ambari-server/src/main/resources/custom_actions/validate_configs.py
@@ -134,7 +134,6 @@ PROPERTIES_TO_CHECK = {
   "HCAT": {
     "hive-env": ["hcat_log_dir", "hcat_pid_dir"]
   },
-  #NAGIOS - no directories to check
   #OOZIE
   "OOZIE_SERVER": {
     "oozie-env": ["oozie_data_dir", "oozie_log_dir", "oozie_pid_dir"]
@@ -301,12 +300,6 @@ USERS_TO_GROUP_MAPPING = {
       "hive_user": "hive_user"
     }
   },
-  #NAGIOS
-  "NAGIOS_SERVER": {
-    "nagios-env": {
-      "nagios_user": "nagios_group"
-    }
-  },
   #OOZIE
   "OOZIE_SERVER": {
     "oozie-env": {

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4ededeb/ambari-server/src/main/resources/properties.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/properties.json b/ambari-server/src/main/resources/properties.json
index 36cff96..ad59922 100644
--- a/ambari-server/src/main/resources/properties.json
+++ b/ambari-server/src/main/resources/properties.json
@@ -72,7 +72,6 @@
         "HostRoles/desired_stack_id",
         "HostRoles/actual_configs",
         "params/run_smoke_test",
-        "HostRoles/nagios_alerts",
         "HostRoles/stale_configs",
         "HostRoles/desired_admin_state",
         "HostRoles/maintenance_state",

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4ededeb/ambari-server/src/main/resources/role_command_order.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/role_command_order.json b/ambari-server/src/main/resources/role_command_order.json
index c45ba07..1404ef6 100644
--- a/ambari-server/src/main/resources/role_command_order.json
+++ b/ambari-server/src/main/resources/role_command_order.json
@@ -3,8 +3,6 @@
   "_comment" : "blockedRole-blockedCommand: [blockerRole1-blockerCommand1, blockerRole2-blockerCommand2, ...]",
   "general_deps" : {
     "_comment" : "dependencies for all cases",
-    "NAGIOS_SERVER-INSTALL" : ["HIVE_CLIENT-INSTALL", "HCAT-INSTALL",
-        "MAPREDUCE_CLIENT-INSTALL", "OOZIE_CLIENT-INSTALL"],
     "HBASE_MASTER-START": ["ZOOKEEPER_SERVER-START"],
     "HBASE_REGIONSERVER-START": ["HBASE_MASTER-START"],
     "OOZIE_SERVER-START": ["JOBTRACKER-START", "TASKTRACKER-START"],
@@ -13,12 +11,6 @@
     "HIVE_SERVER-START": ["TASKTRACKER-START", "MYSQL_SERVER-START"],
     "HUE_SERVER-START": ["HIVE_SERVER-START", "HCAT-START", "OOZIE_SERVER-START"],
     "FLUME_HANDLER-START": ["OOZIE_SERVER-START"],
-    "NAGIOS_SERVER-START": ["HBASE_MASTER-START", "HBASE_REGIONSERVER-START",
-        "GANGLIA_SERVER-START", "GANGLIA_MONITOR-START", "HCAT-START",
-        "HIVE_SERVER-START", "HIVE_METASTORE-START", "HUE_SERVER-START",
-        "JOBTRACKER-START", "TASKTRACKER-START", "ZOOKEEPER_SERVER-START",
-        "MYSQL_SERVER-START", "OOZIE_SERVER-START", "PIG-START", "SQOOP-START",
-        "WEBHCAT_SERVER-START", "FLUME_HANDLER-START"],
     "MAPREDUCE_SERVICE_CHECK-SERVICE_CHECK": ["JOBTRACKER-START", "TASKTRACKER-START"],
     "OOZIE_SERVICE_CHECK-SERVICE_CHECK": ["OOZIE_SERVER-START"],
     "WEBHCAT_SERVICE_CHECK-SERVICE_CHECK": ["WEBHCAT_SERVER-START"],
@@ -48,8 +40,7 @@
     "WEBHCAT_SERVER-UPGRADE" : ["OOZIE_CLIENT-UPGRADE"],
     "PIG-UPGRADE" : ["WEBHCAT_SERVER-UPGRADE"],
     "SQOOP-UPGRADE" : ["PIG-UPGRADE"],
-    "NAGIOS_SERVER-UPGRADE" : ["SQOOP-UPGRADE"],
-    "GANGLIA_SERVER-UPGRADE" : ["NAGIOS_SERVER-UPGRADE"],
+    "GANGLIA_SERVER-UPGRADE" : ["SQOOP-UPGRADE"],
     "GANGLIA_MONITOR-UPGRADE" : ["GANGLIA_SERVER-UPGRADE"]
   },
   "_comment" : "GLUSTERFS-specific dependencies",
@@ -71,8 +62,6 @@
     "TASKTRACKER-START": ["NAMENODE-START", "DATANODE-START"],
     "HIVE_SERVER-START": ["DATANODE-START"],
     "WEBHCAT_SERVER-START": ["DATANODE-START"],
-    "NAGIOS_SERVER-START": ["NAMENODE-START", "SECONDARY_NAMENODE-START",
-        "DATANODE-START", "RESOURCEMANAGER-START", "NODEMANAGER-START", "HISTORYSERVER-START"],
     "HDFS_SERVICE_CHECK-SERVICE_CHECK": ["NAMENODE-START", "DATANODE-START",
         "SECONDARY_NAMENODE-START"],
     "MAPREDUCE2_SERVICE_CHECK-SERVICE_CHECK": ["NODEMANAGER-START",
@@ -93,7 +82,6 @@
   "namenode_optional_ha": {
     "NAMENODE-START": ["JOURNALNODE-START", "ZOOKEEPER_SERVER-START"],
     "ZKFC-START": ["NAMENODE-START"],
-    "NAGIOS_SERVER-START": ["ZKFC-START", "JOURNALNODE-START"],
     "HDFS_SERVICE_CHECK-SERVICE_CHECK": ["ZKFC-START"]
   },
   "_comment" : "Dependencies that are used in ResourceManager HA cluster",

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4ededeb/ambari-server/src/main/resources/stacks/BIGTOP/0.8/blueprints/multinode-default.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/blueprints/multinode-default.json b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/blueprints/multinode-default.json
index 642fcfa..de4be19 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/blueprints/multinode-default.json
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/blueprints/multinode-default.json
@@ -1,10 +1,5 @@
 {
     "configurations" : [
-        {
-            "nagios-env" : {
-                "nagios_contact" : "admin@localhost"
-            }
-        }
     ],
     "host_groups" : [
         {
@@ -135,9 +130,6 @@
                     "name" : "AMBARI_SERVER"
                 },
                 {
-                    "name" : "NAGIOS_SERVER"
-                },
-                {
                     "name" : "ZOOKEEPER_CLIENT"
                 },
                 {

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4ededeb/ambari-server/src/main/resources/stacks/BIGTOP/0.8/blueprints/singlenode-default.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/blueprints/singlenode-default.json b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/blueprints/singlenode-default.json
index 3c769dd..c6b916b 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/blueprints/singlenode-default.json
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/blueprints/singlenode-default.json
@@ -1,10 +1,5 @@
 {
     "configurations" : [
-        {
-            "nagios-env" : {
-                "nagios_contact" : "admin@localhost"
-            }
-        }
     ],
     "host_groups" : [
         {
@@ -86,9 +81,6 @@
                     "name" : "FALCON_CLIENT"
                 },
                 {
-                    "name" : "NAGIOS_SERVER"
-                },
-                {
                     "name" : "SECONDARY_NAMENODE"
                 },
                 {

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4ededeb/ambari-server/src/main/resources/stacks/BIGTOP/0.8/hooks/before-INSTALL/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/hooks/before-INSTALL/scripts/params.py b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/hooks/before-INSTALL/scripts/params.py
index 01789a7..38d3137 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/hooks/before-INSTALL/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/hooks/before-INSTALL/scripts/params.py
@@ -28,7 +28,6 @@ tmp_dir = Script.get_tmp_dir()
 
 #users and groups
 hbase_user = config['configurations']['hbase-env']['hbase_user']
-nagios_user = config['configurations']['nagios-env']['nagios_user']
 smoke_user =  config['configurations']['cluster-env']['smokeuser']
 gmetad_user = config['configurations']['ganglia-env']["gmetad_user"]
 gmond_user = config['configurations']['ganglia-env']["gmond_user"]
@@ -36,14 +35,12 @@ tez_user = config['configurations']['tez-env']["tez_user"]
 
 user_group = config['configurations']['cluster-env']['user_group']
 proxyuser_group = default("/configurations/hadoop-env/proxyuser_group","users")
-nagios_group = config['configurations']['nagios-env']['nagios_group']
 
 #hosts
 hostname = config["hostname"]
 ambari_server_hostname = config['clusterHostInfo']['ambari_server_host'][0]
 rm_host = default("/clusterHostInfo/rm_host", [])
 slave_hosts = default("/clusterHostInfo/slave_hosts", [])
-hagios_server_hosts = default("/clusterHostInfo/nagios_server_host", [])
 oozie_servers = default("/clusterHostInfo/oozie_server", [])
 hcat_server_hosts = default("/clusterHostInfo/webhcat_server_host", [])
 hive_server_host =  default("/clusterHostInfo/hive_server_host", [])
@@ -61,7 +58,6 @@ has_namenode = not len(namenode_host) == 0
 has_hs = not len(hs_host) == 0
 has_resourcemanager = not len(rm_host) == 0
 has_slaves = not len(slave_hosts) == 0
-has_nagios = not len(hagios_server_hosts) == 0
 has_oozie_server = not len(oozie_servers)  == 0
 has_hcat_server_host = not len(hcat_server_hosts)  == 0
 has_hive_server_host = not len(hive_server_host)  == 0
@@ -111,8 +107,6 @@ if has_tez:
   user_to_groups_dict[tez_user] = [proxyuser_group]
 
 user_to_gid_dict = collections.defaultdict(lambda:user_group)
-if has_nagios:
-  user_to_gid_dict[nagios_user] = nagios_group
 
 user_list = json.loads(config['hostLevelParams']['user_list'])
 group_list = json.loads(config['hostLevelParams']['group_list'])

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4ededeb/ambari-server/src/main/resources/stacks/BIGTOP/0.8/hooks/before-START/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/hooks/before-START/scripts/params.py b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/hooks/before-START/scripts/params.py
index ac8f1c8..ebcaaec 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/hooks/before-START/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/hooks/before-START/scripts/params.py
@@ -38,7 +38,6 @@ hostname = config["hostname"]
 ambari_server_hostname = config['clusterHostInfo']['ambari_server_host'][0]
 rm_host = default("/clusterHostInfo/rm_host", [])
 slave_hosts = default("/clusterHostInfo/slave_hosts", [])
-hagios_server_hosts = default("/clusterHostInfo/nagios_server_host", [])
 oozie_servers = default("/clusterHostInfo/oozie_server", [])
 hcat_server_hosts = default("/clusterHostInfo/webhcat_server_host", [])
 hive_server_host =  default("/clusterHostInfo/hive_server_host", [])
@@ -52,7 +51,6 @@ ganglia_server_hosts = default("/clusterHostInfo/ganglia_server_host", [])
 has_namenode = not len(namenode_host) == 0
 has_resourcemanager = not len(rm_host) == 0
 has_slaves = not len(slave_hosts) == 0
-has_nagios = not len(hagios_server_hosts) == 0
 has_oozie_server = not len(oozie_servers)  == 0
 has_hcat_server_host = not len(hcat_server_hosts)  == 0
 has_hive_server_host = not len(hive_server_host)  == 0

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4ededeb/ambari-server/src/main/resources/stacks/BIGTOP/0.8/role_command_order.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/role_command_order.json b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/role_command_order.json
index 69fcdac..25611d1 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/role_command_order.json
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/role_command_order.json
@@ -3,8 +3,6 @@
   "_comment" : "blockedRole-blockedCommand: [blockerRole1-blockerCommand1, blockerRole2-blockerCommand2, ...]",
   "general_deps" : {
     "_comment" : "dependencies for all cases",
-    "NAGIOS_SERVER-INSTALL" : ["HIVE_CLIENT-INSTALL", "HCAT-INSTALL",
-        "MAPREDUCE_CLIENT-INSTALL", "OOZIE_CLIENT-INSTALL"],
     "HBASE_MASTER-START": ["ZOOKEEPER_SERVER-START"],
     "HBASE_REGIONSERVER-START": ["HBASE_MASTER-START"],
     "OOZIE_SERVER-START": ["NODEMANAGER-START", "RESOURCEMANAGER-START"],
@@ -13,12 +11,6 @@
     "HIVE_SERVER-START": ["NODEMANAGER-START", "MYSQL_SERVER-START", "POSTGRESQL_SERVER-START"],
     "HUE_SERVER-START": ["HIVE_SERVER-START", "HCAT-START", "OOZIE_SERVER-START"],
     "FLUME_HANDLER-START": ["OOZIE_SERVER-START"],
-    "NAGIOS_SERVER-START": ["HBASE_MASTER-START", "HBASE_REGIONSERVER-START",
-        "GANGLIA_SERVER-START", "GANGLIA_MONITOR-START", "HCAT-START",
-        "HIVE_SERVER-START", "HIVE_METASTORE-START", "HUE_SERVER-START",
-        "ZOOKEEPER_SERVER-START", "NODEMANAGER-START", "RESOURCEMANAGER-START",
-        "MYSQL_SERVER-START", "POSTGRESQL_SERVER-START", "OOZIE_SERVER-START", "PIG-START", "SQOOP-START",
-        "WEBHCAT_SERVER-START", "FLUME_HANDLER-START"],
     "MAPREDUCE_SERVICE_CHECK-SERVICE_CHECK": ["NODEMANAGER-START", "RESOURCEMANAGER-START"],
     "OOZIE_SERVICE_CHECK-SERVICE_CHECK": ["OOZIE_SERVER-START", "MAPREDUCE2_SERVICE_CHECK-SERVICE_CHECK"],
     "WEBHCAT_SERVICE_CHECK-SERVICE_CHECK": ["WEBHCAT_SERVER-START"],
@@ -47,8 +39,6 @@
     "HBASE_MASTER-START": ["NAMENODE-START", "DATANODE-START"],
     "HIVE_SERVER-START": ["DATANODE-START"],
     "WEBHCAT_SERVER-START": ["DATANODE-START"],
-    "NAGIOS_SERVER-START": ["NAMENODE-START", "SECONDARY_NAMENODE-START",
-        "DATANODE-START", "RESOURCEMANAGER-START", "NODEMANAGER-START", "HISTORYSERVER-START"],
     "HDFS_SERVICE_CHECK-SERVICE_CHECK": ["NAMENODE-START", "DATANODE-START",
         "SECONDARY_NAMENODE-START"],
     "MAPREDUCE2_SERVICE_CHECK-SERVICE_CHECK": ["NODEMANAGER-START",
@@ -65,8 +55,7 @@
   "_comment" : "Dependencies that are used in HA NameNode cluster",
   "namenode_optional_ha": {
     "NAMENODE-START": ["ZKFC-START", "JOURNALNODE-START", "ZOOKEEPER_SERVER-START"],
-    "ZKFC-START": ["ZOOKEEPER_SERVER-START"],
-    "NAGIOS_SERVER-START": ["ZKFC-START", "JOURNALNODE-START"]
+    "ZKFC-START": ["ZOOKEEPER_SERVER-START"]
   },
   "_comment" : "Dependencies that are used in ResourceManager HA cluster",
   "resourcemanager_optional_ha" : {

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4ededeb/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/GANGLIA/package/files/gmondLib.sh
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/GANGLIA/package/files/gmondLib.sh b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/GANGLIA/package/files/gmondLib.sh
index e7ea83f..d06afd8 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/GANGLIA/package/files/gmondLib.sh
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/GANGLIA/package/files/gmondLib.sh
@@ -160,7 +160,6 @@ host {
  *
  * At the very least, every gmond must expose its XML state to 
  * queriers from localhost.
- * Also we use this port for Nagios monitoring
  */
 tcp_accept_channel {
   bind = 0.0.0.0

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4ededeb/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HDFS/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HDFS/package/scripts/params.py b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HDFS/package/scripts/params.py
index 83b2ed9..0946d84 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HDFS/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HDFS/package/scripts/params.py
@@ -42,7 +42,6 @@ kinit_path_local = functions.get_kinit_path(["/usr/bin", "/usr/kerberos/bin", "/
 hostname = config["hostname"]
 rm_host = default("/clusterHostInfo/rm_host", [])
 slave_hosts = default("/clusterHostInfo/slave_hosts", [])
-hagios_server_hosts = default("/clusterHostInfo/nagios_server_host", [])
 oozie_servers = default("/clusterHostInfo/oozie_server", [])
 hcat_server_hosts = default("/clusterHostInfo/webhcat_server_host", [])
 hive_server_host =  default("/clusterHostInfo/hive_server_host", [])
@@ -63,7 +62,6 @@ has_resourcemanager = not len(rm_host) == 0
 has_histroryserver = not len(hs_host) == 0
 has_hbase_masters = not len(hbase_master_hosts) == 0
 has_slaves = not len(slave_hosts) == 0
-has_nagios = not len(hagios_server_hosts) == 0
 has_oozie_server = not len(oozie_servers)  == 0
 has_hcat_server_host = not len(hcat_server_hosts)  == 0
 has_hive_server_host = not len(hive_server_host)  == 0
@@ -85,7 +83,6 @@ if has_ganglia_server:
 #users and groups
 yarn_user = config['configurations']['yarn-env']['yarn_user']
 hbase_user = config['configurations']['hbase-env']['hbase_user']
-nagios_user = config['configurations']['nagios-env']['nagios_user']
 oozie_user = config['configurations']['oozie-env']['oozie_user']
 webhcat_user = config['configurations']['hive-env']['hcat_user']
 hcat_user = config['configurations']['hive-env']['hcat_user']
@@ -97,7 +94,6 @@ hdfs_principal_name = config['configurations']['hadoop-env']['hdfs_principal_nam
 
 user_group = config['configurations']['cluster-env']['user_group']
 proxyuser_group =  config['configurations']['hadoop-env']['proxyuser_group']
-nagios_group = config['configurations']['nagios-env']['nagios_group']
 
 #hadoop params
 hadoop_conf_dir = "/etc/hadoop/conf"

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4ededeb/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/configuration/nagios-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/configuration/nagios-env.xml b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/configuration/nagios-env.xml
deleted file mode 100644
index fad8374..0000000
--- a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/configuration/nagios-env.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?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>nagios_user</name>
-    <value>nagios</value>
-    <property-type>USER</property-type>
-    <description>Nagios Username.</description>
-  </property>
-  <property>
-    <name>nagios_group</name>
-    <value>nagios</value>
-    <property-type>GROUP</property-type>
-    <description>Nagios Group.</description>
-  </property>
-  <property>
-    <name>nagios_web_login</name>
-    <value>nagiosadmin</value>
-    <description>Nagios web user.</description>
-  </property>
-  <property require-input = "true">
-    <name>nagios_web_password</name>
-    <value></value>
-    <property-type>PASSWORD</property-type>
-    <description>Nagios Admin Password.</description>
-  </property>
-  <property require-input = "true">
-    <name>nagios_contact</name>
-    <value></value>
-    <description>Hadoop Admin Email.</description>
-  </property>
-
-</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4ededeb/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/metainfo.xml b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/metainfo.xml
deleted file mode 100644
index bebc7d6..0000000
--- a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/metainfo.xml
+++ /dev/null
@@ -1,160 +0,0 @@
-<?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>NAGIOS</name>
-      <displayName>Nagios</displayName>
-      <comment>Nagios Monitoring and Alerting system</comment>
-      <version>3.5.0</version>
-      <components>
-        <component>
-           <name>NAGIOS_SERVER</name>
-          <displayName>Nagios Server</displayName>
-           <category>MASTER</category>
-           <cardinality>1</cardinality>
-          <dependencies>
-            <dependency>
-              <name>HDFS/HDFS_CLIENT</name>
-              <scope>host</scope>
-              <auto-deploy>
-                <enabled>true</enabled>
-              </auto-deploy>
-            </dependency>
-            <dependency>
-              <name>MAPREDUCE2/MAPREDUCE2_CLIENT</name>
-              <scope>host</scope>
-              <auto-deploy>
-                <enabled>true</enabled>
-              </auto-deploy>
-            </dependency>
-            <dependency>
-              <name>OOZIE/OOZIE_CLIENT</name>
-              <scope>host</scope>
-              <auto-deploy>
-                <enabled>true</enabled>
-              </auto-deploy>
-            </dependency>
-            <dependency>
-              <name>YARN/YARN_CLIENT</name>
-              <scope>host</scope>
-              <auto-deploy>
-                <enabled>true</enabled>
-              </auto-deploy>
-            </dependency>
-            <dependency>
-              <name>HCATALOG/HCAT</name>
-              <scope>host</scope>
-              <auto-deploy>
-                <enabled>true</enabled>
-              </auto-deploy>
-            </dependency>
-          </dependencies>
-           <commandScript>
-             <script>scripts/nagios_server.py</script>
-             <scriptType>PYTHON</scriptType>
-             <timeout>600</timeout>
-           </commandScript>
-        </component>
-      </components>
-      <osSpecifics>
-        <osSpecific>
-          <osFamily>any</osFamily>
-          <packages>
-            <package>
-              <name>perl</name>
-            </package>
-            <package>
-              <name>fping</name>
-            </package>
-          </packages>
-        </osSpecific>
-        <osSpecific>
-          <osFamily>ubuntu12</osFamily>
-          <packages>
-            <package>
-              <name>nagios3</name>
-            </package>
-            <package>
-              <name>nagios3-common</name>
-            </package>
-            <package>
-              <name>nagios3-dbg</name>
-            </package>
-            <package>
-              <name>nagios3-doc</name>
-            </package>
-            <package>
-              <name>nagios-plugins-extra</name>
-            </package>
-            <package>
-              <name>php5-curl</name>
-            </package>
-            <package>
-              <name>libapache2-mod-php5</name>
-            </package>
-          </packages>
-        </osSpecific>
-        <osSpecific>
-          <osFamily>redhat5,redhat6,suse11</osFamily>
-          <packages>
-            <package>
-              <name>nagios-plugins-1.4.9</name>
-            </package>
-            <package>
-              <name>nagios-3.5.0-99</name>
-            </package>
-            <package>
-              <name>nagios-www-3.5.0-99</name>
-            </package>
-            <package>
-              <name>nagios-devel-3.5.0-99</name>
-            </package>
-          </packages>
-        </osSpecific>
-        <osSpecific>
-          <osFamily>suse11</osFamily>
-          <packages>
-            <package>
-              <name>php5*-json</name>
-            </package>
-            <package>
-              <name>apache2?mod_php*</name>
-            </package>
-            <package>
-              <name>php-curl</name>
-            </package>
-          </packages>
-        </osSpecific>
-        <osSpecific>
-          <osFamily>redhat5</osFamily>
-          <packages>
-            <package>
-              <name>php-pecl-json.x86_64</name>
-            </package>
-          </packages>
-        </osSpecific>
-      </osSpecifics>
-      <configuration-dependencies>
-        <config-type>nagios-env</config-type>
-      </configuration-dependencies>
-      <monitoringService>true</monitoringService>
-    </service>
-  </services>
-</metainfo>

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4ededeb/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_aggregate.php
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_aggregate.php b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_aggregate.php
deleted file mode 100644
index 792b25b..0000000
--- a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_aggregate.php
+++ /dev/null
@@ -1,248 +0,0 @@
-<?php
-/*
- * 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("PASSIVE_MODE_STR", "AMBARIPASSIVE=");
-
-  $options = getopt ("f:s:n:w:c:t:");
-  if (!array_key_exists('t', $options) || !array_key_exists('f', $options) || !array_key_exists('w', $options)
-      || !array_key_exists('c', $options) || !array_key_exists('s', $options)) {
-    usage();
-    exit(3);
-  }
-  $status_file=$options['f'];
-  $status_code=$options['s'];
-  $type=$options['t'];
-  $warn=$options['w']; $warn = preg_replace('/%$/', '', $warn);
-  $crit=$options['c']; $crit = preg_replace('/%$/', '', $crit);
-  if ($type == "service" && !array_key_exists('n', $options)) {
-    echo "Service description not provided -n option\n";
-    exit(3);
-  }
-  if ($type == "service") {
-    $service_name=$options['n'];
-    /* echo "DESC: " . $service_name . "\n"; */
-  }
-
-  $result = array();
-  $status_file_content = file_get_contents($status_file);
-
-  $counts;
-  if ($type == "service") {
-    $counts=query_alert_count($status_file_content, $service_name, $status_code);
-  } else {
-    $counts=query_host_count($status_file_content, $status_code);
-  }
-
-  if ($counts['total'] == 0) {
-    $percent = 0;
-  } else {
-    $percent = ($counts['actual']/$counts['total'])*100;
-  }
-  if ($percent >= $crit) {
-    echo "CRITICAL: total:<" . $counts['total'] . ">, affected:<" . $counts['actual'] . ">\n";
-    exit (2);
-  }
-  if ($percent >= $warn) {
-    echo "WARNING: total:<" . $counts['total'] . ">, affected:<" . $counts['actual'] . ">\n";
-    exit (1);
-  }
-  echo "OK: total:<" . $counts['total'] . ">, affected:<" . $counts['actual'] . ">\n";
-  exit(0);
-
-
-  # Functions
-  /* print usage */
-  function usage () {
-    echo "Usage: $0 -f <status_file_path> -t type(host/service) -s <status_codes> -n <service description> -w <warn%> -c <crit%>\n";
-  }
-
-  /* Query host count */
-  function query_host_count ($status_file_content, $status_code) {
-    $num_matches = preg_match_all("/hoststatus \{([\S\s]*?)\}/", $status_file_content, $matches, PREG_PATTERN_ORDER);
-    $hostcounts_object = array ();
-    $total_hosts = 0;
-    $hosts = 0;
-    foreach ($matches[0] as $object) {
-      $total_hosts++;
-      if (getParameter($object, "current_state") == $status_code) {
-        $hosts++;
-      }
-    }
-    $hostcounts_object['total'] = $total_hosts;
-    $hostcounts_object['actual'] = $hosts;
-    return $hostcounts_object;
-  }
-
-  /* Query Alert counts */
-  function query_alert_count ($status_file_content, $service_name, $status_code) {
-    $num_matches = preg_match_all("/servicestatus \{([\S\s]*?)\}/", $status_file_content, $matches, PREG_PATTERN_ORDER);
-    $alertcounts_objects = array ();
-    $total_alerts=0;
-    $alerts=0;
-    foreach ($matches[0] as $object) {
-      $long_out = getParameter($object, "long_plugin_output");
-      $skip_if_match=!strncmp($long_out, PASSIVE_MODE_STR, strlen(PASSIVE_MODE_STR));
-
-      if (getParameter($object, "service_description") == $service_name && !$skip_if_match) {
-        $total_alerts++;
-        if (getParameter($object, "current_state") >= $status_code) {
-          $alerts++;
-        }
-      }
-    }
-    $alertcounts_objects['total'] = $total_alerts;
-    $alertcounts_objects['actual'] = $alerts;
-    return $alertcounts_objects;
-  }
-
-  function get_service_type($service_description)
-  {
-    $pieces = explode("::", $service_description);
-    switch ($pieces[0]) {
-      case "NAMENODE":
-        $pieces[0] = "HDFS";
-        break;
-      case "JOBTRACKER":
-        $pieces[0] = "MAPREDUCE";
-        break;
-      case "HBASEMASTER":
-        $pieces[0] = "HBASE";
-        break;
-      case "SYSTEM":
-      case "HDFS":
-      case "MAPREDUCE":
-      case "HBASE":
-      case "STORM":
-        break;
-      default:
-        $pieces[0] = "UNKNOWN";
-    }
-    return $pieces[0];
-  }
-
-  function getParameter($object, $key)
-  {
-    $pattern="/\s" . $key . "[\s= ]*([\S, ]*)\n/";
-    $num_mat = preg_match($pattern, $object, $matches);
-    $value = "";
-    if ($num_mat) {
-      $value = $matches[1];
-    }
-    return $value;
-  }
-
-function indent($json) {
-
-    $result      = '';
-    $pos         = 0;
-    $strLen      = strlen($json);
-    $indentStr   = '  ';
-    $newLine     = "\n";
-    $prevChar    = '';
-    $outOfQuotes = true;
-
-    for ($i=0; $i<=$strLen; $i++) {
-
-        // Grab the next character in the string.
-        $char = substr($json, $i, 1);
-
-        // Are we inside a quoted string?
-        if ($char == '"' && $prevChar != '\\') {
-            $outOfQuotes = !$outOfQuotes;
-
-        // If this character is the end of an element,
-        // output a new line and indent the next line.
-        } else if(($char == '}' || $char == ']') && $outOfQuotes) {
-            $result .= $newLine;
-            $pos --;
-            for ($j=0; $j<$pos; $j++) {
-                $result .= $indentStr;
-            }
-        }
-
-        // Add the character to the result string.
-        $result .= $char;
-
-        // If the last character was the beginning of an element,
-        // output a new line and indent the next line.
-        if (($char == ',' || $char == '{' || $char == '[') && $outOfQuotes) {
-            $result .= $newLine;
-            if ($char == '{' || $char == '[') {
-                $pos ++;
-            }
-
-            for ($j = 0; $j < $pos; $j++) {
-                $result .= $indentStr;
-            }
-        }
-
-        $prevChar = $char;
-    }
-
-    return $result;
-}
-
-/* JSON documment format */
-/*
-{
-  "programstatus":{
-    "last_command_check":"1327385743"
-  },
-  "hostcounts":{
-    "up_nodes":"",
-    "down_nodes":""
-  },
-  "hoststatus":[
-    {
-      "host_name"="ip-10-242-191-48.ec2.internal",
-      "current_state":"0",
-      "last_hard_state":"0",
-      "plugin_output":"PING OK - Packet loss = 0%, RTA = 0.04 ms",
-      "last_check":"1327385564",
-      "current_attempt":"1",
-      "last_hard_state_change":"1327362079",
-      "last_time_up":"1327385574",
-      "last_time_down":"0",
-      "last_time_unreachable":"0",
-      "is_flapping":"0",
-      "last_check":"1327385574",
-      "servicestatus":[
-      ]
-    }
-  ],
-  "servicestatus":[
-    {
-      "service_type":"HDFS",  {HBASE, MAPREDUCE, HIVE, ZOOKEEPER}
-      "service_description":"HDFS Current Load",
-      "host_name"="ip-10-242-191-48.ec2.internal",
-      "current_attempt":"1",
-      "current_state":"0",
-      "plugin_output":"PING OK - Packet loss = 0%, RTA = 0.04 ms",
-      "last_hard_state_change":"1327362079",
-      "last_time_ok":"1327385479",
-      "last_time_warning":"0",
-      "last_time_unknown":"0",
-      "last_time_critical":"0",
-      "last_check":"1327385574",
-      "is_flapping":"0"
-    }
-  ]
-}
-*/
-
-?>

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4ededeb/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_ambari_alerts.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_ambari_alerts.py b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_ambari_alerts.py
deleted file mode 100644
index 833a798..0000000
--- a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_ambari_alerts.py
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/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 os
-import optparse
-import json
-import traceback
-
-def main():
-
-  parser = optparse.OptionParser()
-
-  parser.add_option("-H", "--host", dest="host", default="localhost", help="NameNode host")
-  parser.add_option("-n", "--name", dest="alert_name", help="Alert name to check")
-  parser.add_option("-f", "--file", dest="alert_file", help="File containing the alert structure")
-
-  (options, args) = parser.parse_args()
-
-  if options.alert_name is None:
-    print "Alert name is required (--name or -n)"
-    exit(-1)
-
-  if options.alert_file is None:
-    print "Alert file is required (--file or -f)"
-    exit(-1)
-
-  if not os.path.exists(options.alert_file):
-    print "Status is unreported"
-    exit(3)
-
-  try:
-    with open(options.alert_file, 'r') as f:
-      data = json.load(f)
-
-      buf_list = []
-      exit_code = 0
-
-      for_hosts = data[options.alert_name]
-      if for_hosts.has_key(options.host):
-        for host_entry in for_hosts[options.host]:
-          buf_list.append(host_entry['text'])
-          alert_state = host_entry['state']
-          if alert_state == 'CRITICAL' and exit_code < 2:
-            exit_code = 2
-          elif alert_state == 'WARNING' and exit_code < 1:
-            exit_code = 1
-
-      if 0 == len(buf_list):
-        print "Status is not reported"
-        exit(3)
-      else:
-        print ", ".join(buf_list)
-        exit(exit_code)
-      
-  except Exception:
-    traceback.print_exc()
-    exit(3)
-
-if __name__ == "__main__":
-  main()
-

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4ededeb/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_checkpoint_time.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_checkpoint_time.py b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_checkpoint_time.py
deleted file mode 100644
index ab889d1..0000000
--- a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_checkpoint_time.py
+++ /dev/null
@@ -1,112 +0,0 @@
-#!/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 os
-import optparse
-import time
-import urllib2
-import json
-
-CRIT_MESSAGE = "CRITICAL: Last checkpoint time is below acceptable. Checkpoint was done {h}h. {m}m. ago"
-WARNING_MESSAGE = "WARNING: Last checkpoint time is below acceptable. Checkpoint was done {h}h. {m}m. ago"
-OK_MESSAGE = "OK: Last checkpoint time"
-WARNING_JMX_MESSAGE = "WARNING: NameNode JMX not accessible"
-
-def main():
-
-  current_time = int(round(time.time() * 1000))
-
-  parser = optparse.OptionParser()
-
-  parser.add_option("-H", "--host", dest="host",
-                    default="localhost", help="NameNode host")
-  parser.add_option("-p", "--port", dest="port",
-                    default="50070", help="NameNode jmx port")
-  parser.add_option("-w", "--warning", dest="warning",
-                    default="200", help="Percent for warning alert")
-  parser.add_option("-c", "--critical", dest="crit",
-                    default="200", help="Percent for critical alert")
-  parser.add_option("-t", "--period", dest="period",
-                    default="21600", help="Period time")
-  parser.add_option("-x", "--txns", dest="txns",
-                    default="1000000",
-                    help="CheckpointNode will create a checkpoint of the namespace every 'dfs.namenode.checkpoint.txns'")
-  (options, args) = parser.parse_args()
-
-  host = get_available_nn_host(options)
-
-  last_checkpoint_time_qry = "http://{host}:{port}/jmx?qry=Hadoop:service=NameNode,name=FSNamesystem".\
-    format(host=host, port=options.port)
-  last_checkpoint_time = int(get_value_from_jmx(last_checkpoint_time_qry,"LastCheckpointTime"))
-
-  journal_transaction_info_qry = "http://{host}:{port}/jmx?qry=Hadoop:service=NameNode,name=NameNodeInfo".\
-    format(host=host, port=options.port)
-  journal_transaction_info = get_value_from_jmx(journal_transaction_info_qry,"JournalTransactionInfo")
-  journal_transaction_info_dict = json.loads(journal_transaction_info)
-
-  last_txid = int(journal_transaction_info_dict['LastAppliedOrWrittenTxId'])
-  most_txid = int(journal_transaction_info_dict['MostRecentCheckpointTxId'])
-
-  delta = (current_time - last_checkpoint_time)/1000
-
-  if ((last_txid - most_txid) > int(options.txns)) and (float(delta) / int(options.period)*100 >= int(options.crit)):
-    print CRIT_MESSAGE.format(h=get_time(delta)['h'], m=get_time(delta)['m'])
-    exit(2)
-  elif ((last_txid - most_txid) > int(options.txns)) and (float(delta) / int(options.period)*100 >= int(options.warning)):
-    print WARNING_MESSAGE.format(h=get_time(delta)['h'], m=get_time(delta)['m'])
-    exit(1)
-  else:
-    print OK_MESSAGE
-    exit(0)
-
-def get_time(delta):
-  h = int(delta/3600)
-  m = int((delta % 3600)/60)
-  return {'h':h, 'm':m}
-
-def get_value_from_jmx(qry, property):
-  try:
-    response = urllib2.urlopen(qry)
-    data=response.read()
-  except Exception:
-    print WARNING_JMX_MESSAGE
-    exit(1)
-
-  data_dict = json.loads(data)
-  return (data_dict["beans"][0][property])
-
-def get_available_nn_host(options):
-  nn_hosts = options.host.split(" ")
-  for nn_host in nn_hosts:
-    try:
-      urllib2.urlopen("http://{host}:{port}/jmx".format(host=nn_host, port=options.port))
-      return nn_host
-    except Exception:
-      pass
-  print WARNING_JMX_MESSAGE
-  exit(1)
-
-if __name__ == "__main__":
-  main()
-
-
-

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4ededeb/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_cpu.php
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_cpu.php b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_cpu.php
deleted file mode 100644
index 0744e38..0000000
--- a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_cpu.php
+++ /dev/null
@@ -1,109 +0,0 @@
-<?php
-/*
- * 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.
- */
-
-  include "hdp_nagios_init.php";
-
-  $options = getopt ("h:p:w:c:k:r:t:u:e");
-  if (!array_key_exists('h', $options) || !array_key_exists('p', $options) || !array_key_exists('w', $options)
-      || !array_key_exists('c', $options)) {
-    usage();
-    exit(3);
-  }
-
-  $hosts=$options['h'];
-  $port=$options['p'];
-  $warn=$options['w']; $warn = preg_replace('/%$/', '', $warn);
-  $crit=$options['c']; $crit = preg_replace('/%$/', '', $crit);
-  $keytab_path=$options['k'];
-  $principal_name=$options['r'];
-  $kinit_path_local=$options['t'];
-  $security_enabled=$options['u'];
-  $ssl_enabled=$options['e'];
-
-  /* Kinit if security enabled */
-  $status = kinit_if_needed($security_enabled, $kinit_path_local, $keytab_path, $principal_name);
-  $retcode = $status[0];
-  $output = $status[1];
-  
-  if ($output != 0) {
-    echo "CRITICAL: Error doing kinit for nagios. $output";
-    exit (2);
-  }
-
-  $protocol = ($ssl_enabled == "true" ? "https" : "http");
-
-
-  foreach (preg_split('/,/', $hosts) as $host) {
-    /* Get the json document */
-
-    $ch = curl_init();
-    $username = rtrim(`id -un`, "\n");
-    curl_setopt_array($ch, array( CURLOPT_URL => $protocol."://".$host.":".$port."/jmx?qry=java.lang:type=OperatingSystem",
-                                  CURLOPT_RETURNTRANSFER => true,
-                                  CURLOPT_HTTPAUTH => CURLAUTH_ANY,
-                                  CURLOPT_USERPWD => "$username:",
-                                  CURLOPT_SSL_VERIFYPEER => FALSE ));
-    $json_string = curl_exec($ch);
-    $info = curl_getinfo($ch);
-    if (intval($info['http_code']) == 401){
-      logout();
-      $json_string = curl_exec($ch);
-    }
-    $info = curl_getinfo($ch);
-    curl_close($ch);
-    $json_array = json_decode($json_string, true);
-
-    $object = $json_array['beans'][0];
-
-    if (count($object) == 0) {
-      echo "CRITICAL: Data inaccessible, Status code = ". $info['http_code'] ."\n";
-      exit(2);
-    }
-
-    $cpu_load = $object['SystemCpuLoad'];
-
-    if (!isset($object['SystemCpuLoad']) || $cpu_load < 0.0) {
-      echo "WARNING: Data unavailable, SystemCpuLoad is not set\n";
-      exit(1);
-    }
-
-    $cpu_count = $object['AvailableProcessors'];
-
-    $cpu_percent = $cpu_load*100;
-  }
-
-  $out_msg = $cpu_count . " CPU, load " . number_format($cpu_percent, 1, '.', '') . '%';
-
-  if ($cpu_percent > $crit) {
-    echo $out_msg . ' > ' . $crit . "% : CRITICAL\n";
-    exit(2);
-  }
-  if ($cpu_percent > $warn) {
-    echo $out_msg . ' > ' . $warn . "% : WARNING\n";
-    exit(1);
-  }
-
-  echo $out_msg . ' < ' . $warn . "% : OK\n";
-  exit(0);
-
-  /* print usage */
-  function usage () {
-    echo "Usage: $0 -h <host> -p port -w <warn%> -c <crit%> -k keytab_path -r principal_name -t kinit_path -u security_enabled -e ssl_enabled\n";
-  }
-?>

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4ededeb/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_cpu.pl
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_cpu.pl b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_cpu.pl
deleted file mode 100644
index a5680f7..0000000
--- a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_cpu.pl
+++ /dev/null
@@ -1,114 +0,0 @@
-#!/usr/bin/perl -w 
-#
-#
-# 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.
-#
-#
-use strict;
-use Net::SNMP;
-use Getopt::Long;
-
-# Variable
-my $base_proc = "1.3.6.1.2.1.25.3.3.1";   
-my $proc_load = "1.3.6.1.2.1.25.3.3.1.2"; 
-my $o_host = 	undef;
-my $o_community = undef;
-my $o_warn=	undef;
-my $o_crit=	undef;
-my $o_timeout = 15;
-my $o_port = 161;
-
-sub Usage {
-    print "Usage: $0 -H <host> -C <snmp_community> -w <warn level> -c <crit level>\n";
-}
-
-Getopt::Long::Configure ("bundling");
-GetOptions(
-  'H:s'   => \$o_host,	
-  'C:s'   => \$o_community,	
-  'c:s'   => \$o_crit,        
-  'w:s'   => \$o_warn
-          );
-if (!defined $o_host || !defined $o_community || !defined $o_crit || !defined $o_warn) {
-  Usage();
-  exit 3;
-}
-$o_warn =~ s/\%//g; 
-$o_crit =~ s/\%//g;
-alarm ($o_timeout);
-$SIG{'ALRM'} = sub {
- print "Unable to contact host: $o_host\n";
- exit 3;
-};
-
-# Connect to host
-my ($session,$error);
-($session, $error) = Net::SNMP->session(
-		-hostname  => $o_host,
-		-community => $o_community,
-		-port      => $o_port,
-		-timeout   => $o_timeout
-	  );
-if (!defined($session)) {
-   printf("Error opening session: %s.\n", $error);
-   exit 3;
-}
-
-my $exit_val=undef;
-my $resultat =  (Net::SNMP->VERSION < 4) ?
-	  $session->get_table($base_proc)
-	: $session->get_table(Baseoid => $base_proc);
-
-if (!defined($resultat)) {
-   printf("ERROR: Description table : %s.\n", $session->error);
-   $session->close;
-   exit 3;
-}
-
-$session->close;
-
-my ($cpu_used,$ncpu)=(0,0);
-foreach my $key ( keys %$resultat) {
-  if ($key =~ /$proc_load/) {
-    $cpu_used += $$resultat{$key};
-    $ncpu++;
-  }
-}
-
-if ($ncpu==0) {
-  print "Can't find CPU usage information : UNKNOWN\n";
-  exit 3;
-}
-
-$cpu_used /= $ncpu;
-
-print "$ncpu CPU, ", $ncpu==1 ? "load" : "average load";
-printf(" %.1f%%",$cpu_used);
-$exit_val=0;
-
-if ($cpu_used > $o_crit) {
- print " > $o_crit% : CRITICAL\n";
- $exit_val=2;
-} else {
-  if ($cpu_used > $o_warn) {
-   print " > $o_warn% : WARNING\n";
-   $exit_val=1;
-  }
-}
-print " < $o_warn% : OK\n" if ($exit_val eq 0);
-exit $exit_val;

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4ededeb/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_cpu_ha.php
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_cpu_ha.php b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_cpu_ha.php
deleted file mode 100644
index 91a7c64..0000000
--- a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_cpu_ha.php
+++ /dev/null
@@ -1,116 +0,0 @@
-<?php
-/*
- * 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.
- */
-
-  include "hdp_nagios_init.php";
-
-  $options = getopt ("h:p:w:c:k:r:t:u:e");
-  if (!array_key_exists('h', $options) || !array_key_exists('p', $options) || !array_key_exists('w', $options)
-      || !array_key_exists('c', $options)) {
-    usage();
-    exit(3);
-  }
-
-  $hosts=$options['h'];
-  $port=$options['p'];
-  $warn=$options['w']; $warn = preg_replace('/%$/', '', $warn);
-  $crit=$options['c']; $crit = preg_replace('/%$/', '', $crit);
-  $keytab_path=$options['k'];
-  $principal_name=$options['r'];
-  $kinit_path_local=$options['t'];
-  $security_enabled=$options['u'];
-  $ssl_enabled=$options['e'];
-
-  /* Kinit if security enabled */
-  $status = kinit_if_needed($security_enabled, $kinit_path_local, $keytab_path, $principal_name);
-  $retcode = $status[0];
-  $output = $status[1];
-
-  if ($output != 0) {
-    echo "CRITICAL: Error doing kinit for nagios. $output";
-    exit (2);
-  }
-
-  $protocol = ($ssl_enabled == "true" ? "https" : "http");
-
-  $jmx_response_available = false;
-  $jmx_response;
-
-  foreach (preg_split('/,/', $hosts) as $host) {
-    /* Get the json document */
-
-    $ch = curl_init();
-    $username = rtrim(`id -un`, "\n");
-    curl_setopt_array($ch, array( CURLOPT_URL => $protocol."://".$host.":".$port."/jmx?qry=java.lang:type=OperatingSystem",
-                                  CURLOPT_RETURNTRANSFER => true,
-                                  CURLOPT_HTTPAUTH => CURLAUTH_ANY,
-                                  CURLOPT_USERPWD => "$username:",
-                                  CURLOPT_SSL_VERIFYPEER => FALSE ));
-    $json_string = curl_exec($ch);
-    $info = curl_getinfo($ch);
-    if (intval($info['http_code']) == 401){
-      logout();
-      $json_string = curl_exec($ch);
-    }
-    $info = curl_getinfo($ch);
-    curl_close($ch);
-    $json_array = json_decode($json_string, true);
-
-    $object = $json_array['beans'][0];
-
-    if (count($object) > 0) {
-      $jmx_response_available = true;
-      $jmx_response = $object;
-    }
-  }
-
-  if ($jmx_response_available === false) {
-    echo "CRITICAL: Data inaccessible, Status code = ". $info['http_code'] ."\n";
-    exit(2);
-  }
-
-  $cpu_load = $jmx_response['SystemCpuLoad'];
-
-  if (!isset($jmx_response['SystemCpuLoad']) || $cpu_load < 0.0) {
-    echo "WARNING: Data unavailable, SystemCpuLoad is not set\n";
-    exit(1);
-  }
-
-  $cpu_count = $jmx_response['AvailableProcessors'];
-
-  $cpu_percent = $cpu_load*100;
-
-  $out_msg = $cpu_count . " CPU, load " . number_format($cpu_percent, 1, '.', '') . '%';
-
-  if ($cpu_percent > $crit) {
-    echo $out_msg . ' > ' . $crit . "% : CRITICAL\n";
-    exit(2);
-  }
-  if ($cpu_percent > $warn) {
-    echo $out_msg . ' > ' . $warn . "% : WARNING\n";
-    exit(1);
-  }
-
-  echo $out_msg . ' < ' . $warn . "% : OK\n";
-  exit(0);
-
-  /* print usage */
-  function usage () {
-    echo "Usage: $0 -h <host> -p port -w <warn%> -c <crit%> -k keytab_path -r principal_name -t kinit_path -u security_enabled -e ssl_enabled\n";
-  }
-?>

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4ededeb/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_datanode_storage.php
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_datanode_storage.php b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_datanode_storage.php
deleted file mode 100644
index dee22b4..0000000
--- a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_datanode_storage.php
+++ /dev/null
@@ -1,100 +0,0 @@
-<?php
-/*
- * 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.
- */
-
-/* This plugin makes call to master node, get the jmx-json document
- * check the storage capacity remaining on local datanode storage
- */
-
-  include "hdp_nagios_init.php";
-
-  $options = getopt ("h:p:w:c:e:k:r:t:s:");
-  if (!array_key_exists('h', $options) || !array_key_exists('p', $options) || !array_key_exists('w', $options) 
-      || !array_key_exists('c', $options)) {
-    usage();
-    exit(3);
-  }
-
-  $host=$options['h'];
-  $port=$options['p'];
-  $warn=$options['w']; $warn = preg_replace('/%$/', '', $warn);
-  $crit=$options['c']; $crit = preg_replace('/%$/', '', $crit);
-  $keytab_path=$options['k'];
-  $principal_name=$options['r'];
-  $kinit_path_local=$options['t'];
-  $security_enabled=$options['s'];
-  $ssl_enabled=$options['e'];
-
-  /* Kinit if security enabled */
-  $status = kinit_if_needed($security_enabled, $kinit_path_local, $keytab_path, $principal_name);
-  $retcode = $status[0];
-  $output = $status[1];
-  
-  if ($output != 0) {
-    echo "CRITICAL: Error doing kinit for nagios. $output";
-    exit (2);
-  }
-
-  $protocol = ($ssl_enabled == "true" ? "https" : "http");
-
-  /* Get the json document */
-  $ch = curl_init();
-  $username = rtrim(`id -un`, "\n");
-  curl_setopt_array($ch, array( CURLOPT_URL => $protocol."://".$host.":".$port."/jmx?qry=Hadoop:service=DataNode,name=FSDatasetState-*",
-                                CURLOPT_RETURNTRANSFER => true,
-                                CURLOPT_HTTPAUTH => CURLAUTH_ANY,
-                                CURLOPT_USERPWD => "$username:",
-                                CURLOPT_SSL_VERIFYPEER => FALSE ));
-  $json_string = curl_exec($ch);
-  $info = curl_getinfo($ch);
-  if (intval($info['http_code']) == 401){
-    logout();
-    $json_string = curl_exec($ch);
-  }
-  $info = curl_getinfo($ch);
-  curl_close($ch);
-  $json_array = json_decode($json_string, true);
-  $object = $json_array['beans'][0];
-  $cap_remain = $object['Remaining']; /* Total capacity - any extenal files created in data directories by non-hadoop app */
-  $cap_total = $object['Capacity']; /* Capacity used by all data partitions minus space reserved for M/R */
-  if (count($object) == 0) {
-    echo "CRITICAL: Data inaccessible, Status code = ". $info['http_code'] ."\n";
-    exit(2);
-  }  
-  $percent_full = ($cap_total - $cap_remain)/$cap_total * 100;
-
-  $out_msg = "Capacity:[" . $cap_total . 
-             "], Remaining Capacity:[" . $cap_remain . 
-             "], percent_full:[" . $percent_full  . "]";
-  
-  if ($percent_full > $crit) {
-    echo "CRITICAL: " . $out_msg . "\n";
-    exit (2);
-  }
-  if ($percent_full > $warn) {
-    echo "WARNING: " . $out_msg . "\n";
-    exit (1);
-  }
-  echo "OK: " . $out_msg . "\n";
-  exit(0);
-
-  /* print usage */
-  function usage () {
-    echo "Usage: $0 -h <host> -p port -w <warn%> -c <crit%> -k keytab path -r principal name -t kinit path -s security enabled -e ssl enabled\n";
-  }
-?>

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4ededeb/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_hdfs_blocks.php
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_hdfs_blocks.php b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_hdfs_blocks.php
deleted file mode 100644
index 3693aa0..0000000
--- a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_hdfs_blocks.php
+++ /dev/null
@@ -1,102 +0,0 @@
-<?php
-/*
- * 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.
- */
-
-/* This plugin makes call to master node, get the jmx-json document
- * check the corrupt or missing blocks % is > threshod
- * check_jmx -H hostaddress -p port -w 1% -c 1%
- */
-
-  include "hdp_nagios_init.php";
-
-  $options = getopt ("h:p:s:e:k:r:t:u:");
-  if (!array_key_exists('h', $options) || !array_key_exists('p', $options) || !array_key_exists('s', $options)) {
-    usage();
-    exit(3);
-  }
-  $hosts=$options['h'];
-  $port=$options['p'];
-  $nn_jmx_property=$options['s'];
-  $keytab_path=$options['k'];
-  $principal_name=$options['r'];
-  $kinit_path_local=$options['t'];
-  $security_enabled=$options['u'];
-  $ssl_enabled=$options['e'];
-
-  /* Kinit if security enabled */
-  $status = kinit_if_needed($security_enabled, $kinit_path_local, $keytab_path, $principal_name);
-  $retcode = $status[0];
-  $output = $status[1];
-  
-  if ($output != 0) {
-    echo "CRITICAL: Error doing kinit for nagios. $output";
-    exit (2);
-  }
-
-  $protocol = ($ssl_enabled == "true" ? "https" : "http");
-
-
-  foreach (preg_split('/,/', $hosts) as $host) {
-    /* Get the json document */
-
-    $ch = curl_init();
-    $username = rtrim(`id -un`, "\n");
-    curl_setopt_array($ch, array( CURLOPT_URL => $protocol."://".$host.":".$port."/jmx?qry=Hadoop:service=NameNode,name=".$nn_jmx_property,
-                                  CURLOPT_RETURNTRANSFER => true,
-                                  CURLOPT_HTTPAUTH => CURLAUTH_ANY,
-                                  CURLOPT_USERPWD => "$username:",
-                                  CURLOPT_SSL_VERIFYPEER => FALSE ));
-    $json_string = curl_exec($ch);
-    $info = curl_getinfo($ch);
-    if (intval($info['http_code']) == 401){
-      logout();
-      $json_string = curl_exec($ch);
-    }
-    $info = curl_getinfo($ch);
-    curl_close($ch);
-    $json_array = json_decode($json_string, true);
-    $m_percent = 0;
-    $object = $json_array['beans'][0];
-    $missing_blocks = $object['MissingBlocks'];
-    $total_blocks = $object['BlocksTotal'];
-    if (count($object) == 0) {
-      echo "CRITICAL: Data inaccessible, Status code = ". $info['http_code'] ."\n";
-      exit(2);
-    }    
-    if($total_blocks == 0) {
-      $m_percent = 0;
-    } else {
-      $m_percent = ($missing_blocks/$total_blocks)*100;
-      break;
-    }
-  }
-  $out_msg = "missing_blocks:<" . $missing_blocks .
-             ">, total_blocks:<" . $total_blocks . ">";
-
-  if ($m_percent > 0) {
-    echo "CRITICAL: " . $out_msg . "\n";
-    exit (2);
-  }
-  echo "OK: " . $out_msg . "\n";
-  exit(0);
-
-  /* print usage */
-  function usage () {
-    echo "Usage: $0 -h <host> -p port -s <namenode bean name> -k keytab path -r principal name -t kinit path -u security enabled -e ssl enabled\n";
-  }
-?>

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4ededeb/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_hdfs_capacity.php
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_hdfs_capacity.php b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_hdfs_capacity.php
deleted file mode 100644
index af72723..0000000
--- a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/NAGIOS/package/files/check_hdfs_capacity.php
+++ /dev/null
@@ -1,109 +0,0 @@
-<?php
-/*
- * 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.
- */
-
-/* This plugin makes call to master node, get the jmx-json document
- * check the % HDFS capacity used >= warn and critical limits.
- * check_jmx -H hostaddress -p port -w 1 -c 1
- */
-
-  include "hdp_nagios_init.php";
-
-  $options = getopt ("h:p:w:c:e:k:r:t:s:");
-  if (!array_key_exists('h', $options) || !array_key_exists('p', $options) || !array_key_exists('w', $options)
-      || !array_key_exists('c', $options)) {
-    usage();
-    exit(3);
-  }
-
-  $hosts=$options['h'];
-  $port=$options['p'];
-  $warn=$options['w']; $warn = preg_replace('/%$/', '', $warn);
-  $crit=$options['c']; $crit = preg_replace('/%$/', '', $crit);
-  $keytab_path=$options['k'];
-  $principal_name=$options['r'];
-  $kinit_path_local=$options['t'];
-  $security_enabled=$options['s'];
-  $ssl_enabled=$options['e'];
-
-  /* Kinit if security enabled */
-  $status = kinit_if_needed($security_enabled, $kinit_path_local, $keytab_path, $principal_name);
-  $retcode = $status[0];
-  $output = $status[1];
-  
-  if ($output != 0) {
-    echo "CRITICAL: Error doing kinit for nagios. $output";
-    exit (2);
-  }
-
-  $protocol = ($ssl_enabled == "true" ? "https" : "http");
-
-
-  foreach (preg_split('/,/', $hosts) as $host) {
-    /* Get the json document */
-    $ch = curl_init();
-    $username = rtrim(`id -un`, "\n");
-    curl_setopt_array($ch, array( CURLOPT_URL => $protocol."://".$host.":".$port."/jmx?qry=Hadoop:service=NameNode,name=FSNamesystemState",
-                                  CURLOPT_RETURNTRANSFER => true,
-                                  CURLOPT_HTTPAUTH => CURLAUTH_ANY,
-                                  CURLOPT_USERPWD => "$username:",
-                                  CURLOPT_SSL_VERIFYPEER => FALSE ));
-    $json_string = curl_exec($ch);
-    $info = curl_getinfo($ch);
-    if (intval($info['http_code']) == 401){
-      logout();
-      $json_string = curl_exec($ch);
-    }
-    $info = curl_getinfo($ch);
-    curl_close($ch);
-    $json_array = json_decode($json_string, true);
-    $percent = 0;
-    $object = $json_array['beans'][0];
-    $CapacityUsed = $object['CapacityUsed'];
-    $CapacityRemaining = $object['CapacityRemaining'];
-    if (count($object) == 0) {
-      echo "CRITICAL: Data inaccessible, Status code = ". $info['http_code'] ."\n";
-      exit(2);
-    }    
-    $CapacityTotal = $CapacityUsed + $CapacityRemaining;
-    if($CapacityTotal == 0) {
-      $percent = 0;
-    } else {
-      $percent = ($CapacityUsed/$CapacityTotal)*100;
-      break;
-    }
-  }
-  $out_msg = "DFSUsedGB:<" . round ($CapacityUsed/(1024*1024*1024),1) .
-             ">, DFSTotalGB:<" . round($CapacityTotal/(1024*1024*1024),1) . ">";
-
-  if ($percent >= $crit) {
-    echo "CRITICAL: " . $out_msg . "\n";
-    exit (2);
-  }
-  if ($percent >= $warn) {
-    echo "WARNING: " . $out_msg . "\n";
-    exit (1);
-  }
-  echo "OK: " . $out_msg . "\n";
-  exit(0);
-
-  /* print usage */
-  function usage () {
-    echo "Usage: $0 -h <host> -p port -w <warn%> -c <crit%> -k keytab path -r principal name -t kinit path -s security enabled -e ssl enabled\n";
-  }
-?>


Mime
View raw message