Skip to main content

Get logs

GET 

/api/v4/logs

Get a page of server logs, selected with page and logs_per_page query parameters. In a licensed, enabled cluster, each node's lines follow a separator naming the node. If another node's logs can't be fetched, the request still succeeds and that node's separator is followed by a single JSON line with level set to error, msg set to Failed to fetch logs from node, failed_node set to true, and an error field describing the failure. If reading a node's log file stops at its time or size limit, that node's lines end with a JSON line with scan_limited set to true and scanned_back_to set to the timestamp of the oldest line read, if a line with a timestamp was read.

Permissions​

Must have manage_system permission.

Request​

Responses​

Logs retrieval successful