Moti Asayag has posted comments on this change.

Change subject: engine: event should contain the iface which exceeded defined 
threshold
......................................................................


Patch Set 2:

(5 comments)

http://gerrit.ovirt.org/#/c/25609/2/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java:

Line 33
Line 34
Line 35
Line 36
Line 37
Please don't delete this entry, just set @Deprecated annotation on it since the 
event-id is maintained in the DB in order to identify this entity.


Line 107:     HOST_REFRESH_CAPABILITIES_FAILED(607, AuditLogSeverity.ERROR),
Line 108: 
Line 109:     RECEIVE_RATE(608),
Line 110:     TRANSMIT_RATE(609),
Line 111:     VDS_INTERFACE_HIGH_NETWORK_USE(610, AuditLogSeverity.WARNING,
s/VDS_INTERFACE_HIGH_NETWORK_USE/HOST_INTERFACE_HIGH_NETWORK_USE

and perhaps better to maintain the previous audit-log-type-id so 
event-notification will work as excepted, unless you wish to add upgrade script.
Line 112:             AuditLogTimeInterval.MINUTE.getValue() * 30),
Line 113: 
Line 114:     // Disk alignment audit logs
Line 115:     DISK_ALIGNMENT_SCAN_START(700),


http://gerrit.ovirt.org/#/c/25609/2/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/VdcEventNotificationUtils.java
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/VdcEventNotificationUtils.java:

Line 30:         AddEventNotificationEntry(EventNotificationEntity.Host, 
AuditLogType.VDS_TIME_DRIFT_ALERT);
Line 31:         AddEventNotificationEntry(EventNotificationEntity.Host, 
AuditLogType.VDS_SET_NONOPERATIONAL);
Line 32:         AddEventNotificationEntry(EventNotificationEntity.Host, 
AuditLogType.VDS_SET_NONOPERATIONAL_IFACE_DOWN);
Line 33:         AddEventNotificationEntry(EventNotificationEntity.Host, 
AuditLogType.VDS_HIGH_MEM_USE);
Line 34:         AddEventNotificationEntry(EventNotificationEntity.Host, 
AuditLogType.VDS_INTERFACE_HIGH_NETWORK_USE);
this would probably require an upgrade script to the event_map table - if you 
don't preserve the former audit-log-type-id
Line 35:         AddEventNotificationEntry(EventNotificationEntity.Host, 
AuditLogType.VDS_HIGH_CPU_USE);
Line 36:         AddEventNotificationEntry(EventNotificationEntity.Host, 
AuditLogType.VDS_HIGH_SWAP_USE);
Line 37:         AddEventNotificationEntry(EventNotificationEntity.Host, 
AuditLogType.VDS_LOW_SWAP);
Line 38:         AddEventNotificationEntry(EventNotificationEntity.VirtHost, 
AuditLogType.VDS_SET_NONOPERATIONAL_DOMAIN);


http://gerrit.ovirt.org/#/c/25609/2/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
File 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java:

Line 304:                     iface.getStatistics().getReceiveRate(),
Line 305:                     AuditLogType.RECEIVE_RATE);
Line 306:             checkNetwrokInterfaceThreshold(iface,
Line 307:                     iface.getStatistics().getTransmitRate(),
Line 308:                     AuditLogType.TRANSMIT_RATE);
this might end up with 2 events per host's nic which is too granular. I'd 
rather having one message per nic, for example:

Host xxx has network interface which exceeded the defined threshold [95%]  
(eth1: transmit rate[98%], receive rate [97%])
Line 309:         }
Line 310:     }
Line 311: 
Line 312:     private void checkNetwrokInterfaceThreshold(VdsNetworkInterface 
iface, Double rate,


Line 315:         if (rate != null && rate.intValue() > 
maxUsedPercentageThreshold) {
Line 316:             AuditLogableBase logable = new 
AuditLogableBase(_vds.getId());
Line 317:             logable.setCustomId(iface.getName().toString() + 
rateType.toString());
Line 318:             logable.addCustomValue("InterfaceName", iface.getName());
Line 319:             logable.addCustomValue("HostName", _vds.getName());
you can use 
   logable.setVdsName( _vds.getName());
and replace "HostName" with "VdsName" within the message in AuditLog.properties
Line 320:             logable.addCustomValue("RateType", 
AuditLogDirector.getMessage(rateType));
Line 321:             logable.addCustomValue("UsedNetwork", 
String.valueOf(rate.intValue()));
Line 322:             logable.addCustomValue("Threshold", 
maxUsedPercentageThreshold.toString());
Line 323:             auditLog(logable, 
AuditLogType.VDS_INTERFACE_HIGH_NETWORK_USE);


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I22b3510398ac6fa3acf93fcb596dd6ea10b26366
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: [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