logs

Log file API.

GET /logs/logs

Parameters

server
integer
query
optional
Filter by server, omit this to get logs from all servers.
service
array
query
optional
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>
priority
array
query
optional
Priorities to include as syslog levels, 0 = highest, 7 = lowest.
after
number
query
optional
Unix timestamp for the earliest log entry. Required if before is set to a concrete time.
before
number
query
optional
Unix timestamp for the latest log entry.
lines
integer
query
optional
Maximum number of lines to return.
cursor
string
query
optional
Continue after a given journal cursor as returned by a previous call.

Endpoint

curl -X GET http://mgmt-node:8080/api/logs/logs?server=0&service=string&priority=0&after=&before=&lines=0&cursor=string
                

Response 200

c
string
optional
Cursor for next requests.
t
number
optional
Unix timestamp.
m
string
optional
Log message.
s
string
optional
Service that generated this message, see o field for further information for OSD services.
h
integer
optional
Id of the host generating this message.
p
integer
optional
Priority as syslog level, 0 = highest, 7 = lowest

Example response

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

GET /logs

Parameters

server
integer
query
optional
Filter by server, omit this to get logs from all servers.
service
array
query
optional
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>
priority
array
query
optional
Priorities to include as syslog levels, 0 = highest, 7 = lowest.
after
number
query
optional
Unix timestamp for the earliest log entry. Required if before is set to a concrete time.
before
number
query
optional
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.
lines
integer
query
optional
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.

Endpoint

curl -X GET http://mgmt-node:8080/api/logs?server=0&service=string&priority=0&after=&before=&lines=0
                

Response 200

type
object
optional
-
closed
boolean
optional
-

Example response

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