> On Апрель 8, 2016, 12:18 п.п., Jonathan Hurley wrote:
> > ambari-agent/src/main/python/ambari_agent/alerts/ams_alert.py, lines 66-70
> > <https://reviews.apache.org/r/45873/diff/1/?file=1330089#file1330089line66>
> >
> >     Since this is contacting AMS, is there a better place to get this 
> > information from, like the AMS configurations?
> 
> Sid Wagle wrote:
>     +1 Ambari server already has the cached location and port for 
> collector(s), is there way to make that more of a first class citizen?
> 
> Dmytro Sen wrote:
>     I'll fix this.

After reviewing  and debugging the code, I see that there is no a better place 
to get AMS info from.

Ambari server java code and metrics monitor python code cache the AMS collector 
info, but not Ambari agent. I believe, there is no need to implement ams info 
delivery mechanism from ambari server cache. Using configs for getting such 
info is robust, it's been used by metric alert for few releases, it also 
correctly handles the case of changing ams collector port and moving collector 
component between nodes.

Please ship the updated patch if you agree to keep the current implementation


- Dmytro


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45873/#review127769
-----------------------------------------------------------


On Апрель 11, 2016, 3:18 п.п., Dmytro Sen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45873/
> -----------------------------------------------------------
> 
> (Updated Апрель 11, 2016, 3:18 п.п.)
> 
> 
> Review request for Ambari, Aravindan Vijayan, Jonathan Hurley, and Sid Wagle.
> 
> 
> Bugs: AMBARI-15766
>     https://issues.apache.org/jira/browse/AMBARI-15766
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> There are a few requirements around creating alerts based on the time-series 
> data stored in AMS. They fall in the the general category of:
> - identify a metrics (name of the metrics, app name)
> - identify a window (e.g. last 10 minutes, last 1 day)
> - get the data points
> - add them up, or
> - compute average, or
> - compute standard deviations, or
> - ...
> - compare the value to a threshold
> - emit an alert if needed (WARN, CRITICAL, etc)
> 
> We should also allow for alerts based on multiple metrics but there is no ask 
> for such a capability. Just something to keep in mind while designing.
> It seems general enough that we should define an alert type that can be 
> instantiated by services to define specific alerts. Users can add additional 
> alerts if they so choose.
> 
> 
> Diffs
> -----
> 
>   ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py b84832d 
>   ambari-agent/src/main/python/ambari_agent/alerts/ams_alert.py PRE-CREATION 
>   ambari-agent/src/main/python/ambari_agent/alerts/metric_alert.py d177bd4 
>   ambari-agent/src/test/python/ambari_agent/TestAlertSchedulerHandler.py 
> f4e7ba1 
>   ambari-agent/src/test/python/ambari_agent/TestAlerts.py 9caee8a 
>   ambari-agent/src/test/python/ambari_agent/TestAmsAlert.py PRE-CREATION 
>   ambari-common/src/main/python/ambari_commons/aggregate_functions.py 
> PRE-CREATION 
>   ambari-common/src/main/python/ambari_commons/firewall.py 64d396b 
>   ambari-common/src/main/python/ambari_commons/urllib_handlers.py aa2e3f6 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/alert/AlertDefinitionFactory.java
>  1676b53 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/alert/AmsSource.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/alert/MetricSource.java
>  2ff438d 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/alert/SourceType.java
>  357baf9 
>   ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json 
> 3612de2 
>   
> ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/alerts/alert_metrics_deviation.py
>  038592f 
>   
> ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java
>  5dc7f3b 
> 
> Diff: https://reviews.apache.org/r/45873/diff/
> 
> 
> Testing
> -------
> 
> Unit tests passed
> 
> 
> Thanks,
> 
> Dmytro Sen
> 
>

Reply via email to