-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56020/
-----------------------------------------------------------
(Updated Фев. 2, 2017, 4:03 п.п.)
Review request for Ambari, Aravindan Vijayan, Sid Wagle, and Vitalyi Brodetskyi.
Bugs: AMBARI-19746
https://issues.apache.org/jira/browse/AMBARI-19746
Repository: ambari
Description
-------
Build used : ambari-2.5.0.0-724
Test is updating the alert definition minimumValue to "0.0".
Payload used to update the minimumValue
/{
"AlertDefinition": {
"cluster_name": "cl1",
"id": 81,
"name": "increase_nn_heap_usage_daily",
"label": "NameNode Heap Usage (Daily)",
"component_name": "NAMENODE",
"description": "This service-level alert is triggered if the
NameNode heap usage deviation has grown beyond the specified threshold within a
day period.",
"enabled": true,
"ignore_host": false,
"interval": 1,
"scope": "ANY",
"service_name": "HDFS",
"source": {
"parameters": [{
"name": "mergeHaMetrics",
"display_name": "Whether active and stanby
NameNodes metrics should be merged",
"value": "false",
"description": "Whether active and stanby
NameNodes metrics should be merged.",
"type": "STRING",
"visibility": "HIDDEN"
}, {
"name": "interval",
"display_name": "Time interval in minutes",
"value": "1440.0",
"description": "Time interval in minutes.",
"type": "NUMERIC",
"visibility": "HIDDEN"
}, {
"name": "appId",
"display_name": "AMS application id",
"value": "NAMENODE",
"description": "The application id used to
retrieve the metric.",
"type": "STRING",
"visibility": "HIDDEN"
}, {
"name": "metricName",
"display_name": "Metric Name",
"value": "jvm.JvmMetrics.MemHeapUsedM",
"description": "The metric to monitor.",
"type": "STRING",
"visibility": "HIDDEN"
}, {
"name": "metric.deviation.warning.threshold",
"display_name": "Growth Rate",
"value": "20.0",
"description": "The percentage of NameNode heap
usage growth.",
"type": "PERCENT"
}, {
"name": "metric.deviation.critical.threshold",
"display_name": "Growth Rate",
"value": "50.0",
"description": "The percentage of NameNode heap
usage growth.",
"type": "PERCENT"
}, {
"name": "metric.units",
"display_name": "Metric Units",
"value": "MB",
"description": "The units that the metric data
points are reported in.",
"type": "STRING",
"visibility": "HIDDEN"
}, {
"name": "minimumValue",
"display_name": "Minimum Heap",
"value": "0.0",
"description": "The minimum heap increase in a
day.",
"type": "NUMERIC"
}],
"path":
"HDFS/2.1.0.2.0/package/alerts/alert_metrics_deviation.py",
"type": "SCRIPT"
}
}
}
Alert response :
03:14:20 AM 01-25-2017 AmbariItems FINE - API call response:{
"href" : "http://172.27.9.139:8080/api/v1/clusters/cl1/alerts/119",
"Alert" : {
"cluster_name" : "cl1",
"component_name" : "NAMENODE",
"definition_id" : 81,
"definition_name" : "increase_nn_heap_usage_daily",
"firmness" : "HARD",
"host_name" : "ctr-e126-1485243696039-2656-01-000006.hwx.site",
"id" : 119,
"instance" : null,
"label" : "NameNode Heap Usage (Daily)",
"latest_timestamp" : 1485314039820,
"maintenance_state" : "OFF",
"occurrences" : 13,
"original_timestamp" : 1485313319818,
"repeat_tolerance" : 1,
"repeat_tolerance_remaining" : 0,
"scope" : "ANY",
"service_name" : "HDFS",
"state" : "UNKNOWN",
"text" : "argument of type 'NoneType' is not iterable"
}
}
Diffs (updated)
-----
ambari-agent/src/main/python/ambari_agent/ActionQueue.py 8514a88
ambari-common/src/main/python/ambari_commons/ambari_metrics_helper.py 7841bde
Diff: https://reviews.apache.org/r/56020/diff/
Testing
-------
Unit tests passed
Thanks,
Dmytro Sen