Fetchfile

Function

Fetch a file to the SKOOR Engine collector via ftp, sftp, scp or http

Alarming

Transfer time, Transfer rate

The device which this job is issued from must be the corresponding Web-, FTP- or ssh-server.

Fetchfile detail

Fetchfile parameters

Parameter

Description

Protocol

Choose the transfer protocol (HTTP, FTP, SFTP, scp)

Port

Change the default port of the remote service

Username/Password

Use if the server asks for authentication. No public-key authentication has to be setup between the collector and the remote host.

Options

Enter custom command line parameters here. HTTP and FTP accept options of the wget utility. SCP accepts scp options (e.g. -o StrictHostKeyChecking=no)

Source path

Should contain the relative path from the FTP/HTTP/ssh root of the user and the filename. If only the pathname is used, the content list of the directory is copied to the Destination filename. With scp, it’s possible to transfer a whole directory. Specify the source path with a wildcard “*”, e.g.: /tmp/sap/*, and the destination filename should be an existing directory which is writable to the eranger user.

Dest. filename

Destination path of the downloaded file. The file specified here will be placed to the default fetch directory, which is specified in the /etc/opt/eranger/eranger-collector.cfg file (the default fetch directory is /var/opt/run/eranger/collector/tmp).

Suppress transfer time
Suppress transfer rate

If one of these checkboxes is set, the transfer time and/or the transfer rate of each check is not saved to the database and their values are no longer visible in the values section. Their values are also no longer available for use in alarm limit specifications.

Fetchfile values and alarm limits

Value / Alarm limit

Description

Transfer time

Time to transfer the file (except if disabled by checking Suppress transfer time)

Transfer rate

Transfer rate for the file transfer (except if disabled by checking Suppress transfer rate). Only accurate for larger files.

Error code

Generic job error code (see section Job error codes)

Fetchfile examples

Example 1 - Fetch a file via HTTPS from a server with the IP 10.1.0.77 and device name internal

Protocol

HTTP

Port

443

Source path

/files/scripts/readme.txt

Dest. filename

$DEVICE_NAME$_readme.txt

Output 1

The $DEVICE_NAME$ variable is automatically replaced with the real device name:

Click the Update file button to be able to view the downloaded file. The file can now be used for further processing or parsing.

Example 2 - Fetch a directory via scp

This will copy all files from the /root/logs/ directory to the <IP>_logs directory in the default parse directory of the collector configured for this job. The password need not be entered if the user authentication is handled with public-key files on OS level already. In such a case the eranger user on the collector configured for this job needs to be able to connect to root@10.1.0.77 without entering a password.

Protocol

scp

Port

22

Username

root

Password

<Password>

Source path

/root/logs/*

Dest. filename

$DEVICE_ADDRESS$_logs (in this case this is the destination directory on the collector and it must exist and be writable by the eranger user)

Output 2

The $DEVICE_ADDRESS$ variable is automatically replaced with the real device IP address: