Examples: Assigning a Transfer Delay to an Event Policy Action

This section discusses three examples.

Example 1

Configure two event policies, policy1 and policy2. The policy1 event policy has a 5-second transfer-delay when uploading the process.core file to the some-dest destination. The policy2 event policy has no transfer delay when uploading the process.core file to the same destination.

[edit event-options]policy policy1 {events e1;then {upload filename process.core destination some-dest {transfer-delay 5;}}}policy policy2 {events e2;then {upload filename process.core destination some-dest;}}destinations {some-dest {archive-sites {"http://robot@my.little.com/foo/moo" password "password";"http://robot@my.big.com/foo/moo" password "password";}}}

Example 2

The policy1 event policy has a 7-second (5 seconds + 2 seconds) transfer delay when uploading the process.core file to the destination. The policy2 event policy has a 2-second transfer delay when uploading the process.core file to the destination.

[edit event-options]policy policy1 {events e1;then {upload filename process.core destination some-dest {transfer-delay 5;}}}policy policy2 {events e2;then {upload filename process.core destination some-dest;}}destinations {some-dest {transfer-delay 2;archive-sites {"http://robot@my.little.com/foo/moo" password "password";"http://robot@my.big.com/foo/moo" password "password";}}}

Example 3

The policy1 event-policy is executed with user1 privileges and uploads the process.core file after a transfer delay of 7 seconds (5 seconds + 2 seconds). The policy2 event policy is executed with root privileges and uploads the process.core file after a transfer delay of 6 seconds (4 seconds + 2 seconds).

[edit event-options]policy policy1 {events e1;then {upload filename process.core destination some-dest {transfer-delay 5;user-name user1;}}}policy policy2 {events e2;then {upload filename process.core destination some-dest {transfer-delay 4;}}}destinations {some-dest {transfer-delay 2;archive-sites {"http://robot@my.little.com/foo/moo" password "password";"http://robot@my.big.com/foo/moo" password "password";}}}