ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From swa...@apache.org
Subject ambari git commit: AMBARI-16695. HDFS Alerts: add minimum values to AMS alerts. (swagle)
Date Tue, 17 May 2016 23:46:51 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 00320d9ac -> 656482531


AMBARI-16695. HDFS Alerts: add minimum values to AMS alerts. (swagle)


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

Branch: refs/heads/trunk
Commit: 6564825312f59cfc6566bb1307e459b04ae69679
Parents: 00320d9
Author: Siddharth Wagle <swagle@hortonworks.com>
Authored: Tue May 17 16:46:48 2016 -0700
Committer: Siddharth Wagle <swagle@hortonworks.com>
Committed: Tue May 17 16:46:48 2016 -0700

----------------------------------------------------------------------
 .../common-services/HDFS/2.1.0.2.0/alerts.json  | 32 ++++++++++++++++++++
 .../package/alerts/alert_metrics_deviation.py   |  8 ++++-
 2 files changed, 39 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/65648253/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json
index aedbdfe..9a5e86a 100644
--- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json
+++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json
@@ -933,6 +933,14 @@
               "value": "MB",
               "description": "The units that the metric data points are reported in.",
               "visibility": "HIDDEN"
+            },
+            {
+              "name": "minimumValue",
+              "display_name": "Minimum Heap increase in a day.",
+              "value": 100,
+              "type": "NUMERIC",
+              "units": "MB",
+              "description": "The minimum heap increase in a day."
             }
           ]
         }
@@ -1325,6 +1333,14 @@
               "value": "B",
               "description": "The units that the metric data points are reported in.",
               "visibility": "HIDDEN"
+            },
+            {
+              "name": "minimumValue",
+              "display_name": "Minimum Capacity usage increase in a day.",
+              "value": 100,
+              "type": "NUMERIC",
+              "units": "MB",
+              "description": "The minimum capacity increase in a day."
             }
           ]
         }
@@ -1397,6 +1413,14 @@
               "value": "MB",
               "description": "The units that the metric data points are reported in.",
               "visibility": "HIDDEN"
+            },
+            {
+              "name": "minimumValue",
+              "display_name": "Minimum Heap increase in a week.",
+              "value": 1000,
+              "type": "NUMERIC",
+              "units": "MB",
+              "description": "The minimum heap increase in a week."
             }
           ]
         }
@@ -1469,6 +1493,14 @@
               "value": "B",
               "description": "The units that the metric data points are reported in.",
               "visibility": "HIDDEN"
+            },
+            {
+              "name": "minimumValue",
+              "display_name": "Minimum Capacity increase in a week.",
+              "value": 1000,
+              "type": "NUMERIC",
+              "units": "MB",
+              "description": "The minimum capacity increase in a week."
             }
           ]
         }

http://git-wip-us.apache.org/repos/asf/ambari/blob/65648253/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/alerts/alert_metrics_deviation.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/alerts/alert_metrics_deviation.py
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/alerts/alert_metrics_deviation.py
index 3296493..0dbbfb9 100644
--- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/alerts/alert_metrics_deviation.py
+++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/alerts/alert_metrics_deviation.py
@@ -328,9 +328,15 @@ def execute(configurations={}, parameters={}, host_name=None):
     return (RESULT_STATE_SKIPPED, ["There are not enough data points to calculate the standard
deviation ({0} sampled)".format(
       number_of_data_points)])
 
+  minimum_value_multiplier = 1
+  if 'storage_capacity_usage' in metric_name:
+    minimum_value_multiplier = 1024 * 1024  # MB to bytes
+  elif 'service_rpc' in metric_name or 'client_rpc' in metric_name:
+    minimum_value_multiplier = 1000  # seconds to millis
+
   if minimum_value_threshold:
     # Filter out points below min threshold
-    metrics = [metric for metric in metrics if metric > (minimum_value_threshold * 1000)]
+    metrics = [metric for metric in metrics if metric > (minimum_value_threshold * minimum_value_multiplier)]
     if len(metrics) < 2:
       return (RESULT_STATE_OK, ['There were no data points above the minimum threshold of
{0} seconds'.format(minimum_value_threshold)])
 


Mime
View raw message