The following commands are available.
Connection
In order to execute remote commands it is first required to provide connection parameters to the XPLG instance:
Connection Parameters
Key | Description | Values |
|
xplgURL | The URL to the XPLG instance | URL | Mandatory |
user | Authentication user name | Text | Optional (Mandatory if security is enabled) |
password | Authentication password | Text | Optional (Mandatory if security is enabled) |
Example of base command to connect to a remote XPLG:
java -cp xpologClient.jar com.xpolog.sdk.client.XpoLogSDKClient -xplgURL http://<xpolog-machine>:<xpolog-port>/logeye -user USER_NAME -password PASSWORD
When using scripts, it is recommended to set the above as parameters, as they should be used on any command which is being executed:
Windows:
set JAVA_RUN=java -cp xpologClient.jar com.xpolog.sdk.client.XpoLogSDKClient
set XPLG_CONN=-xplgURL http://<xpolog-machine>:<xpolog-port>/logeye -user USER_NAME -password PASSWORD
Linux:
JAVA_RUN=”java -cp xpologClient.jar com.xpolog.sdk.client.XpoLogSDKClient”
XPLG_CONN=”-xplgURL http://<xpolog-machine>:<xpolog-port>/logeye -user USER_NAME -password PASSWORD”
After a connection is established the following command may be executed against the connected XpoLog instance:
Settings Parameters
Key | Description | Values |
|
api | The API type to use – must be settings | “settings” | Mandatory |
httpPort | The HTTP port XpoLog is listening on | Number | Optional |
sslPort | The SSL port XpoLog is listening on | Number | Optional |
shutdownPort | The server’s shutdown port | Number | Optional |
ajpPort | The server’s ajp port | Number | Optional |
agentMode | Enable/Disable agent mode | true/false | Optional |
activateSecurity | Enable/Disble security | true/false | Optional |
activateSystemTimeZone | Set the XpoLog's user Time Zone Mode to System (Default) | true/false | Optional |
activateDynamicTimeZone | Set the XpoLog's user Time Zone Mode to Dynamic | true/false | Optional |
activateAppTagsTimeZone | Set the XpoLog's user Time Zone Mode to per AppTags | true/false | Optional |
Key | Description | Values |
|
api | The API type to use – must be securityUsers | “securityUsers” | Mandatory |
name | The user name of the user | Text | Mandatory |
userPassword | The user password | Text | Mandatory for new |
displayName | The display name of the user | Text | Mandatory for new |
override | Override an existing user (Default: false) | true/false | Optional |
userPolicy | The policy name to associate to this user | Text | Optional |
selectedGroupsList | The names of the selected groups to associate with this user | Text List (separate by ;) | Optional |
Accounts Management
Key | Description | Values |
|
api | The API type to use – must be removeAccount | “removeAccount” | Mandatory |
name | The name of the account to be removed | Text | Mandatory |
Disable/Enable Account
Key | Description | Values |
|
api | The API type to use – must be enableAccount | “enableAccount” | Mandatory |
name | The name of the account to be removed | Text | Mandatory |
enabled | Enable/Disable the account | true/false | Mandatory |
Key | Description | Values |
|
api | The API type to use – must be addSSHAccount | “addSSHAccount” | Mandatory |
name | The name of the account | Text | Mandatory |
description | The description of the account | Test | Optional |
hostName | Host Name | Text | Mandatory for new |
conType | The connection type (Default: SFTP) | SFTP/SCP | Optional |
port | The port to be used in the account (Default: 22) | Number | Optional |
override | Override an existing account (Default: false) | true/false | Optional |
enabled | Enable/Disable the account | true/false | Optional |
privateKeyPath | Full Path to Key | Text | Optional |
username | Authentication user name | Text | Optional |
userPassword | Authentication password | Text | Optional |
Add Remote XPLG Account Parameters
Key | Description | Values |
|
api | The API type to use – must be addRemoteXpoLogAccount | “addRemoteXpoLogAccount” | Mandatory |
name | The name of the account | Text | Mandatory |
description | The description of the account | Test | Optional |
hostName | Host Name | Text | Mandatory for new |
conType | The connection type (Default: HTTP) | HTTP/HTTPS | Optional |
override | Override an existing account (Default: false) | true/false | Optional |
enabled | Enable/Disable the account | true/false | Optional |
isCollected | False – Proxy mode, True – Agent Mode (Default: true) | true/false | Optional |
username | Authentication user name | Text | Optional |
userPassword | Authentication password | Text | Optional |
Key | Description | Values |
|
api | The API type to use – must be addExternalAccount | “addExternalAccount” | Mandatory |
name | The name of the account | Text | Mandatory |
description | The description of the account | Text | Optional |
externalMediaType | The type of the account | s3 | Mandatory (lowercase only) |
ema_custom_accessKey | The AWS S3 access key | Text | Mandatory |
ema_custom_secretKey | The AWS S3 secret key | Text | Mandatory |
override | Override an existing account (Default: false) | true/false | Optional |
enabled | Enable/Disable the account | true/false | Optional |
Key | Description | Values |
|
api | The API type to use – must be executeTask | “executeTask” | Mandatory |
name | The name of the task (case sensitive) | Text | Mandatory |
Key | Description | Values |
|
api | The API type to use – must be executeScanTask | “executeScanTask” | Mandatory |
name | The name of the task to be presented in XPLG logs / Activity console while running (recommended) | Text | Optional |
id | The id of the task - used to avoid re-creation of logs which were already created by a SDK command (recommended) | Text | Optional |
parentFolderPath | Determines under which folder to create/update logs that are created by the SDK command (Default: Folders and Logs). Folder is created if does not exist | ROOT = Top Folder (Folders and Logs) Use ‘->’ in the path between folders | Optional |
accountName | The connectivity account to use if the scan is not local | Text | Mandatory for SSH |
scanPath | The full path to scan (local or on the remote source after connection is established) | Text | Mandatory |
Scan Parameters | The SDK supports all the 'ScanConfiguration' parameters | Text | Optional |
Key | Description | Values |
|
api | The API type to use – must be executeScanTask | “addScanTask” | Mandatory |
name | The name of the task to be presented in XPLG logs / Activity console while running (recommended) | Text | Optional |
id | The id of the task - used to avoid re-creation of logs which were already created by a SDK command (recommended) | Text | Optional |
parentFolderPath | Determines under which folder to create/update logs that are created by the SDK command (Default: Folders and Logs). Folder is created if does not exist | ROOT = Top Folder (Folders and Logs) Use ‘->’ in the path between folders | Optional |
accountName | The connectivity account to use if the scan is not local | Text | Mandatory for SSH |
scanPath | The full path to scan (local or on the remote source after connection is established) | Text | Mandatory |
Scan Parameters | The SDK supports all the 'ScanConfiguration' parameters | Text | Optional |
cron | Unix cron expression format | cron expression format | Optional |
override | Override an existing task (Default: false) | true/false | Optional |
Add Log Sync Task Parameters
Key | Description | Values |
|
api | The API type to use – must be addSyncLogTask | “addSyncLogTask” | Mandatory |
name | The name of the task | Text | Mandatory |
configFilePath | The absolute path to the LogSync configuration file to be used by this task | Text | Mandatory |
createConfiguration | Determines whether to create Folders and Logs configuration from the synched logs (Default: false) | true/false | Optional |
parentFolderPath | The parent folder path of this task’s result. Folder and Logs is the default path. | Use ‘->’ in the path between folders | Optional |
cron | Unix cron expression format | cron expression format | Optional |
assignedNode | The name of the XPLG node to be assigned on this task | Text | Optional |
override | Override an existing task (Default: false) | true/false | Optional |
Key | Description | Values |
|
api | The API type to use – must be addLog | “addLog” | Mandatory |
logName | The name of the log to be created | Text | Mandatory |
logPath | The full path to the log under the Folders and Log Tree (excluding the log name) | ROOT = Top Folder (Folders and Logs) Use ‘->’ in the path between folders | Optional |
newLogPath | The new Folders and Logs path to place the log in XPLG Folders and Logs tree (for example Root->Folder1->Folder2). | ROOT = Top Folder (Folders and Logs) Use ‘->’ in the path between folders | Optional*
|
newLogName | The new log name | Text | Optional*
|
filesPath | The full path to the logs on the source:
| Text | Mandatory |
collectionPolicy | The exact name of the collection policy to be assigned on the log (if doesn't exist, the command will be ignored) | Text | Optional |
accountName | The name of the account to be used if needed (SSH or Win Account or Remote XPLG) | Text | Direct Access - Optional Win Network/SSH - Mandatory |
patterns | A list of patterns that will be applied on the log that is added (separated by XPLG_SDK_SEP) | Text | Mandatory* |
appTags | A comma separated list of appTags that the added log will be tagged to | Text | Optional |
overrideAppTags | Specifies whether to add appTags on a log or replace the existing appTags of a log. Used only on edit when override is set to true | true/false | Optional |
timezone | The timezone definition of the added log | Text (a value from JAVA time zone list) | Optional |
charset | The charset definition of the added log | Text (a value from JAVA charset list) | Optional |
template | The name of the template to be used | Text | Optional* specific parameters that are passed override template's settings |
dataFilterQuery | The dataFilterQuery to be applied on the specified - see Advanced Log Settings for more information. (pass an empty filter to clear an existing filter) | Text | Optional |
override | Overwrite an existing log configuration (Default: false) | true/false | Optional |
(Note: its required that your XPLG instance will run on Windows to add Windows Event Logs)
Key | Description | Values |
|
api | The API type to use – must be addLog | “addLog” | Mandatory |
logName | The name of the log to be created | Text | Mandatory |
logPath | The full path to the log under the Folders and Log Tree (excluding the log name) | ROOT = Top Folder (Folders and Logs) Use ‘->’ in the path between folders | Optional |
newLogPath | The new Folders and Logs path to place the log in XPLG Folders and Logs tree (for example Root->Folder1->Folder2). | ROOT = Top Folder (Folders and Logs) Use ‘->’ in the path between folders | Optional*
|
newLogName | The new log name | Text | Optional*
|
host | The host to collect data from (default: localhost) | Text | Optional |
unc | True = use direct access to the .evtx file (faster but requires permissions). False = connect via Windows platform (automatic) If a custom path is used ("filesPath") then this property should not be used. | true/false | Optional |
collectionPolicy | The exact name of the collection policy to be assigned on the log (if doesn't exist, the command will be ignored) | Text | Optional |
accountName | The name of the account to be used if needed (Windows Authentication Account if not used on XPLG service level) | Text | Optional |
appTags | A comma separated list of appTags that the added log will be tagged to | Text | Optional |
overrideAppTags | Specifies whether to add appTags on a log or replace the existing appTags of a log. Used only on edit when override is set to true | true/false | Optional |
timezone | The timezone definition of the added log | Text (a value from JAVA time zone list) | Optional |
override | Overwrite an existing log configuration (Default: false) | true/false | Optional |
filesPath | The full path to the evtx files on the source (for example: \\servermae\D$\logs\Application.evtx). Note - if "filesPath" is used its mandatory that "unc" should NOT be used. | Text | Optional |
Add Folder
Key | Description | Values |
|
api | The API type to use – must be addFolder | “addFolder” | Mandatory |
folderPath | The full path to the folder to be added | ROOT = Top Folder (Folders and Logs) Use ‘->’ in the path between folders | Mandatory |
Key | Description | Values |
|
api | The API type to use – must be removeMember | “removeMember” | Mandatory |
folderPath | The full path to the folder to be removed | ROOT = Top Folder (Folders and Logs) Use ‘->’ in the path between folders | Mandatory |
Key | Description | Values |
|
api | The API type to use – must be removeMember | “removeMember” | Mandatory |
logPath | The full path to the log to be removed | ROOT = Top Folder (Folders and Logs) Use ‘->’ in the path between folders | Mandatory |
Key | Description | Values |
|
api | The API type to use – must be license | “license” | Mandatory |
files | The path (relative to execution location or absolute path) to the license file which will be updated | Text | Mandatory |
Key | Description | Values |
|
api | The API type to use – must be settings | “settings” | Mandatory |
appTags | A comma separated list of AppTags names (exactly as defined in XPLG) | Text | Mandatory |
timeZone | A single time zone from JAVA available time zones (The time zone should be exactly as appears in the time zones list, in case XPLG will not be able to find that given value, default system time zone will be applied automatically. Use "Default" to apply the time zone to the system default time zone) | Text | Mandatory |
Key | Description | Values |
|
api | The API type to use – must be restart | “restart” | Mandatory |
Key | Description | Values |
|
api | The API type to use – must be addPatch | “addPatch” | Mandatory |
files | The path (relative to execution location or absolute path) to the patch file | Text | Mandatory |
type | Patch type – must be “api” | “api” | Mandatory |
Comments:
Common Use Case: