Dataprocessor Log Files
This article provides information on dataprocessor log files and their management via the Logging API, which includes:
- Description of Logging Levels
- Available Dataprocessor Logging API commands
- Examples of using Logging API commands
- The full list of Packages and Default Logging Levels
- List of Log Files
Logging Levels
Log levels severity order: ERROR > WARN > INFO > DEBUG > TRACE
Informational events with the set log level and events with higher severity log levels are logged for packages; e.g. if a package has level INFO set, INFO, WARN and ERROR events will be logged for that package.
Dataprocessor Logging API
To find the <user>
/ <password>
values:
- Access the
dataprocessor
container - Open the
application.yml
file:cat /app/conf/application.yml
- Find the
<user>
/<password>
values underdata-processor
>security
>http
block
Commands that can be executed from the dataprocessor
container:
- Download log files:
curl -X GET <host>:8080/logs --output <file path>.zip <user>:<password>
- Get the current log level of a particular package:
curl -X GET <host>:8080/logs/level?pkg=<package> -u <user>:<password>
- Get a full list of packages with logging levels:
curl -X GET hostname.com:8080/logs/level
- Change the log level of a particular package:
curl -X POST <host>:8080/logs/level -d "level=<logLevel>&pkg=<package>" -u <user>:<password>
- If package is not specified, log levels of all packages are set to the
<logLevel>
- If package is not specified, log levels of all packages are set to the
Examples
Download log files to the logs.zip
file in the current directory:
root@dataprocessor:/app/conf# curl -X GET hostname.com:8080/logs --output logs.zip -u dataprocessor:JKQmXXXXXXXXX
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1596k 0 1596k 0 0 2186k 0 --:--:-- --:--:-- --:--:-- 2186k
Get the log level of the org.apache.http
package:
root@dataprocessor:/app/conf# curl -X GET hostname.com:8080/logs/level?pkg=org.apache.http -u dataprocessor:JKQmXXXXXXXXX
Log level for package [org.apache.http] is [INFO].
Change the log level of the com.metricinsights.collector.plugin.qliksense
package:
root@dataprocessor:/app/conf# curl -X POST hostname.com:8080/logs/level -d "level=WARN&pkg=com.metricinsights.collector.plugin.qliksense" -u dataprocessor:JKQmXXXXXXXXX
Log level for package [com.metricinsights.collector.plugin.qliksense] changed from [INFO] to [WARN].