ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Hurley" <jhur...@hortonworks.com>
Subject Re: Review Request 27055: Alerts: Convert YARN, MapR, and ZK Nagios Alerts Into Ambari
Date Wed, 22 Oct 2014 23:06:05 GMT


> On Oct. 22, 2014, 6:01 p.m., Nate Cole wrote:
> > ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py, lines 204-206
> > <https://reviews.apache.org/r/27055/diff/1/?file=729092#file729092line204>
> >
> >     Don't kill me, but do you need a default http port AND a default https port?

Technically, yes, but in reality, probably not. This is to cover the case where none of URI
properties you specified actually exist; it's a fallback. When you enable https for YARN,
for example, you now have to add the property referenced in the URI structure.


> On Oct. 22, 2014, 6:01 p.m., Nate Cole wrote:
> > ambari-agent/src/main/python/ambari_agent/alerts/script_alert.py, lines 51-54
> > <https://reviews.apache.org/r/27055/diff/1/?file=729094#file729094line51>
> >
> >     Not sure how python works in this case, but self._load_source() might be expensive?
 Once per minute could be expensive when reloaded that many times.  Might have to save the
imp.load_source result.

In the constructor shouldn't be a problem since that's only done once when the Callable is
created. But I can see your point about when it's called again later on in _collect ... I
can add some time stats when I implement the first actual script alert.


- Jonathan


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


On Oct. 22, 2014, 5:53 p.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27055/
> -----------------------------------------------------------
> 
> (Updated Oct. 22, 2014, 5:53 p.m.)
> 
> 
> Review request for Ambari, Nate Cole and Tom Beerbower.
> 
> 
> Bugs: AMBARI-7911
>     https://issues.apache.org/jira/browse/AMBARI-7911
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Added Ambari-style alerts for MapR, YARN, and ZooKeeper based off of those in Nagios.
Some notable points:
> 
> - Script Alert was changed so that it can now accept parameters. This will be used in
the next commit which will have the need for a parameterized script.
> - The structure of the alerts.json was changed so that each JSON object is mapped to
a service. This was the cleanest way to allow a single alerts.json to represent 2+ services
(like YARN and MapR). We could also have put a pointer to the "correct" alerts.json in the
metainfo.xml, but since metrics doesn't do that, it felt like overkill.
> - A "default_port" was added to the URI structure for WEB and METRIC to cover the case
where all of the URI properties are not found. This is actually a case we have today with
YARN's NodeManager as the property isn't specified in the defauly yarn-site.xml, but is a
legitimate property.
> 
> 
> Diffs
> -----
> 
>   ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py b90952b 
>   ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py 79db3ce 
>   ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py 1d34410 
>   ambari-agent/src/main/python/ambari_agent/alerts/script_alert.py 93af917 
>   ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py af8100d 
>   ambari-agent/src/test/python/ambari_agent/TestAlerts.py b8d7b25 
>   ambari-agent/src/test/python/ambari_agent/dummy_files/test_script.py 211087c 
>   ambari-common/src/main/python/resource_management/libraries/functions/get_port_from_url.py
70bd2d7 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertHistoryResourceProvider.java
87af422 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertDefinitionEntity.java
ae03ef7 
>   ambari-server/src/main/java/org/apache/ambari/server/state/alert/AlertDefinitionFactory.java
e3fe3c7 
>   ambari-server/src/main/java/org/apache/ambari/server/state/alert/AlertUri.java ec66021

>   ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/alerts.json 2e21aad

>   ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/alerts.json 9dbc3d0

>   ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/alerts.json PRE-CREATION

>   ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/alerts.json PRE-CREATION

>   ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java
b75a469 
>   ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HDFS/alerts.json c8f28c4

> 
> Diff: https://reviews.apache.org/r/27055/diff/
> 
> 
> Testing
> -------
> 
> Installed cluster, loaded all alert definitions and watched them run until all reported
OK. Updated tests.
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 5.610 s
> [INFO] Finished at: 2014-10-22T17:23:40-04:00
> [INFO] Final Memory: 8M/81M
> [INFO] ------------------------------------------------------------------------
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 23:52 min
> [INFO] Finished at: 2014-10-22T17:47:15-04:00
> [INFO] Final Memory: 32M/245M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message