Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Example: Retrying the File Upload Action

This section discusses two examples.

Example 1

Configure a policy that retries the file upload operation two times with a time interval of 5 seconds between retries:

event-options {policy p1 {events e1;then {execute-commands {commands {command1;}output-filename command-output.txt;destination some-dest {retry-count 2 retry-interval 5;}}}}}

Example 2

Configure a transfer delay of 10 seconds and retry the file upload operation two times with a time interval of 5 seconds between retries:

event-options {policy p2 {events e1;then {execute-commands {commands {command1;}output-filename command-output.txt;destination some-dest {retry-count 2 retry-interval 5;transfer-delay 10;}}}}}

The transfer delay is in operation for the first upload attempt only. The policy uploads the command-output.txt file after a 10-second transfer delay. If the event process (eventd) detects failure of the upload operation, eventd retries the upload operation after 5 seconds. The failure detection time can be in the range from 60 to 90 seconds, depending on the transmission protocol, such as FTP.

The following sequence describes the file upload operation with two failed retransmissions:

  1. Policy triggers upload operation.
  2. Transmission delay of 10 seconds.
  3. Policy tries to upload the output file.
  4. Policy detects transmission failure.
  5. Retry interval of 5 seconds.
  6. Policy tries to upload the output file.
  7. Policy detects transmission failure.
  8. Retry interval of 5 seconds.
  9. Policy tries to upload the output file.
  10. Policy detects transmission failure.
  11. Policy declares the failure of the file upload operation.

Published: 2013-07-26

Published: 2013-07-26