-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62744/
-----------------------------------------------------------
(Updated Oct. 12, 2017, 11:39 a.m.)
Review request for Ambari, Jonathan Hurley, Nate Cole, and Sebastian Toader.
Changes
-------
configurable thread pool size
Bugs: AMBARI-22115
https://issues.apache.org/jira/browse/AMBARI-22115
Repository: ambari
Description
-------
This is part of AMBARI-22115. We need to define alerts on JMX metrics which are
pulled from a cluster that is not necessarily managed by Ambari. Therefore
alerts can't run on ambari-agent host. I introduced a new SERVER type alert
called JmxServerSideAlert that can pull the jmx metrics from a arbitrary url.
The url comes from the alerts.json and it may contain placeholders like
${hdfs-site/dfs.namenode.http-address}. This works similarly than the Python
class MetricAlert.
Diffs (updated)
-----
ambari-server/docs/configuration/index.md 9dbe9c4
ambari-server/src/main/java/org/apache/ambari/server/alerts/JmxServerSideAlert.java
PRE-CREATION
ambari-server/src/main/java/org/apache/ambari/server/alerts/Threshold.java
PRE-CREATION
ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
1b4d741
ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
968e9b6
ambari-server/src/main/java/org/apache/ambari/server/controller/jmx/JMXMetricHolder.java
81d72fb
ambari-server/src/main/java/org/apache/ambari/server/state/Alert.java 5d2ecc6
ambari-server/src/main/java/org/apache/ambari/server/state/alert/AlertUri.java
93801d5
ambari-server/src/main/java/org/apache/ambari/server/state/alert/MetricSource.java
11eee05
ambari-server/src/main/java/org/apache/ambari/server/state/alert/Reporting.java
4aeba45
ambari-server/src/main/java/org/apache/ambari/server/state/alert/ServerSource.java
c58867a
ambari-server/src/main/java/org/apache/ambari/server/state/services/AmbariServerAlertService.java
d3237a9
ambari-server/src/test/java/org/apache/ambari/server/alerts/ThresholdTest.java
PRE-CREATION
ambari-server/src/test/java/org/apache/ambari/server/controller/jmx/JMXMetricHolderTest.java
PRE-CREATION
ambari-server/src/test/java/org/apache/ambari/server/state/alert/AlertUriTest.java
PRE-CREATION
Diff: https://reviews.apache.org/r/62744/diff/5/
Changes: https://reviews.apache.org/r/62744/diff/4-5/
Testing
-------
Used the following alerts.json to test it
{
"ONEFS":{
"service": [
{
"name": "onefs_namenode_cpu",
"label": "OneFS NameNode Host CPU Utilization",
"description": "This host-level alert is triggered if CPU utilization
of the NameNode exceeds certain warning and critical thresholds. It checks the
NameNode JMX Servlet for the SystemCPULoad property. The threshold values are
in percent.",
"interval": 1,
"help_url":
"https://cwiki.apache.org/confluence/display/AMBARI/Ambari+Alerts#AmbariAlerts-ambari_agent_heartbeat",
"scope": "HOST",
"enabled": true,
"source": {
"type": "SERVER",
"class": "org.apache.ambari.server.alerts.JmxServerSideAlert",
"uri": {
"http": "${hdfs-site/dfs.namenode.http-address}",
"https": "${hdfs-site/dfs.namenode.https-address}",
"https_property": "${hdfs-site/dfs.http.policy}",
"https_property_value": "HTTPS_ONLY",
"connection_timeout": 5.0
},
"reporting": {
"ok": {
"text": "{1} CPU, load {0,number,percent}"
},
"warning": {
"text": "{1} CPU, load {0,number,percent}",
"value": 5
},
"critical": {
"text": "{1} CPU, load {0,number,percent}",
"value": 20
},
"units" : "%",
"type": "PERCENT"
},
"jmx": {
"property_list": [
"java.lang:type=OperatingSystem/SystemCpuLoad",
"java.lang:type=OperatingSystem/AvailableProcessors"
]
}
}
}
]
}
}
1,1 Top
Thanks,
Attila Magyar