You can create an action profile and configure the action to be taken when connectivity to a remote MEP fails.
To configure the action profile name, include the action-profile statement at the [edit protocols oam ethernet connectivity-fault-management] hierarchy level.