logs

Log file API.

get /logs

Get a stream of log events.

Arguments
  • serveroptionalinteger

    Filter by server, omit this to get logs from all servers.

  • serviceoptionalarray

    Filter by systemd unit name, omit this to get logs from all services. The following names are special cased to map to the appropriate unit names: kernel,croit,hagroup,mon,mgr,mds,radosgw,iscsi,smb,osd.*,osd.<id>

  • priorityoptionalarray

    Priorities to include as syslog levels, 0 = highest, 7 = lowest.

  • afteroptionalnumber

    Unix timestamp for the earliest log entry. Required if before is set to a concrete time.

  • beforeoptionalnumber

    Unix timestamp for the latest log entry. Set to -1 to follow the log stream. If this is set to a concrete time, then after must also be set.

  • linesoptionalinteger

    Maximum number of lines to return. Will be ignored if an explicit time range is given with before and after. Controls the number of lines to go back from the current time when following a stream (i.e., before == -1), but it will still return more if more events occur.

Definition
get /logs
Attributes
  • typeobject

    -

    • typeNamestring

      -

  • closedboolean

    -

Example response
{ "type": { "typeName": "string" }, "closed": true }

get /logs/logs

Get log events from a server as JSON.

Arguments
  • serveroptionalinteger

    Filter by server, omit this to get logs from all servers.

  • serviceoptionalarray

    Filter by systemd unit name, omit this to get logs from all services. The following names are special cased to map to the appropriate unit names: kernel,croit,hagroup,mon,mgr,mds,radosgw,iscsi,samba,osd.*,osd.<id>

  • priorityoptionalarray

    Priorities to include as syslog levels, 0 = highest, 7 = lowest.

  • afteroptionalnumber

    Unix timestamp for the earliest log entry. Required if before is set to a concrete time.

  • beforeoptionalnumber

    Unix timestamp for the latest log entry.

  • linesoptionalinteger

    Maximum number of lines to return.

  • cursoroptionalstring

    Continue after a given journal cursor as returned by a previous call.

Definition
get /logs/logs
Attributes
  • cstring

    Cursor for next requests.

  • tnumber

    Unix timestamp.

  • mstring

    Log message.

  • sstring

    Service that generated this message, see o field for further information for OSD services.

  • hinteger

    Id of the host generating this message.

  • pinteger

    Priority as syslog level, 0 = highest, 7 = lowest

Example response
[ { "c": "string", "t": , "m": "string", "s": "string", "h": 0, "p": 0 } ]