Sample 802.3ah config for UDLD type applocations:
set protocols oam ethernet link-fault-management action-profile CUST-PORT event link-adjacency-loss
set protocols oam ethernet link-fault-management action-profile CUST-PORT action syslog
set protocols oam ethernet link-fault-management action-profile CUST-PORT action link-down
set protocols oam ethernet link-fault-management interface ge-0/0/x.0 apply-action-profile CUST-PORT
set protocols oam ethernet link-fault-management interface ge-0/0/x.0 pdu-interval 400
set protocols oam ethernet link-fault-management interface ge-0/0/x.0 link-discovery active
set protocols oam ethernet link-fault-management interface ge-0/0/x.0 pdu-threshold 10
This is assuming you want the EX4200 as active. In my scenario we are using the EX4200 as an Agg. Switch, with CE devices connected to it, via a single fiber solution. Thus we want the EX4200 as active, so it can drop it's link should it detect an error.