General
XpoLog SDK provides a set of commands that enables remote configuration of different XpoLog properties without accessing the GUI.
The following commands are available
...
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 | ||
filesPath | The full path to the files on the source (name pattern may be used) | Text | Mandatory | ||
accountName | The name of the account to be used if needed (SSH or Win Account) | Text | charset | The charset definition of the added log | Direct Access - Optional |
timezone | The timezone definition of the added log | Text (a value from JAVA time zone list) | Optional | ||
Text (a value from JAVA 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 | ||
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 | Mandatory | dataFilterQuery | The 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 |
Example for adding a log over SSH using an existing account (for direct access simple remove the -accountName parameter):
Windows:
%JAVA_RUN% %XPOLOG_CONN% -api addLog -logName "LOG_NAME" -logPath "ROOT->FOLDER_1->FOLDER_2" -filesPath "/var/log/messages{string}" -accountName "REMOTE_SOURCE_ACCOUNT" -template "LOG_TEMPLATE_NAME"
Linux:
" -filesPath "c:\LogFiles\messages{string}" -patterns " {date:Date,dd/MM/yyyy HH:mm:ss.SSSSSS} {text:priority} {string:message}XPLG_SDK_SEP{date:Date,dd/MM/yyyy HH:mm:ss.SSS} {text:priority} {string:message}" -appTags "APP_TAG_NAME_1,APP_TAG_NAME_2"
%JAVA_RUN% %XPOLOG_CONN% -api addLog -logName "LOG_NAME" -logPath "ROOT->FOLDER_1->FOLDER_2" -filesPath "c:\LogFiles\messages{string}" -template "LOG_TEMPLATE_NAME"
Linux:
$JAVA_RUN $XPOLOG_CONN -api addLog -logName "LOG_NAME" -logPath "ROOT->FOLDER_1->FOLDER_2" -filesPath "c:\LogFiles\messages{string}" -patterns " {date:Date,dd/MM/yyyy HH:mm:ss.SSSSSS} {text:priority} {string:message}XPLG_SDK_SEP{date:Date,dd/MM/yyyy HH:mm:ss.SSS} {text:priority} {string:message}" -appTags "APP_TAG_NAME_1,APP_TAG_NAME_2"
$JAVA_RUN $XPOLOG_CONN -api addLog -logName "LOG_NAME" -logPath "ROOT->FOLDER_1->FOLDER_2" -filesPath "/var/log/messages{string}" -accountName "REMOTE_SOURCE_ACCOUNT" -template "LOG_TEMPLATE_NAME"
Remove Folder
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 |
...