use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase in project ovirt-engine by oVirt.
the class VmAnalyzer method auditVmPowerDownFailed.
private void auditVmPowerDownFailed() {
AuditLogableBase logable = Injector.injectMembers(new AuditLogableBase(vdsManager.getVdsId(), dbVm.getId()));
auditLog(logable, AuditLogType.VM_POWER_DOWN_FAILED);
}
use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase in project ovirt-engine by oVirt.
the class VmAnalyzer method proceedGuaranteedMemoryCheck.
private void proceedGuaranteedMemoryCheck() {
VmBalloonInfo vmBalloonInfo = vdsmVm.getVmBalloonInfo();
if (vmBalloonInfo != null && vmBalloonInfo.getCurrentMemory() != null && vmBalloonInfo.getCurrentMemory() > 0 && getVmManager().getMinAllocatedMem() > vmBalloonInfo.getCurrentMemory() / TO_MEGA_BYTES) {
AuditLogableBase auditLogable = Injector.injectMembers(new AuditLogableBase());
auditLogable.addCustomValue("VmName", getVmManager().getName());
auditLogable.addCustomValue("VdsName", vdsManager.getVdsName());
auditLogable.addCustomValue("MemGuaranteed", String.valueOf(getVmManager().getMinAllocatedMem()));
auditLogable.addCustomValue("MemActual", Long.toString(vmBalloonInfo.getCurrentMemory() / TO_MEGA_BYTES));
auditLog(auditLogable, AuditLogType.VM_MEMORY_UNDER_GUARANTEED_VALUE);
}
}
use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase in project ovirt-engine by oVirt.
the class VmAnalyzer method auditVmSuspended.
private void auditVmSuspended() {
VmDynamic vm = vdsmVm.getVmDynamic();
AuditLogType type = vm.getExitStatus() == VmExitStatus.Normal ? AuditLogType.USER_SUSPEND_VM_OK : AuditLogType.USER_FAILED_SUSPEND_VM;
AuditLogableBase logable = Injector.injectMembers(new AuditLogableBase(vdsManager.getVdsId(), vm.getId()));
auditLog(logable, type);
}
use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase in project ovirt-engine by oVirt.
the class VmAnalyzer method auditClientIpChange.
public void auditClientIpChange() {
final AuditLogableBase event = Injector.injectMembers(new AuditLogableBase());
event.setVmId(dbVm.getId());
event.setUserName(dbVm.getConsoleCurrentUserName());
String clientIp = vdsmVm.getVmDynamic().getClientIp();
auditLogDirector.log(event, clientIp == null || clientIp.isEmpty() ? AuditLogType.VM_CONSOLE_DISCONNECTED : AuditLogType.VM_CONSOLE_CONNECTED);
}
use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase in project ovirt-engine by oVirt.
the class VmAnalyzer method auditVmRestoredFromUnknown.
private void auditVmRestoredFromUnknown() {
final AuditLogableBase auditLogable = Injector.injectMembers(new AuditLogableBase());
auditLogable.setVmId(dbVm.getId());
auditLogable.addCustomValue("VmStatus", vdsmVm.getVmDynamic().getStatus().toString());
auditLog(auditLogable, AuditLogType.VM_STATUS_RESTORED);
}
Aggregations