You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@ambari.apache.org by yao lei <le...@163.com> on 2017/04/07 02:16:25 UTC

Review Request 58256: Support creating/editing alert dispatch targets for script-based alert dispatchers by web wizard instead of command line

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

Review request for Ambari, Alejandro Fernandez, Alexandr Antonenko, Andrii Tkach, Di Li, Jaimin Jetly, Zhe (Joe) Wang, Matt, Nate Cole, Richard Zang, and Yusaku Sako.


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


Repository: ambari


Description
-------

Ambari now support creating/editing three kinds of alert dispatch targets by web wizard, including EMAIL,SNMP,Custom SNMP.
If we want to create another kind of alert dispatch target ALERT_SCRIPT for script-based alert dispatcher,we have to execute a command manually like following:
{code}
POST api/v1/alert_targets
    
    {
      "AlertTarget": {
        "name": "syslogger",
        "description": "Syslog Target",
        "notification_type": "ALERT_SCRIPT",
        "global": true
      }
    }
{code}    
or
{code}
POST api/v1/alert_targets

    {
      "AlertTarget": {
        "name": "syslogger",
        "description": "Syslog Target",
        "notification_type": "ALERT_SCRIPT",
        "global": false,
        "groups":[1,3]
        "alert_states":["WARNING","CRITICAL","UNKNOWN"],
        "properties": {
          "ambari.dispatch-property.script": "com.mycompany.dispatch.syslog.script"
        }
      }
    }
{code}
More details, please see https://cwiki.apache.org/confluence/display/AMBARI/Creating+a+Script-based+Alert+Dispatcher+-+2.4.0
We should do this by web wizard rather than command line, which will lead to more convenience
We think it is really helpeful for us when using script-based alert dispatcher.


Diffs
-----

  ambari-web/app/controllers/main/alerts/manage_alert_notifications_controller.js 73c19c6 
  ambari-web/app/messages.js a2edf06 
  ambari-web/app/templates/main/alerts/create_alert_notification.hbs 5b40bca 
  ambari-web/test/controllers/main/alerts/manage_alert_notifications_controller_test.js 31da561 


Diff: https://reviews.apache.org/r/58256/diff/1/


Testing
-------

mvn test
20676 passing (34s)
128 pending


Thanks,

yao lei


Re: Review Request 58256: Support creating/editing alert dispatch targets for script-based alert dispatchers by web wizard instead of command line

Posted by yao lei <le...@163.com>.

> On \u56db\u6708 11, 2017, 5:37 p.m., Alejandro Fernandez wrote:
> > ambari-web/app/controllers/main/alerts/manage_alert_notifications_controller.js
> > Line 170 (original), 175 (patched)
> > <https://reviews.apache.org/r/58256/diff/1/?file=1686353#file1686353line175>
> >
> >     Insert a space after the comma

Thanks for your review


- yao


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


