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 06:02:13 GMT

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



plugins/alert-handlers/snmp-alerts/src/org/apache/cloudstack/alert/snmp/SnmpEnhancedPatternLayout.java
<https://reviews.apache.org/r/9587/#comment37028>

    Here value in it can be null, some times clusterId is null so there is some possibility
of getting value null



plugins/alert-handlers/snmp-alerts/src/org/apache/cloudstack/alert/snmp/SnmpEnhancedPatternLayout.java
<https://reviews.apache.org/r/9587/#comment37032>

    This is based on fixed message pattern, not on fixed message. This part is basically handling
the case when delimeters are present in message. Here fixed numbers are based on fixed pattern




usage/src/com/cloud/usage/UsageAlertManagerImpl.java
<https://reviews.apache.org/r/9587/#comment37033>

    will remove the blank line and update the patch


- Anshul Gangwar


On Feb. 25, 2013, 2:23 p.m., Anshul Gangwar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/9587/
> -----------------------------------------------------------
> 
> (Updated Feb. 25, 2013, 2:23 p.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 d532a42 
>   client/tomcatconf/log4j-cloud.xml.in 0866693 
>   core/src/com/cloud/alert/AlertManager.java a24e18c 
>   debian/cloud-server.install f792cc2 
>   plugins/alert-handlers/snmp-alerts/pom.xml PRE-CREATION 
>   plugins/alert-handlers/snmp-alerts/src/org/apache/cloudstack/alert/snmp/SnmpConstants2.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