ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmitriu...@apache.org
Subject [1/3] ambari git commit: AMBARI-10608. Alerts: nodemanager health is critical, response is not clear (dlysnichenko)
Date Mon, 20 Apr 2015 17:19:16 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.0.maint 7ba47fd23 -> 665eb1784
  refs/heads/trunk 646b1dde7 -> 7ad8c9acb


AMBARI-10608. Alerts: nodemanager health is critical, response is not clear (dlysnichenko)


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

Branch: refs/heads/trunk
Commit: 4e06a89f8625d0a03481028615a467470dfe54d9
Parents: 646b1dd
Author: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Authored: Mon Apr 20 20:16:36 2015 +0300
Committer: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Committed: Mon Apr 20 20:16:36 2015 +0300

----------------------------------------------------------------------
 .../YARN/2.1.0.2.0/package/alerts/alert_nodemanager_health.py    | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/4e06a89f/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/alerts/alert_nodemanager_health.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/alerts/alert_nodemanager_health.py
b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/alerts/alert_nodemanager_health.py
index 516d858..26bf2a0 100644
--- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/alerts/alert_nodemanager_health.py
+++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/alerts/alert_nodemanager_health.py
@@ -122,6 +122,7 @@ def execute(parameters=None, host_name=None):
   try:
     json_response = json.loads(url_response.read())
     node_healthy = json_response['nodeInfo']['nodeHealthy']
+    node_healthy_report = json_response['nodeInfo']['healthReport']
 
     # convert boolean to string
     node_healthy = str(node_healthy)
@@ -138,6 +139,9 @@ def execute(parameters=None, host_name=None):
   if node_healthy.lower() == 'true':
     result_code = RESULT_CODE_OK
     label = OK_MESSAGE
+  elif node_healthy.lower() == 'false':
+    result_code = RESULT_CODE_CRITICAL
+    label = node_healthy_report
   else:
     result_code = RESULT_CODE_CRITICAL
     label = CRITICAL_NODEMANAGER_STATUS_MESSAGE.format(node_healthy)


Mime
View raw message