On \u56db\u6708 12, 2017, 1 a.m., yao lei wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58256/
> -----------------------------------------------------------
> 
> (Updated \u56db\u6708 12, 2017, 1 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Alexandr Antonenko, Andrii Tkach, Di Li, Jaimin Jetly, Zhe (Joe) Wang, Matt, Nate Cole, Richard Zang, and Yusaku Sako.
> 
> 
> Bugs: AMBARI-18423
>     https://issues.apache.org/jira/browse/AMBARI-18423
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Ambari now support creating/editing three kinds of alert dispatch targets by web wizard, including EMAIL,SNMP,Custom SNMP.
> If we want to create another kind of alert dispatch target ALERT_SCRIPT for script-based alert dispatcher,we have to execute a command manually like following:
> {code}
> POST api/v1/alert_targets
>     
>     {
>       "AlertTarget": {
>         "name": "syslogger",
>         "description": "Syslog Target",
>         "notification_type": "ALERT_SCRIPT",
>         "global": true
>       }
>     }
> {code}    
> or
> {code}
> POST api/v1/alert_targets
> 
>     {
>       "AlertTarget": {
>         "name": "syslogger",
>         "description": "Syslog Target",
>         "notification_type": "ALERT_SCRIPT",
>         "global": false,
>         "groups":[1,3]
>         "alert_states":["WARNING","CRITICAL","UNKNOWN"],
>         "properties": {
>           "ambari.dispatch-property.script": "com.mycompany.dispatch.syslog.script"
>         }
>       }
>     }
> {code}
> More details, please see https://cwiki.apache.org/confluence/display/AMBARI/Creating+a+Script-based+Alert+Dispatcher+-+2.4.0
> We should do this by web wizard rather than command line, which will lead to more convenience
> We think it is really helpeful for us when using script-based alert dispatcher.
> 
> 
> Diffs
> -----
> 
>   ambari-web/app/controllers/main/alerts/manage_alert_notifications_controller.js 73c19c6 
>   ambari-web/app/messages.js a2edf06 
>   ambari-web/app/templates/main/alerts/create_alert_notification.hbs 5b40bca 
>   ambari-web/test/controllers/main/alerts/manage_alert_notifications_controller_test.js 31da561 
> 
> 
> Diff: https://reviews.apache.org/r/58256/diff/2/
> 
> 
> Testing
> -------
> 
> mvn test
> 20676 passing (34s)
> 128 pending
> 
> 
> Thanks,
> 
> yao lei
> 
>


Re: Review Request 58256: Support creating/editing alert dispatch targets for script-based alert dispatchers by web wizard instead of command line

Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58256/#review171586
-----------------------------------------------------------


Fix it, then Ship it!





ambari-web/app/controllers/main/alerts/manage_alert_notifications_controller.js
Line 170 (original), 175 (patched)
<https://reviews.apache.org/r/58256/#comment244527>

    Insert a space after the comma


- Alejandro Fernandez


On April 7, 2017, 2:16 a.m., yao lei wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58256/
> -----------------------------------------------------------
> 
> (Updated April 7, 2017, 2:16 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Alexandr Antonenko, Andrii Tkach, Di Li, Jaimin Jetly, Zhe (Joe) Wang, Matt, Nate Cole, Richard Zang, and Yusaku Sako.
> 
> 
> Bugs: AMBARI-18423
>     https://issues.apache.org/jira/browse/AMBARI-18423
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Ambari now support creating/editing three kinds of alert dispatch targets by web wizard, including EMAIL,SNMP,Custom SNMP.
> If we want to create another kind of alert dispatch target ALERT_SCRIPT for script-based alert dispatcher,we have to execute a command manually like following:
> {code}
> POST api/v1/alert_targets
>     
>     {
>       "AlertTarget": {
>         "name": "syslogger",
>         "description": "Syslog Target",
>         "notification_type": "ALERT_SCRIPT",
>         "global": true
>       }
>     }
> {code}    
> or
> {code}
> POST api/v1/alert_targets
> 
>     {
>       "AlertTarget": {
>         "name": "syslogger",
>         "description": "Syslog Target",
>         "notification_type": "ALERT_SCRIPT",
>         "global": false,
>         "groups":[1,3]
>         "alert_states":["WARNING","CRITICAL","UNKNOWN"],
>         "properties": {
>           "ambari.dispatch-property.script": "com.mycompany.dispatch.syslog.script"
>         }
>       }
>     }
> {code}
> More details, please see https://cwiki.apache.org/confluence/display/AMBARI/Creating+a+Script-based+Alert+Dispatcher+-+2.4.0
> We should do this by web wizard rather than command line, which will lead to more convenience
> We think it is really helpeful for us when using script-based alert dispatcher.
> 
> 
> Diffs
> -----
> 
>   ambari-web/app/controllers/main/alerts/manage_alert_notifications_controller.js 73c19c6 
>   ambari-web/app/messages.js a2edf06 
>   ambari-web/app/templates/main/alerts/create_alert_notification.hbs 5b40bca 
>   ambari-web/test/controllers/main/alerts/manage_alert_notifications_controller_test.js 31da561 
> 
> 
> Diff: https://reviews.apache.org/r/58256/diff/1/
> 
> 
> Testing
> -------
> 
> mvn test
> 20676 passing (34s)
> 128 pending
> 
> 
> Thanks,
> 
> yao lei
> 
>


Re: Review Request 58256: Support creating/editing alert dispatch targets for script-based alert dispatchers by web wizard instead of command line

Posted by yao lei <le...@163.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58256/
-----------------------------------------------------------

(Updated \u56db\u6708 12, 2017, 1 a.m.)


Review request for Ambari, Alejandro Fernandez, Alexandr Antonenko, Andrii Tkach, Di Li, Jaimin Jetly, Zhe (Joe) Wang, Matt, Nate Cole, Richard Zang, and Yusaku Sako.


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


Repository: ambari


Description
-------

Ambari now support creating/editing three kinds of alert dispatch targets by web wizard, including EMAIL,SNMP,Custom SNMP.
If we want to create another kind of alert dispatch target ALERT_SCRIPT for script-based alert dispatcher,we have to execute a command manually like following:
{code}
POST api/v1/alert_targets
    
    {
      "AlertTarget": {
        "name": "syslogger",
        "description": "Syslog Target",
        "notification_type": "ALERT_SCRIPT",
        "global": true
      }
    }
{code}    
or
{code}
POST api/v1/alert_targets

    {
      "AlertTarget": {
        "name": "syslogger",
        "description": "Syslog Target",
        "notification_type": "ALERT_SCRIPT",
        "global": false,
        "groups":[1,3]
        "alert_states":["WARNING","CRITICAL","UNKNOWN"],
        "properties": {
          "ambari.dispatch-property.script": "com.mycompany.dispatch.syslog.script"
        }
      }
    }
{code}
More details, please see https://cwiki.apache.org/confluence/display/AMBARI/Creating+a+Script-based+Alert+Dispatcher+-+2.4.0
We should do this by web wizard rather than command line, which will lead to more convenience
We think it is really helpeful for us when using script-based alert dispatcher.


Diffs (updated)
-----

  ambari-web/app/controllers/main/alerts/manage_alert_notifications_controller.js 73c19c6 
  ambari-web/app/messages.js a2edf06 
  ambari-web/app/templates/main/alerts/create_alert_notification.hbs 5b40bca 
  ambari-web/test/controllers/main/alerts/manage_alert_notifications_controller_test.js 31da561 


Diff: https://reviews.apache.org/r/58256/diff/2/

Changes: https://reviews.apache.org/r/58256/diff/1-2/


Testing
-------

mvn test
20676 passing (34s)
128 pending


Thanks,

yao lei


Re: Review Request 58256: Support creating/editing alert dispatch targets for script-based alert dispatchers by web wizard instead of command line

Posted by yao lei <le...@163.com>.

> On \u56db\u6708 8, 2017, 3:06 a.m., Richard Zang wrote:
> > Ship It!

Thanks for your review.


- yao


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


On \u56db\u6708 7, 2017, 2:16 a.m., yao lei wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58256/
> -----------------------------------------------------------
> 
> (Updated \u56db\u6708 7, 2017, 2:16 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Alexandr Antonenko, Andrii Tkach, Di Li, Jaimin Jetly, Zhe (Joe) Wang, Matt, Nate Cole, Richard Zang, and Yusaku Sako.
> 
> 
> Bugs: AMBARI-18423
>     https://issues.apache.org/jira/browse/AMBARI-18423
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Ambari now support creating/editing three kinds of alert dispatch targets by web wizard, including EMAIL,SNMP,Custom SNMP.
> If we want to create another kind of alert dispatch target ALERT_SCRIPT for script-based alert dispatcher,we have to execute a command manually like following:
> {code}
> POST api/v1/alert_targets
>     
>     {
>       "AlertTarget": {
>         "name": "syslogger",
>         "description": "Syslog Target",
>         "notification_type": "ALERT_SCRIPT",
>         "global": true
>       }
>     }
> {code}    
> or
> {code}
> POST api/v1/alert_targets
> 
>     {
>       "AlertTarget": {
>         "name": "syslogger",
>         "description": "Syslog Target",
>         "notification_type": "ALERT_SCRIPT",
>         "global": false,
>         "groups":[1,3]
>         "alert_states":["WARNING","CRITICAL","UNKNOWN"],
>         "properties": {
>           "ambari.dispatch-property.script": "com.mycompany.dispatch.syslog.script"
>         }
>       }
>     }
> {code}
> More details, please see https://cwiki.apache.org/confluence/display/AMBARI/Creating+a+Script-based+Alert+Dispatcher+-+2.4.0
> We should do this by web wizard rather than command line, which will lead to more convenience
> We think it is really helpeful for us when using script-based alert dispatcher.
> 
> 
> Diffs
> -----
> 
>   ambari-web/app/controllers/main/alerts/manage_alert_notifications_controller.js 73c19c6 
>   ambari-web/app/messages.js a2edf06 
>   ambari-web/app/templates/main/alerts/create_alert_notification.hbs 5b40bca 
>   ambari-web/test/controllers/main/alerts/manage_alert_notifications_controller_test.js 31da561 
> 
> 
> Diff: https://reviews.apache.org/r/58256/diff/1/
> 
> 
> Testing
> -------
> 
> mvn test
> 20676 passing (34s)
> 128 pending
> 
> 
> Thanks,
> 
> yao lei
> 
>


Re: Review Request 58256: Support creating/editing alert dispatch targets for script-based alert dispatchers by web wizard instead of command line

Posted by Richard Zang <rz...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58256/#review171399
-----------------------------------------------------------


Ship it!




Ship It!

- Richard Zang


On April 7, 2017, 2:16 a.m., yao lei wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58256/
> -----------------------------------------------------------
> 
> (Updated April 7, 2017, 2:16 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Alexandr Antonenko, Andrii Tkach, Di Li, Jaimin Jetly, Zhe (Joe) Wang, Matt, Nate Cole, Richard Zang, and Yusaku Sako.
> 
> 
> Bugs: AMBARI-18423
>     https://issues.apache.org/jira/browse/AMBARI-18423
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Ambari now support creating/editing three kinds of alert dispatch targets by web wizard, including EMAIL,SNMP,Custom SNMP.
> If we want to create another kind of alert dispatch target ALERT_SCRIPT for script-based alert dispatcher,we have to execute a command manually like following:
> {code}
> POST api/v1/alert_targets
>     
>     {
>       "AlertTarget": {
>         "name": "syslogger",
>         "description": "Syslog Target",
>         "notification_type": "ALERT_SCRIPT",
>         "global": true
>       }
>     }
> {code}    
> or
> {code}
> POST api/v1/alert_targets
> 
>     {
>       "AlertTarget": {
>         "name": "syslogger",
>         "description": "Syslog Target",
>         "notification_type": "ALERT_SCRIPT",
>         "global": false,
>         "groups":[1,3]
>         "alert_states":["WARNING","CRITICAL","UNKNOWN"],
>         "properties": {
>           "ambari.dispatch-property.script": "com.mycompany.dispatch.syslog.script"
>         }
>       }
>     }
> {code}
> More details, please see https://cwiki.apache.org/confluence/display/AMBARI/Creating+a+Script-based+Alert+Dispatcher+-+2.4.0
> We should do this by web wizard rather than command line, which will lead to more convenience
> We think it is really helpeful for us when using script-based alert dispatcher.
> 
> 
> Diffs
> -----
> 
>   ambari-web/app/controllers/main/alerts/manage_alert_notifications_controller.js 73c19c6 
>   ambari-web/app/messages.js a2edf06 
>   ambari-web/app/templates/main/alerts/create_alert_notification.hbs 5b40bca 
>   ambari-web/test/controllers/main/alerts/manage_alert_notifications_controller_test.js 31da561 
> 
> 
> Diff: https://reviews.apache.org/r/58256/diff/1/
> 
> 
> Testing
> -------
> 
> mvn test
> 20676 passing (34s)
> 128 pending
> 
> 
> Thanks,
> 
> yao lei
> 
>