Defining Destinations for File Archiving by Event Policies

When the action in an event policy generates output files, you might want to save them for later analysis. Similarly, you might want to save system files (such as system log or core files) from the time an event occurs. You must configure one or more destinations to which files can be uploaded for archiving. To define destinations, include the destinations statement at the [edit event-options] hierarchy level:

[edit event-options]destinations {destination-name {archive-sites {url <password password>;}transfer-delay seconds;}}

You can then reference configured destinations in an event policy. For information about referencing destinations, see Configuring an Event Policy to Upload Files and Configuring an Event Policy to Execute Operational Mode Commands.

The optional transfer-delay statement allows you to specify the number of seconds the event process (eventd) waits before beginning to upload a file or multiple files. A transfer delay allows you to make sure a large file, such as a core file, is completely generated before the upload begins. For more information, see Configuring the Delay Before Files Are Uploaded by an Event Policy.

In the archive-sites statement, you can specify a destination as a Hypertext Transfer Protocol (HTTP) URL, FTP URL, or secure copy (scp)-style remote file specification. URLs of the type file:// are not supported; however, local device directories are supported (for example, /var/tmp/). When you specify the archive site, do not add a forward slash (/) to the end of the URL. The format for the destination filename is device-name_filename_YYYYMMDD_HHMMSS.

Optionally, you can specify a plain-text password for login into an archive site.

For a configuration example, see Example: Correlating Events Based on Receipt of Other Events Within a Specified Time Interval.