Search in sources :

Example 31 with AuditLogable

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

the class ClusterOperationCommandBase method alertIfFencingDisabled.

protected void alertIfFencingDisabled() {
    if (!getCluster().getFencingPolicy().isFencingEnabled()) {
        AuditLogable alb = new AuditLogableImpl();
        alb.setClusterId(getCluster().getId());
        alb.setClusterName(getCluster().getName());
        alb.setRepeatable(true);
        auditLogDirector.log(alb, AuditLogType.FENCE_DISABLED_IN_CLUSTER_POLICY);
    }
}
Also used : AuditLogable(org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable) AuditLogableImpl(org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl)

Example 32 with AuditLogable

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

the class GetVmsFromExportDomainQuery method auditLogOvfLoadError.

private void auditLogOvfLoadError(String machineName, String errorMessage) {
    AuditLogable logable = new AuditLogableImpl();
    logable.addCustomValue("ImportedVmName", machineName).addCustomValue("ErrorMessage", errorMessage);
    auditLogDirector.log(logable, AuditLogType.IMPORTEXPORT_FAILED_TO_IMPORT_VM);
}
Also used : AuditLogable(org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable) AuditLogableImpl(org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl)

Example 33 with AuditLogable

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

the class VdsCommand method logSettingVmToDown.

protected void logSettingVmToDown(VM vm) {
    AuditLogable logable = new AuditLogableImpl();
    logable.setVdsName(getVds().getName());
    logable.setVdsId(getVds().getId());
    logable.setVmName(vm.getName());
    logable.setVmId(vm.getId());
    auditLogDirector.log(logable, AuditLogType.VM_WAS_SET_DOWN_DUE_TO_HOST_REBOOT_OR_MANUAL_FENCE);
}
Also used : AuditLogable(org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable) AuditLogableImpl(org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl)

Example 34 with AuditLogable

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

the class VdsEventListener method runColdRebootVms.

@Override
public void runColdRebootVms(List<Guid> vmIds) {
    for (Guid vmId : vmIds) {
        AuditLogable event = createVmEvent(vmId, AuditLogType.COLD_REBOOT_VM_DOWN);
        log.info("VM is down as a part of cold reboot process. Attempting to restart. VM Name '{}', VM Id '{}", event.getVmName(), vmId);
    }
    coldRebootAutoStartVmsRunner.addVmsToRun(vmIds);
}
Also used : AuditLogable(org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable) Guid(org.ovirt.engine.core.compat.Guid)

Example 35 with AuditLogable

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

the class VdsEventListener method runFailedAutoStartVMs.

@Override
public void runFailedAutoStartVMs(List<Guid> vmIds) {
    for (Guid vmId : vmIds) {
        // Alert that the virtual machine failed:
        AuditLogable event = createVmEvent(vmId, AuditLogType.HA_VM_FAILED);
        log.info("Highly Available VM went down. Attempting to restart. VM Name '{}', VM Id '{}'", event.getVmName(), vmId);
    }
    haAutoStartVmsRunner.addVmsToRun(vmIds);
}
Also used : AuditLogable(org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable) Guid(org.ovirt.engine.core.compat.Guid)

Aggregations

AuditLogable (org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable)126 AuditLogableImpl (org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl)86 AuditLogType (org.ovirt.engine.core.common.AuditLogType)10 AuditLogDirector (org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector)9 Guid (org.ovirt.engine.core.compat.Guid)8 VdsNetworkInterface (org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface)6 ArrayList (java.util.ArrayList)5 Date (java.util.Date)3 HashMap (java.util.HashMap)3 List (java.util.List)3 Map (java.util.Map)3 Collectors (java.util.stream.Collectors)3 ActionReturnValue (org.ovirt.engine.core.common.action.ActionReturnValue)3 VDS (org.ovirt.engine.core.common.businessentities.VDS)3 EngineException (org.ovirt.engine.core.common.errors.EngineException)3 HashSet (java.util.HashSet)2 Inject (javax.inject.Inject)2 Singleton (javax.inject.Singleton)2 HostUpgradeManagerResult (org.ovirt.engine.core.common.HostUpgradeManagerResult)2 Cluster (org.ovirt.engine.core.common.businessentities.Cluster)2