3- event script: ping an IP@ every 60sec


https://www.juniper.net/documentation/en_US/junos/topics/reference/configuration-statement/event-options-edit.html



set event-options generate-event every1min time-interval 60
set event-options policy pingip_12.12.0.2 events every1min
set event-options policy pingip_12.12.0.2 then execute-commands commands "ping 12.12.0.2 routing-instance vrouter1 count 10"

deactivate event-options generate-event every1min

activate event-options generate-event every1min




show config
root@SRX13> show configuration event-options
generate-event {
    everysec time-interval 60;
}
policy "pingip@" {
    events everysec;
    then {
        execute-commands {
            commands {
                "ping 192.168.56.1 count 1000 rapid";
            }
        }
    }
}

root@SRX13> show configuration event-options | display set
set event-options generate-event everysec time-interval 60
set event-options policy "pingip@" events everysec
set event-options policy "pingip@" then execute-commands commands "ping 192.168.56.1 count 1000 rapid"

root@QFX5110-2> monitor interface ge-0/0/2.0