Search in sources :

Example 1 with AuditLogableBase

use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase in project ovirt-engine by oVirt.

the class BalloonMonitoring method guestAgentIsDownAndBalloonInfalted.

// add the vm to the list of vms with uncontrolled inflated balloon or increment its counter
// if it is already in the list
private void guestAgentIsDownAndBalloonInfalted(Guid vmId) {
    Integer currentVal = vmsWithUncontrolledBalloon.get(vmId);
    if (currentVal == null) {
        vmsWithUncontrolledBalloon.put(vmId, 1);
    } else {
        vmsWithUncontrolledBalloon.put(vmId, currentVal + 1);
        if (currentVal >= Config.<Integer>getValue(ConfigValues.IterationsWithBalloonProblem)) {
            AuditLogableBase auditLogable = Injector.injectMembers(new AuditLogableBase());
            auditLogable.setVmId(vmId);
            auditLog(auditLogable, AuditLogType.VM_BALLOON_DRIVER_UNCONTROLLED);
            vmsWithUncontrolledBalloon.put(vmId, 0);
        }
    }
}
Also used : AuditLogableBase(org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase)

Example 2 with AuditLogableBase

use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase in project ovirt-engine by oVirt.

the class VmAnalyzer method auditVmPausedError.

private void auditVmPausedError(VmDynamic vdsmVmDynamic) {
    AuditLogType logType = vmPauseStatusToAuditLogType(vdsmVmDynamic.getPauseStatus());
    AuditLogableBase logable = Injector.injectMembers(new AuditLogableBase(vdsManager.getVdsId(), dbVm.getId()));
    auditLog(logable, logType);
}
Also used : AuditLogableBase(org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase) AuditLogType(org.ovirt.engine.core.common.AuditLogType)

Example 3 with AuditLogableBase

use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase in project ovirt-engine by oVirt.

the class VmAnalyzer method auditVmNotResponding.

private void auditVmNotResponding() {
    AuditLogableBase logable = Injector.injectMembers(new AuditLogableBase(vdsManager.getVdsId(), dbVm.getId()));
    auditLog(logable, AuditLogType.VM_NOT_RESPONDING);
}
Also used : AuditLogableBase(org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase)

Example 4 with AuditLogableBase

use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase in project ovirt-engine by oVirt.

the class VmAnalyzer method auditVmMigrationAbort.

private void auditVmMigrationAbort(String exitMessage) {
    AuditLogableBase logable = Injector.injectMembers(new AuditLogableBase(vdsManager.getVdsId(), dbVm.getId()));
    logable.addCustomValue("MigrationError", exitMessage);
    auditLog(logable, AuditLogType.VM_MIGRATION_ABORT);
}
Also used : AuditLogableBase(org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase)

Example 5 with AuditLogableBase

use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase in project ovirt-engine by oVirt.

the class VmAnalyzer method auditVmOnDownError.

private void auditVmOnDownError() {
    AuditLogableBase logable = Injector.injectMembers(new AuditLogableBase(vdsManager.getVdsId(), getVmId()));
    logable.addCustomValue("ExitMessage", vdsmVm.getVmDynamic().getExitMessage() != null ? "Exit message: " + vdsmVm.getVmDynamic().getExitMessage() : " ");
    auditLog(logable, AuditLogType.VM_DOWN_ERROR);
}
Also used : AuditLogableBase(org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase)

Aggregations

AuditLogableBase (org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase)22 AuditLogType (org.ovirt.engine.core.common.AuditLogType)3 VmDynamic (org.ovirt.engine.core.common.businessentities.VmDynamic)2 Guid (org.ovirt.engine.core.compat.Guid)2 ArrayList (java.util.ArrayList)1 Date (java.util.Date)1 Before (org.junit.Before)1 ProcessDownVmParameters (org.ovirt.engine.core.common.action.ProcessDownVmParameters)1 AuditLog (org.ovirt.engine.core.common.businessentities.AuditLog)1 StorageDomain (org.ovirt.engine.core.common.businessentities.StorageDomain)1 StoragePool (org.ovirt.engine.core.common.businessentities.StoragePool)1 VDS (org.ovirt.engine.core.common.businessentities.VDS)1 VM (org.ovirt.engine.core.common.businessentities.VM)1 VmBalloonInfo (org.ovirt.engine.core.common.businessentities.VmBalloonInfo)1 QueryReturnValue (org.ovirt.engine.core.common.queries.QueryReturnValue)1 Pair (org.ovirt.engine.core.common.utils.Pair)1 SetVmStatusVDSCommandParameters (org.ovirt.engine.core.common.vdscommands.SetVmStatusVDSCommandParameters)1 VDSReturnValue (org.ovirt.engine.core.common.vdscommands.VDSReturnValue)1 AuditLogDirector (org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector)1