Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

You can create an XML file to build an environment for scanning many servers, and per server, scanning many directories. The path to this XML file is placed in the Add Logs Directories Task, for adding multiple directories to XpoLog, and automating addition of directories.

DirectoryScanner XML General Structure

The following is the XML code of DirectoryScanner.

DirectoryScanner>
<ScannerNode name="NAME_OF_FOLDER_IN_XPOLOG">
<Account name="ACCOUNT NAME" useEncrypt="false" privateKeyPath="" isSystemAccount="false" isScriptApi="false" isSSH="true" isPublicKey="false" isEditable="true" isCertificate="false" description="" classKey="xpolog.eye.media.telsh.TelnetAccount" certificateId="" UserName="USERNAME" TYPE_SCP_SFTP="SFTP" Port="22" Password="PASSWORD" NetAddress="IP"/>
<ScanDirectories>
<ScanDirectory scanPath="DIRECTORY_PATH_ON_SOURCE">
<ScanConfiguration>
<!-- OPTIONAL CONF PARAMETERS -->
</ScanConfiguration>
</ScanDirectory>
</ScanDirectories>
</ScannerNode>
</DirectoryScanner>

  The following table describes the general structure of DirectoryScanner. 

Tag PathMandatory/OptionalDescription
DirectoryScanner  
DirectoryScanner/ScannerNode MandatoryThe root folder that will be placed above its scanned directories.
DirectoryScanner/Account Mandatory 
DirectoryScanner/ScanDirectories  
DirectoryScanner/ScanDirectory MandatoryContains the scanPath.
DirectoryScanner/ScanConfiguration Optional 

 XML Reference

ScannerNode Parameter

ParameterMandatory/OptionalDescriptionValues
 name Mandatory

The name of the root folder that will be placed above its scanned directories.
Leave the name empty to create all sub-directories under the parent folder with their original name from the source server.

 String

Example

<ScannerNode name="">

Account Parameters

ParameterMandatory/OptionalDescriptionValues
 name Mandatory The account name String
 useEncrypt  Indicates whether or not  account uses encryption Boolean
 isPublicKey  If authentication is done by private key, should be FALSE. 
 If user/password are used, it should be TRUE, and a path should be specified under    
 privateKeyPath
(see the following parameter).
 Boolean 
 privateKeyPath Optional The path to the key, if authentication is done by private key 
 isSystemAccount  Indicates whether or not account is a system account Boolean
 isScriptAPI  Indicates whether or not account is Script API Boolean
 isSSH  Indicates whether or not account is SSH Boolean
 isEditable  Indicates whether or not account can be edited in the XpoLog Address Book Boolean
 isCertificate  Indicates whether or not the account uses a certificate Boolean
 description Optional Description of the account 
 classKey   
 certificateID Optional The ID of the certificate, if account uses a certificate (see isCertificate). String
 UserName  The username that the account uses to connect  String
 isDefault   Boolean
 Port  The port of the remote data source 
 TYPE_SCP_SFTP   
 Password  The password that the account uses to connect 
 NetAddress  The IP/host of the remote data source used in the account 

