Difference between revisions of "OS4X Directory Scanner"

From OS4X
Jump to navigation Jump to search
Line 33: Line 33:
  
 
=== Regular expression ===
 
=== Regular expression ===
The file name found in the configured directory must match this [[http://en.wikipedia.org/wiki/Regular_Expression|regular expression]]. Regular expressions are quite complex but very powerful. The name of the found file must result into a true value (which means that any output of the regular expression is valid but not the empty). If the regular expression is not correct, the directory scanner will identify this situation, add a log entry to the system log and disable this configured directory scanner configuration.
+
The file name found in the configured directory must match this [[http://en.wikipedia.org/wiki/Regular_Expression||regular expression]]. Regular expressions are quite complex but very powerful. The name of the found file must result into a true value (which means that any output of the regular expression is valid but not the empty). If the regular expression is not correct, the directory scanner will identify this situation, add a log entry to the system log and disable this configured directory scanner configuration.
  
 
=== Configuration values ===
 
=== Configuration values ===

Revision as of 14:44, 3 November 2011

(incomplete / come back later for a final version)

What is the OS4X Directory Scanner?

The goal of the directory scanner is to scan configured directories (without recursion) for new files (older than 60 seconds) and apply a matching pattern on them. If the pattern matches, the file will be moved to the configured outgoing directory and an executable will be started with parameters defined for this directory scanner entry, based on either fix values or dynamic ones.

The OS4X Directory Scanner is available since OS4X 3 in OS4X 3 Core.

Configuration of scanning tasks

Using the directory scanner needs some configuration via web interface and optionally in addition on the filesystem (if you really want to modify the behaviour more deeply).

Queues menu.png

Menu entry

The menu entry "Dir.scanner" in the administrative web interface exists if the binary

os4x_ds_dryrun

exists in the installation directory for binaries of OS4X.

Clicking on that links shows you the actually configured directory scanner entries, with an empty view in the default installation.

Dirscanner empty.png

You can click on "New" or the empty paper icon to create a new entry. In order to edit an entry, click on the edit icon.

The following screenshot shows the edit page of an existing directory scanner entry:

Dirscanner scantest.png

Name

The name of the directory scanner entry can be a human-interpretable textual string which will only occur in the logs.

Directory

The directory on which the directory scanner works on. Remember that only that directory without subdirectories will be scanned. The configured outgoing directory cannot be configured since the files will be moved into that directory before executing the command for a found file.

Regular expression

The file name found in the configured directory must match this [expression]. Regular expressions are quite complex but very powerful. The name of the found file must result into a true value (which means that any output of the regular expression is valid but not the empty). If the regular expression is not correct, the directory scanner will identify this situation, add a log entry to the system log and disable this configured directory scanner configuration.

Configuration values

fix values

variable values

Execution

Sorting order

Enable / disable entry

Preview / Dry-run

Delete entry

Logging

Logging will be done in general for the following items:

  • a regular expression is not valid
  • a directory is not accessable
  • a file which should be moved by the directory scanner is not movable (which includes a inner-filesystem and outer-filesystem file movement)

In addition, logging is globally configurable for every found file and execution of the command via a configuration parameter ("Configuration" -> "Logging" -> "Enable directory scanner logging?"). If this configuration parameter is enabled, every single file which has been found by the directory scanner and which succeeds the configured regular expression will be logged, including the time and date, the script, all parameters, returncode of the script and the its output. Log vault functionality is given here, too.

external links