EXTRACTOR Configuration Syntax
The Prognosis File Extractor function provides a means for data to be extracted from nominated files and specific command outputs into Prognosis records by way of user-defined extractor scripts. The EXTRACTOR Configuration is used to define the location of the script files and the data sources (i.e. log files, data files or command output). It also defines the collection interval and the optional limitation on the number of records to buffer in memory. Details about File Extractor can be found in the Application Development Interface chapters of the User Guides.
The syntax of the EXTRACTOR Configuration is detailed below:
SUBSYS EXTRACTOR EXTRACT FILE (<extractor-name>, <extractor-script>, <input-filename>, <collection-interval>[, <max-records>[, <prestart[=n]>]]) EXTRACT LOG (<extractor-name>, <extractor-script>, <input-filename>, <collection-interval>[, <max-records>[, <prestart[=n]>]]) EXTRACT COMMAND (<extractor-name>, <extractor-script>, <command-to-run>, <collection-interval>[, <max-records>[, <command-output-log>][, <prestart[=n]>]]) PARAM-SP (<param-separator>)
EXTRACT Type Definition
The following extraction types are available; FILE, LOG or COMMAND
- For FILE collection, each collection reads the whole file.
- For LOG collection, only data added to the file since the last collection is read.
- For COMMAND collection, the command (in the <input-filename> parameter position) is run and its entire output read.
Syntax Elements
EXTRACT {FILE | LOG | COMMAND}
<extractor-name> | The extractor instance symbolic name of 1 to 24 characters that identifies the extractor process to use. This is the SERVER named in the DEFSSRV file. FSCOL is the standard predefined name. Some users may wish to run a second instance of the extractor. To do this please contact Prognosis Technical Support. | ||||||
<extractor-script> | The filename of the file extractor script to process by the extractor. | ||||||
<input-filename> | The filename of the input file for the extractor script (i.e. the file to extract data from). | ||||||
<command-to-run> | The name of the command to be run together with any required arguments. The following optional command line parameters can be added as needed:
| ||||||
<collection-interval> | The collection interval for this file extractor instance, i.e. the file extractor script will be run once every <collection-interval>. It is specified in seconds, with a minimum of 1 second and a maximum of 1000000 seconds.
| ||||||
<max-records> | This the maximum number of records to be retained from a collection. If omitted, or specified as zero, then there is no limit on the number of records collected. If specified as nonzero, then records are stored in a circular buffer that can contain at most max-records records, and new records overwrite older records in the buffer when it wraps around. This is useful for log files so that a history of max-records logfile records is retained, and new records replace older ones. This option is typically specified for LOG extraction and not for the other types. | ||||||
<command-output-log> | The filename to which the command places its output in for COMMAND collections. This is useful if the command outputs to a fixed filename rather than to the standard output. If this parameter is omitted then output is assumed to be from the standard output. | ||||||
<prestart[=n]> | This case-insensitive option specifies that the command has to be started not when the data delivery for the first interval is due but rather when a data requestor (e.g. online display or database collection) is started. The optional <n> argument specifies the duration of the do-not-disturb period in seconds. It means that after the command startup, the Extractor will not be running the script (in order to avoid disturbing the command with prompts) for the duration of the do-not-disturb period. Note that the Extractor will restart the command if it fails to produce any output for the duration of the timeframe specified (implicitly or explicitly) by the <timeout> argument of the SendPrompt script instruction. The do-not-disturb period applies not only to the initial command’s startup but also to each subsequent restart (if any). If the no-data timeout specified by the SendPrompt instruction is too short (as a result Extractor does not have much ‘patience’ towards commands which fail to produce any output) and on the other hand the do-not-disturb period specified in the PRESTART option is too lengthy, then a deadlock is likely to occur. Many commands will not produce any output until prompted - which will not happen until the do-not-disturb period expiry. This will keep the command silent and trigger its restart (after the no-data timeout) which would impose a new do-not-disturb period in an endless loop. |
PARAM-SP (<param-separator>)
<param-separator> | This optional field is used to input a character to override the default '|' character which is used to separate multiple parameters when using the %p option in COMMAND collections. |