Note: If a remote data source is scanned then an account to that source should be specified (it can be verified after execution under XpoLog > Tools > Address Book.

Windows Account Example

<Account name="ACCOUNT NAME" useEncrypt="false" isSystemAccount="false" isEditable="true" description="" classKey="xpolog.eye.media.auth.win.WinAuthenticationAccount" Password="PASSWORD" user="USERNAME" isDefault="false"/>

SSH Account Example

<Account name="ACCOUNT NAME" useEncrypt="false" privateKeyPath="" isSystemAccount="false" isScriptApi="false" isSSH="true" isPublicKey="false" isEditable="true" isCertificate="false" description="" classKey="xpolog.eye.media.telsh.TelnetAccount" certificateId="" UserName="USERNAME" TYPE_SCP_SFTP="SFTP" Port="22" Password="PASSWORD" NetAddress="IP"/>

ScanDirectory Parameter

ParameterMandatory/OptionalDescriptionValues
 scanPath Mandatory The full path to the directory that is to be scanned Path

Example

<ScanDirectory scanPath="C:\logs\">

ScanConfiguration Parameters

ParameterMandatory/OptionalDescriptionValues
 condenseLogsTree  OptionalA "true" value indicates that folders containing only one subfolder and without logs, will be omitted from the Folders and Logs   tree. Boolean
 directoriesToHide OptionalA comma separated list of name expressions of folders that will not be added to the Folders and Logs tree;their subfolders/logs will be added. 
 fileSuffixesToIgnore  OptionalUnite logs with different suffixes into one log type (advanced)  
 numberOfThreads OptionalThe number of threads to be used as part of the scanning operation Integer
 removeEmptyNodes OptionalIn case there are no matching files under one of the Folders and Logs members, remove it from the Folders and Logs tree. Boolean
 subdirsScanLevel   OptionalThe number of subdirectories to scan from the given directory. Default is unlimited; any number can be specified. Integer or "Unlimited"
 scanMethod  Optional0 = Use existing configuration (file names and content) and automatic matching.
1 = Use existing configuration (file names and content).
2 = Use existing configuration (file names only).
 0, 1, or 2
 namePatternLogic Optional0 = Capture each file separately (without name pattern).
1 = Unite files with a similar names (apply name pattern automatically).
2 = Unite files with a similar suffix (apply name pattern only at the end of the file name).
 0, 1, or 2
 filesToInclude OptionalComma separated list of the files to capture during a scan; for example: *.txt, *.log 
 filesToExclude OptionalComma separated list of the files that will be skipped during a scan; for example: *.txt, *.log 
 directoriesToExclude OptionalComma separated list of the directories that will be skipped during a scan; for example: DIR_NAME, *NAME* 
 fileSuffixesToIgnore  OptionalRegular expression used to ignore part of the files names to define a name pattern String
 enableLogsIndex Optional True – Online logs that are added under Folders and Logs will be indexed.
False – Disable indexing.
 Boolean
 enableLogsAnalytics OptionalTrue – Online logs that are added under Folders and Logs will be analyzed by Analytics.
False – Disable Analytics.
 
 addCollectors OptionalTrue – All the logs that are added by the scanner task will be collected; default policy will be applied, unless a specific policy   is specified.
False – Disables logs collection.
 Boolean
 enableCollectedLogsAnalytics  Optional True – enables Analytics analysis on collected logs. Online logs state will be taken from the collection policy;
relevant only when addCollectors="true".
False – Disables Analytics analysis on collected log. 
 Boolean
 enableCollectedLogsIndex  OptionalTrue – enables indexing of collected logs. The online logs state will be taken from the collection policy;
relevant only when addCollectors="true".
False – Disables indexing of collected logs. 
 Boolean
 onlineLogsApplication Comma separated list of application name(s) that the online logs will be tagged to once created 
 collectedLogsApplication OptionalComma separated list of application name(s) that the collected logs will be tagged to once created;
relevant only when addCollectors="true".
 
 assignedCollectionPolicy  OptionalThe policy name of the collection policy that will be applied on the collected logs once created;
relevant only when addCollectors="true".
 

 Example

<ScanConfiguration condenseLogsTree="false" directoriesToHide="log,home" fileSuffixesToIgnore="_lara_\d+" numberOfThreads="3" removeEmptyNodes="true">

ScanFileFilter Parameters

ParameterMandatory/OptionalDescriptionValues
 timeInterval/timeIntervalUnit  OptionalThe scan will add only log files with last updated time that is within the specified time interval per log type.Years, Months, Weeks, Days, Hours, Mins
 maxNumberOfFiles  OptionalThe maximum number of log files that are added per log type. Integer

Examples

<ScanFileFilter timeInteval="3" timeIntervalUnit="months"/>
<ScanFileFilter maxNumberOfFiles="2"/>-->

ScanConfApplications Parameters

ParameterMandatory/OptionalDescriptionValues
 applicationNamePattern Optional The pattern that is used to extract the application name. An application will be created as part of the scan process. 
 applicationGroupNamePattern  OptionalThe pattern that is used to extract the application group name. An application will be created as part of the scan process that all its sub-application are tagged to. 

Example

<ScanConfApplications applicationNamePattern="/\w+-(\w+).*" applicationGroupNamePattern="/(\w+)-\w+.*"/>