You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Jonathan Hurley <jh...@hortonworks.com> on 2014/10/22 23:28:18 UTC
Review Request 27055: Alerts: Convert YARN, MapR,
and ZK Nagios Alerts Into Ambari
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27055/
-----------------------------------------------------------
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 all 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] ------------------------------------------------------------------------
Thanks,
Jonathan Hurley
Re: Review Request 27055: Alerts: Convert YARN, MapR,
and ZK Nagios Alerts Into Ambari
Posted by Jonathan Hurley <jh...@hortonworks.com>.
> 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
>
>
Re: Review Request 27055: Alerts: Convert YARN, MapR,
and ZK Nagios Alerts Into Ambari
Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27055/#review57913
-----------------------------------------------------------
Ship it!
ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py
<https://reviews.apache.org/r/27055/#comment98814>
Don't kill me, but do you need a default http port AND a default https port?
ambari-agent/src/main/python/ambari_agent/alerts/script_alert.py
<https://reviews.apache.org/r/27055/#comment98817>
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.
- Nate Cole
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
>
>
Re: Review Request 27055: Alerts: Convert YARN, MapR,
and ZK Nagios Alerts Into Ambari
Posted by Jonathan Hurley <jh...@hortonworks.com>.
> On Oct. 22, 2014, 10:03 p.m., Alejandro Fernandez wrote:
> > ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py, line 237
> > <https://reviews.apache.org/r/27055/diff/1/?file=729091#file729091line237>
> >
> > Python doc is """
I was following convention of the entire agent codebase; but you're right. I adjusted all of the alerting code.
> On Oct. 22, 2014, 10:03 p.m., Alejandro Fernandez wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertDefinitionEntity.java, line 82
> > <https://reviews.apache.org/r/27055/diff/1/?file=729100#file729100line82>
> >
> > Why was this changed to EAGER?
The providers need the cluster entity; In tracing, the LAZY fetch type was only a hint to EclipseLink and it was doing it most of the time anyway. I'd rather have the cluster entity loaded when the parent entity loads to catch issues at "JPA time" and not "get method time".
- Jonathan
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27055/#review57955
-----------------------------------------------------------
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
>
>
Re: Review Request 27055: Alerts: Convert YARN, MapR,
and ZK Nagios Alerts Into Ambari
Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27055/#review57955
-----------------------------------------------------------
ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py
<https://reviews.apache.org/r/27055/#comment98865>
Python doc is """
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertDefinitionEntity.java
<https://reviews.apache.org/r/27055/#comment98866>
Why was this changed to EAGER?
- Alejandro Fernandez
On Oct. 22, 2014, 9: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, 9: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
>
>
Re: Review Request 27055: Alerts: Convert YARN, MapR,
and ZK Nagios Alerts Into Ambari
Posted by Tom Beerbower <tb...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27055/#review57935
-----------------------------------------------------------
Ship it!
Ship It!
- Tom Beerbower
On Oct. 22, 2014, 9: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, 9: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
>
>
Re: Review Request 27055: Alerts: Convert YARN, MapR,
and ZK Nagios Alerts Into Ambari
Posted by Jonathan Hurley <jh...@hortonworks.com>.
-----------------------------------------------------------
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.
Changes
-------
Forgot to post ambari-server tests
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 (updated)
-------
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
Re: Review Request 27055: Alerts: Convert YARN, MapR,
and ZK Nagios Alerts Into Ambari
Posted by Jonathan Hurley <jh...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27055/
-----------------------------------------------------------
(Updated Oct. 22, 2014, 5:28 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 (updated)
-------
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] ------------------------------------------------------------------------
Thanks,
Jonathan Hurley