mooli tayer has posted comments on this change.

Change subject: tools: Support snmp trap as a notification method.
......................................................................


Patch Set 20:

(12 comments)

http://gerrit.ovirt.org/#/c/22909/20/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/LocalConfig.java
File 
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/LocalConfig.java:

> if you added tests and such for this change, please separate it to differen
Done
Line 1: package org.ovirt.engine.core.utils;
Line 2: 
Line 3: import java.io.BufferedReader;
Line 4: import java.io.File;


Line 280:      *      allowMissing is false.
Line 281:      */
Line 282:     public String getProperty(String key, String optionalSuffix, 
boolean allowMissing) {
Line 283:         String property = getProperty(key + "_" + optionalSuffix, 
true);
Line 284:         if (property == null || StringUtils.isBlank(property)) {
> isBlank takes null into account, if not use isEmpty or any other StringUtil
Slipped by me. fixed.
Line 285:             property = getProperty(key, allowMissing);
Line 286:         }
Line 287:         return property;
Line 288:     }


http://gerrit.ovirt.org/#/c/22909/20/packaging/services/ovirt-engine-notifier/ovirt-engine-notifier.conf.in
File packaging/services/ovirt-engine-notifier/ovirt-engine-notifier.conf.in:

Line 104: MAIL_SUBSCRIBER=
Line 105: 
Line 106: #-------------------------#
Line 107: # SNMP_TRAP Notifications #
Line 108: #-------------------------#
> add:
Done
Line 109: # Send v2c snmp notifications
Line 110: 
Line 111: # The default profile's whitespace separated list of IP addresses or 
DNS names of SNMP managers to receive SNMP traps.
Line 112: # Can include an optional port, default is 162.


Line 107: # SNMP_TRAP Notifications #
Line 108: #-------------------------#
Line 109: # Send v2c snmp notifications
Line 110: 
Line 111: # The default profile's whitespace separated list of IP addresses or 
DNS names of SNMP managers to receive SNMP traps.
> drop the profile and we have same meaning...
Done
Line 112: # Can include an optional port, default is 162.
Line 113: # SNMP_MANAGERS=manager1.example.com manager2.example.com:164
Line 114: SNMP_MANAGERS=
Line 115: 


Line 112: # Can include an optional port, default is 162.
Line 113: # SNMP_MANAGERS=manager1.example.com manager2.example.com:164
Line 114: SNMP_MANAGERS=
Line 115: 
Line 116: # The default profile's Community String.
> same...
Done
Line 117: SNMP_COMMUNITY=public
Line 118: 
Line 119: # The default profile's Object Identifier identifying ovirt engine 
SNMP trap messages.
Line 120: SNMP_OID=1.3.6.1.4.1.2312.13.1.1


Line 115: 
Line 116: # The default profile's Community String.
Line 117: SNMP_COMMUNITY=public
Line 118: 
Line 119: # The default profile's Object Identifier identifying ovirt engine 
SNMP trap messages.
> Same.
Done
Line 120: SNMP_OID=1.3.6.1.4.1.2312.13.1.1
Line 121: # 
1[iso].3[organization].6[DoD].1[Internet].4[private].1[enterprises].2312[redhat].13[ovirt-engine].1[notifications].
Line 122: # 1[audit-log]
Line 123: 


Line 121: # 
1[iso].3[organization].6[DoD].1[Internet].4[private].1[enterprises].2312[redhat].13[ovirt-engine].1[notifications].
Line 122: # 1[audit-log]
Line 123: 
Line 124: # Can include additional snmp profile definitions overriding default 
i.e
Line 125: # SNMP_MANAGERS_ALICE=manager.alice.com
> add:
Done
Line 126: 
Line 127: #-------------------#
Line 128: # Event subscribers #
Line 129: #-------------------#


Line 125: # SNMP_MANAGERS_ALICE=manager.alice.com
Line 126: 
Line 127: #-------------------#
Line 128: # Event subscribers #
Line 129: #-------------------#
> it is not subscribers, it is filtering.
Done
Line 130: 
Line 131: 
Line 132: # A whitespace separated events list.
Line 133: # FILTER=[FILTER_ELEMENT ]*


Line 129: #-------------------#
Line 130: 
Line 131: 
Line 132: # A whitespace separated events list.
Line 133: # FILTER=[FILTER_ELEMENT ]*
> Should be simple description, per my description.
Done
Line 134: #
Line 135: # FILTER_ELEMENT=(include|exclude):event_name[FILTER_TARGET]
Line 136: # FILTER_TARGET=\(smtp|snmp[:FILTER_PROFILE]\)
Line 137: # for emails:


Line 136: # FILTER_TARGET=\(smtp|snmp[:FILTER_PROFILE]\)
Line 137: # for emails:
Line 138: # FILTER_PROFILE=RFC822 format email address
Line 139: # for snmp(see additional snmp profile definitions ):
Line 140: # FILTER_PROFILE=profile_name
> no need FILTER_TARGET please remove, we explicitly discussed to stay KISS.
It isn't a parameter, but an attempt to explain configuration using 
Context-free grammar. Bad idea, will remove
Line 141: #
Line 142: # if FILTER_TARGET is missing all targets are used.
Line 143: # if FILTER_PROFILE is missing the default transport profile is used.
Line 144: #


Line 139: # for snmp(see additional snmp profile definitions ):
Line 140: # FILTER_PROFILE=profile_name
Line 141: #
Line 142: # if FILTER_TARGET is missing all targets are used.
Line 143: # if FILTER_PROFILE is missing the default transport profile is used.
> no need FILTER_TARGET please remove, we explicitly discussed to stay KISS.
see previous.
Line 144: #
Line 145: # Example:
Line 146: # send VDC START and STOP to all notification methods using their 
default profiles,
Line 147: # send DATABASE_UNREACHABLE to alice using default MAIL_ADDRESS and 
using and snmp profile called ALICE


Line 149: #
Line 150: # FILTER="${FILTER} include:VDC_START include:VDC_STOP"
Line 151: # FILTER="${FILTER} include:DATABASE_UNREACHABLE(smtp) 
include:DATABASE_UNREACHABLE(snmp:ALICE)"
Line 152: # FILTER="${FILTER} exclude:*"
Line 153: FILTER=exclude:*
> quotes please
Done
Line 154: 
Line 155: #----------------------------------#
Line 156: # Engine Monitoring Configuration: #
Line 157: #----------------------------------#


-- 
To view, visit http://gerrit.ovirt.org/22909
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0cd22d022ae535f45e046b09a2cbfadd837b465c
Gerrit-PatchSet: 20
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: mooli tayer <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Liran Zelkha <[email protected]>
Gerrit-Reviewer: Martin PeÅ™ina <[email protected]>
Gerrit-Reviewer: mooli tayer <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to