XPLG SDK
Overview
The XPLG SDK provides a set of commands for remotely configuring various XPLG properties without accessing the GUI interface.
This document describes all available commands, parameters, and examples for using the SDK.
Available Functional Areas
Ports (HTTP, SSL, SHUTDOWN, AJP)
Enable/Disable Security
Enable/Disable Agent Mode
Add/Edit user
Add/Edit/Remove/Enable/Disable remote XPLG account
Add/Edit/Remove/Enable/Disable SSH account
Add/Edit/Remove/Enable/Disable AWS S3 account
Add/Edit/Execute Add Logs Directory task
Add/Edit/Execute dataSync task
Add Log
Add Folder
Remove existing folder/log
Apply a Time Zone for AppTags
Requirements
Download XPLG Client Jar ( )
XPLG Keystore File: Required when using HTTPS. Extract the zip file into the same directory as
xpologClient.jarto ensure a.keystorefile exists. (download here)Java Runtime Environment: Installed on the client machine executing the commands.
Network Connectivity: HTTP/S connection between the client machine and the XPLG server.
Command Syntax
Connection Parameters
In order to execute remote commands it is first required to provide connection parameters to the XPLG instance:
Connection Parameters
Key | Description | Values |
|
| The URL to the XPLG instance | URL | Mandatory |
| Authentication user name | Text | Optional (Mandatory if security is enabled) |
| Authentication password | Text | Optional (Mandatory if security is enabled) |
Example Base Command:
java -cp xpologClient.jar com.xpolog.sdk.client.XpoLogSDKClient -xpologURL http://<xpolog-machine>:<xpolog-port>/logeye -user USER_NAME -password PASSWORD
Connection Variables for Scripts
Windows:
set JAVA_RUN=java -cp xpologClient.jar com.xpolog.sdk.client.XpoLogSDKClientset XPLG_CONN=-xpologURL 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="-xpologURL <http://<xpolog-machine>>:<xpolog-port>/logeye -user USER_NAME -password PASSWORD"
Once connection parameters are set, all SDK commands can reference %JAVA_RUN% %XPLG_CONN% (Windows) or $JAVA_RUN $XPLG_CONN (Linux).
Command Sections
The following sections provide the available APIs, parameters, and usage examples.
General Settings and Security Commands
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 XPLG's user Time Zone Mode to System (Default) | true/false | Optional |
activateDynamicTimeZone | Set the XPLG's user Time Zone Mode to Dynamic | true/false | Optional |
activateAppTagsTimeZone | Set the XPLG's user Time Zone Mode to per AppTags | true/false | Optional |
Example – Configure Ports:
%JAVA_RUN% %XPLG_CONN% -api settings -httpPort 30304 -sslPort 30444 -ajpPort 8010 -shutdownPort 8096 -agentMode true -activateSecurity trueExample – Change Time Zone Mode:
%JAVA_RUN% %XPLG_CONN% -api settings -activateAppTagsTimeZone true
Security Users Parameters
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 |
Example – Add User:
%JAVA_RUN% %XPLG_CONN% -api securityUsers -name testUser -userPassword testPassword -displayName "TEST USER" -override true -userPolicy test -selectedGroupsList testgroup;All
Accounts Management
Remove Account
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 |
Example – Remove Account:
%JAVA_RUN% %XPLG_CONN% -api removeAccount -name "ACCOUNT_NAME"
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 |
Example – Disable Account:
%JAVA_RUN% %XPLG_CONN% -api enableAccount -name "ACCOUNT_NAME" -enabled false
Add SSH Account Parameters
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 |
Example - Add SSH account:
%JAVA_RUN% %XPLG_CONN% -api addSSHAccount -name "ACCOUNT_NAME" -hostName MACHINE_IP -conType SFTP -port 22 -override true -enabled true -privateKeyPath "" -username USER_NAME -userPassword PASSWORD
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 |
Example - Add Remote XPLG Account:
%JAVA_RUN% %XPLG_CONN% -api addRemoteXpoLogAccount -name "ACCOUNT_NAME" -hostName MACHINE_IP -conType HTTP -port 30303 -context logeye -override true -enabled true -isCollected true -username admin -userPassword admin
Add AWS S3 Account Parameters
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 |