You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Andrew Onischuk <ao...@hortonworks.com> on 2014/06/26 15:11:07 UTC

Review Request 23011: Get rid of using macros as enviroment variables for nagios

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

Review request for Ambari and Dmitro Lisnichenko.


Bugs: AMBARI-6286
    https://issues.apache.org/jira/browse/AMBARI-6286


Repository: ambari


Description
-------


    Macros are normally made available to check, notification, event handler, etc. commands as environment variables. 
    This can be a problem in a large Nagios installation, as it consumes some additional memory and (more importantly) more CPU. 
    If your scripts don't need to access the macros as environment variables (e.g. you pass all necessary macros on the command line), you don't need this feature. 
    You can prevent macros from being made available as environment variables by using the enable_environment_macros option.
    

we have 3 enviroment macros used in check_wrapper.sh, and some in other
scripts, we can excplicetely set them to env by editting hadoop-commands.cfg

Benefit: we can stop using expensive enable_environment_macros, and have
alerts working on large cluster.


Diffs
-----

  ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/scripts/params.py ac955cd 
  ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/templates/hadoop-commands.cfg.j2 fe7495f 
  ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/templates/nagios.cfg.j2 05d94b5 
  ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/scripts/params.py 8fcdd14 
  ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/templates/hadoop-commands.cfg.j2 fa38a06 
  ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/templates/nagios.cfg.j2 528ddc2 

Diff: https://reviews.apache.org/r/23011/diff/


Testing
-------

mvn clean test


Thanks,

Andrew Onischuk


Re: Review Request 23011: Get rid of using macros as enviroment variables for nagios

Posted by Dmitro Lisnichenko <dl...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23011/#review46739
-----------------------------------------------------------

Ship it!


Ship It!

- Dmitro Lisnichenko


On June 26, 2014, 1:11 p.m., Andrew Onischuk wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23011/
> -----------------------------------------------------------
> 
> (Updated June 26, 2014, 1:11 p.m.)
> 
> 
> Review request for Ambari and Dmitro Lisnichenko.
> 
> 
> Bugs: AMBARI-6286
>     https://issues.apache.org/jira/browse/AMBARI-6286
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> 
>     Macros are normally made available to check, notification, event handler, etc. commands as environment variables. 
>     This can be a problem in a large Nagios installation, as it consumes some additional memory and (more importantly) more CPU. 
>     If your scripts don't need to access the macros as environment variables (e.g. you pass all necessary macros on the command line), you don't need this feature. 
>     You can prevent macros from being made available as environment variables by using the enable_environment_macros option.
>     
> 
> we have 3 enviroment macros used in check_wrapper.sh, and some in other
> scripts, we can excplicetely set them to env by editting hadoop-commands.cfg
> 
> Benefit: we can stop using expensive enable_environment_macros, and have
> alerts working on large cluster.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/scripts/params.py ac955cd 
>   ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/templates/hadoop-commands.cfg.j2 fe7495f 
>   ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/templates/nagios.cfg.j2 05d94b5 
>   ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/scripts/params.py 8fcdd14 
>   ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/templates/hadoop-commands.cfg.j2 fa38a06 
>   ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/templates/nagios.cfg.j2 528ddc2 
> 
> Diff: https://reviews.apache.org/r/23011/diff/
> 
> 
> Testing
> -------
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Andrew Onischuk
> 
>