incubator-cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anshul Gangwar" <anshul.gang...@citrix.com>
Subject Re: Review Request: Feature SNMP Alerts support in CloudStack
Date Wed, 06 Mar 2013 11:02:25 GMT


> On March 6, 2013, 5:57 a.m., Rajesh Battala wrote:
> > plugins/alert-handlers/snmp-alerts/src/org/apache/cloudstack/alert/snmp/SnmpConstants2.java,
line 2
> > <https://reviews.apache.org/r/9587/diff/1/?file=261699#file261699line2>
> >
> >     As SnmpConstants class is already available from Library, you can rename this
to CS Specific Snmp Constants instead of using number

will rename it to CloudStack specific


- Anshul


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


On March 6, 2013, 11:01 a.m., Anshul Gangwar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/9587/
> -----------------------------------------------------------
> 
> (Updated March 6, 2013, 11:01 a.m.)
> 
> 
> Review request for cloudstack and Rajesh Battala.
> 
> 
> Description
> -------
> 
> This patch implements the SNMP Alerts support in CloudStack. With this feature one can
configure log4j-cloud.xml to get the SNMP alerts. This feature uses the snmp4j library with
Apache License. This feature is implemented by extending log4j Appeneder. Multiple SNMP Managers
can be specified. To configure multiple SNMP Managers one needs to modify following portion
in log4j-cloud.xml 
>    <appender name="SNMP" class="org.apache.cloudstack.alert.snmp.SnmpTrapAppender">
>       <param name="Threshold" value="WARN"/>
>       <param name="SnmpManagerIpAddresses" value=""/>
>       <param name="SnmpManagerPorts" value=""/>
>       <param name="SnmpManagerCommunities" value=""/>
>       <layout class="org.apache.cloudstack.alert.snmp.SnmpEnhancedPatternLayout">
>          <param name="PairDelimeter" value="//"/>
>          <param name="KeyValueDelimeter" value="::"/>
>       </layout>
>    </appender>
> 
> To specify multiple  SnmpManagerIpAddresses one has to give as follows with each SNMP
Manager separated by ,
> 
>    <appender name="SNMP" class="org.apache.cloudstack.alert.snmp.SnmpTrapAppender">
>       <param name="Threshold" value="WARN"/>
>       <param name="SnmpManagerIpAddresses" value="10.1.1.1,10.1.1.2"/>
>       <param name="SnmpManagerPorts" value="162,162"/>
>       <param name="SnmpManagerCommunities" value="public,public"/>
>       <layout class="org.apache.cloudstack.alert.snmp.SnmpEnhancedPatternLayout">
>          <param name="PairDelimeter" value="//"/>
>          <param name="KeyValueDelimeter" value="::"/>
>       </layout>
>    </appender>
> 
> This patch also resolves the bug https://issues.apache.org/jira/browse/CLOUDSTACK-960
> 
> 
> This addresses bug https://issues.apache.org/jira/browse/CLOUDSTACK-680.
> 
> 
> Diffs
> -----
> 
>   client/pom.xml cda6ab8 
>   client/tomcatconf/log4j-cloud.xml.in 0866693 
>   core/src/com/cloud/alert/AlertManager.java a24e18c 
>   plugins/alert-handlers/snmp-alerts/pom.xml PRE-CREATION 
>   plugins/alert-handlers/snmp-alerts/src/org/apache/cloudstack/alert/snmp/CsSnmpConstants.java
PRE-CREATION 
>   plugins/alert-handlers/snmp-alerts/src/org/apache/cloudstack/alert/snmp/SnmpEnhancedPatternLayout.java
PRE-CREATION 
>   plugins/alert-handlers/snmp-alerts/src/org/apache/cloudstack/alert/snmp/SnmpHelper.java
PRE-CREATION 
>   plugins/alert-handlers/snmp-alerts/src/org/apache/cloudstack/alert/snmp/SnmpTrapAppender.java
PRE-CREATION 
>   plugins/alert-handlers/snmp-alerts/src/org/apache/cloudstack/alert/snmp/SnmpTrapInfo.java
PRE-CREATION 
>   plugins/alert-handlers/snmp-alerts/test/org/apache/cloudstack/alert/snmp/SnmpEnhancedPatternLayoutTest.java
PRE-CREATION 
>   plugins/alert-handlers/snmp-alerts/test/org/apache/cloudstack/alert/snmp/SnmpTrapAppenderTest.java
PRE-CREATION 
>   plugins/pom.xml 88f617b 
>   server/src/com/cloud/alert/AlertManagerImpl.java f8a8fd8 
>   usage/src/com/cloud/usage/UsageAlertManagerImpl.java a0765b2 
> 
> Diff: https://reviews.apache.org/r/9587/diff/
> 
> 
> Testing
> -------
> 
> 9 unit tests have been written to test the functionality. Manually tested alert generation
for few alerts.
> 
> 
> Thanks,
> 
> Anshul Gangwar
> 
>


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