set event-options generate-event fpc_deep_cstate_avoidance_gen time-interval 3600 set event-options policy fpc_deep_cstate_avoidance_periodic events fpc_deep_cstate_avoidance_gen set event-options policy fpc_deep_cstate_avoidance_periodic then event-script fpc_deep_cstate_avoidance.slax set event-options event-script file fpc_deep_cstate_avoidance.slax set event-options policy fpc_deep_cstate_avoidance events chassisd_snmp_trap7 set event-options policy fpc_deep_cstate_avoidance within 30 trigger on set event-options policy fpc_deep_cstate_avoidance within 30 trigger 1 set event-options policy fpc_deep_cstate_avoidance attributes-match chassisd_snmp_trap7.trap matches "Fru Online" set event-options policy fpc_deep_cstate_avoidance attributes-match chassisd_snmp_trap7.value5 matches "FPC" set event-options policy fpc_deep_cstate_avoidance then event-script fpc_deep_cstate_avoidance.slax
3) Optional but recommended configuration.set event-options event-script
set system scripts synchronize4) Check the logs using the following commands.show log escript.logNOTE for the initial installation
In the first script installation, it will take 1 hour to the workaround to be applied for some slax scripts. This should not be any problem in normal case. But in the case you want immediately apply the slax script, you can manually run the script from root user cli. Router> op url /var/db/scripts/event/fpc_deep_cstate_avoidance.slax (This is only needed in first script installation, later it will be done by event-policy.) To completely remove the script We need to delete/deactivate the event-policy first. Then you still need to manually kill the FPC side script with below command (Requires root rights) Router> op url /var/db/scripts/event/script_name.slax kill true
Router> op url /var/db/scripts/event/script_name.slax kill true