get_log_file
To get FE log via HTTP
Types of FE log
- fe.audit.log (Audit log)
The audit log records the all statements executed. Audit log’s name format as follow:
1. fe.audit.log # The latest audit log
2. fe.audit.log.20190603.1 # The historical audit log. The smaller the sequence number, the newer the log.
3. fe.audit.log.20190603.2
4. fe.audit.log.20190602.1
5. ...
Example
- Get the list of specified type of logs
Example
curl -v -X HEAD -uuser:passwd http://fe_host:http_port/api/get_log_file?type=fe.audit.log
Returns:
1. HTTP/1.1 200 OK
2. file_infos: {"fe.audit.log":24759,"fe.audit.log.20190528.1":132934}
3. content-type: text/html
4. connection: keep-alive
In the header of result, the file_infos section saves the file list and file size in JSON format.
2. Download files
Example:
1. curl -X GET -uuser:passwd http://fe_host:http_port/api/get_log_file?type=fe.audit.log\&file=fe.audit.log.20190528.1
Notification
Need ADMIN privilege.
