ArangoDB

HTTP Interface for Administration and Monitoring

This is an introduction to ArangoDB's Http interface for administration and monitoring of the server.




GET /_admin/log (reads the log information)

GET /_admin/log

Returns all fatal, error, warning or info log messages.

The returned object contains the attributes:

  • lid: a list of log-entry identifiers. Each log message is uniquely identified by its lid and the identifiers are in ascending order.
  • level: a list of the log-level of the log-entry.
  • timestamp: a list of the timestamp as seconds since 1970-01-01 of the log-entry.
  • text: a list of the text of the log-entry.
  • totalAmount: the total amount of log entries before pagination.

GET /_admin/log?upto=log-level

Returns all log entries upto log-level. Note that log-level must be:

  • fatal / 0
  • error / 1
  • warning / 2
  • info / 3
  • debug / 4

GET /_admin/log?level=log-level

Returns all log entries of log-level. Note that level= and upto= are mutably exclusive.

GET /_admin/log?size=size&offset=offset

Paginates the result. Skip the first offset entries and limit the number of returned log-entries to size.

GET /_admin/log?start=lid

Returns all log entries such that their log-entry identifier is greater or equal to lid.

GET /_admin/log?sort=direction

Sort the log-entries either ascending if direction is asc, or descending if it is desc according to their lid. Note that the lid imposes a chronological order.

GET /_admin/log?search=text

Only return the log-entries containing the text string.


GET /_admin/status (reads the system status)

GET /_admin/status

The call returns an object with the following attributes:

  • system.userTime: Amount of time that this process has been scheduled in user mode, measured in clock ticks divided by sysconf(_SC_CLK_TCK) aka seconds.
  • system.systemTime: mount of time that this process has been scheduled in kernel mode, measured in clock ticks divided by sysconf(_SC_CLK_TCK) aka seconds.
  • system.numberOfThreads: Number of threads in this process.
  • system.residentSize: Resident Set Size: number of pages the process has in real memory. This is just the pages which count toward text, data, or stack space. This does not include pages which have not been demand-loaded in, or which are swapped out.
  • system.virtualSize: Virtual memory size in bytes.
  • system.minorPageFaults: The number of minor faults the process has made which have not required loading a memory page from disk.
  • system.majorPageFaults: The number of major faults the process has made which have required loading a memory page from disk.


GET /_admin/connection-statistics (reads the connection statistics)

GET /_admin/connection-statistics?granalurity=granularity&figures=figures&length=length

The call returns statistics about the current and past requests. The following parameter control which information is returned.

  • granularity: use minutes for a granularity of minutes, hours for hours, and days for days. The default is minutes.
  • figures: a list of figures, comma-separated. Possible figures are httpConnections. You can use all to get all figures. The default is httpConnections.
  • length: If you want a time series, the maximal length of the series as integer. You can use all to get all available information. You can use current to get the latest interval.

The returned statistics objects contains information of the request figures.

  • resolution: the resolution in seconds aka granularity. The length of the time intervals.
  • start: a list of time stamps in seconds since 1970-01-01. Each entry marks the start of an interval for which the figures were computed. The length of the interval is given by resolution.
  • length: the number of returned intervals.
  • totalLength: the number of available intervals.
  • totalTime: the distribution of the total time.
  • queueTime: the distribution of the queue time.
  • httpConnections: the number of opened http connections during the interval.
  • httpDuration: the distribution of the duration of the closed http connections during the interval.

If length is current the figures for the current interval are returned.

Examples

A time-series:

> curl -dump http://localhost:8529/_admin/connection-statistics?granularity=minutes&length=all

{
  "resolution" : 60,
  "start" : [1341839640, 1341839700],
  "length" : 2,
  "totalLength" : 120,
  "httpConnections" : {
    "count" : [196372, 624436],
    "perSecond" : [3272.86, 10407.26]
  },
  "httpDuration" : {
    "cuts" : [0.1, 1, 60],
    "count" : [196365, 624434],
    "mean" : [0.000534, 0.0006742],
    "min": [0.0, 0.0],
    "distribution" : [[196260, 0, 105, 0], [624013, 0, 421, 0]]
  }
}

The current figures:

> curl -dump http://localhost:8529/_admin/connection-statistics?granularity=minutes&length=current

{
  "resolution" : 60,
  "start" : 1341839700,
  "httpConnections" : {
    "count" : 761678,
    "perSecond" : 12694.63
  },
  "httpDuration" : {
    "cuts" : [0.1, 1, 60],
    "count":761654,
    "mean" : 0.00065909192362936456,
    "min" : 0.0,
    "distribution" : [761152, 0, 502, 0]
  }
}


GET /_admin/request-statistics (reads the request statistics)

GET /_admin/request-statistics?granalurity=granularity&figures=figures&length=length

The call returns statistics about the current and past requests. The following parameter control which information is returned.

  • granularity: use minutes for a granularity of minutes, hours for hours, and days for days. The default is minutes.
  • figures: a list of figures, comma-separated. Possible figures are totalTime, queueTime, requestTime, bytesSent, and bytesReceived. You can use all to get all figures. The default is totalTime, bytesSent, and bytesReceived.
  • length: If you want a time series, the maximal length of the series as integer. You can use all to get all available information. You can use current to get the latest interval.

The returned statistics objects contains information of the request figures.

  • resolution: the resolution in seconds aka granularity. The length of the time intervals.
  • start: a list of time stamps in seconds since 1970-01-01. Each entry marks the start of an interval for which the figures were computed. The length of the interval is given by resolution.
  • length: the number of returned intervals.
  • totalLength: the number of available intervals.
  • totalTime: the distribution of the total time.
  • queueTime: the distribution of the queue time.
  • requestTime: the distribution of the request time.
  • bytesSent: the distribution of the number of bytes sent.
  • bytesReceived: the distribution of the number of bytes received.

A distribution contains the following fields:

  • count: a list describing the number of requests per time interval. This corresponds to the field start.
  • mean: a list describing the mean of the values per time interval. This corresponds to the field start.
  • max: a list describing the maximum of the values per time interval. This corresponds to the field start.
  • cuts: a list [N1, N2, ... Nx] of numbers defining the intervals for the figure. The first interval is [0 .. N1), the last interval is [Nx .. INF).
  • distribution: a list describing the distribution of the values per time interval. This corresponds to the field start. Each entry of the list is again a list. This list describes the number of requests per cut and corresponds to the fieldcuts}.

If length is current the figures for the current interval are returned.

Examples

A time-series:

> curl -dump http://localhost:8529/_admin/request-statistics?granularity=minutes&figures=all&length=all

HTTP/1.1 200 OK
{
  "resolution" : 60,
  "start" : [1341497760, 1341497820],
  "length" : 2,
  "totalLength" : 120,

  "totalTime" : {
    "cuts" : [0.01, 0.05, 0.1, 0.2, 0.5, 1],
    "count" : [1, 0],
    "mean" : [0.0, 0.0],
    "max" : [0.0, "-INF"],
    "distribution" : [[1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]]
  },

  "queueTime": { 
    "cuts" : [0.01, 0.05, 0.1, 0.2, 0.5, 1],
    "count" : [0, 0],
    "mean" : [0.0, 0.0],
    "max" : ["-INF", "-INF"],
    "distribution" : [[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]]
  },

  "requestTime" : {
    "cuts" : [0.01, 0.05, 0.1, 0.2, 0.5, 1],
    "count" : [1, 0],
    "mean" : [0.0, 0.0],
    "max" : [0.0, "-INF"],
    "distribution" : [[1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]]
  },

  "bytesSent" : {
    "cuts" : [250, 1000, 2000, 5000, 10000],
    "count" : [1, 0],
    "mean" : [1045, 0.0],
    "max" : [1045, "-INF"],
    "distribution" : [[0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0]]
  },
 
  "bytesReceived" : {
    "cuts" : [250, 1000, 2000, 5000, 10000],
    "count" : [1, 0],
    "mean" : [232, 0.0],
    "max" : [232, "-INF"],
    "distribution" : [[1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]
  }
}

The current figures:

> curl -dump http://localhost:8529/_admin/request-statistics?granularity=minutes&figures=all&length=current

HTTP/1.1 200 OK
{
  "resolution" : 60,
  "start" : 1341499020,

  "totalTime" : {
    "cuts" : [0.01, 0.05, 0.1, 0.2, 0.5, 1],
    "count" : 38611,
    "mean" : 0.000051798710212115704,
    "max" : 1,
    "distribution" : [38609, 0, 0, 0, 0, 0, 2]
  },

  "queueTime" : {
    "cuts" : [0.01, 0.05, 0.1, 0.2, 0.5, 1],
    "count" : 0,
    "mean" : 0.0,
    "max" : "-INF",
    "distribution" : [0, 0, 0, 0, 0, 0, 0]
  },

  "requestTime" : {
    "cuts" : [0.01, 0.05, 0.1, 0.2, 0.5, 1],
    "count" : 38611,
    "mean" : 0.000025899355106057852,
    "max" : 1,
    "distribution" : [38610, 0, 0, 0, 0, 0, 1]
  },

  "bytesSent" : {
    "cuts" : [250, 1000, 2000, 5000, 10000],
    "count" : 38611,
    "mean" : 204.18145088187304736,
    "max" : 6477,
    "distribution" : [38609, 1, 0, 0, 1, 0]
  },

  "bytesReceived" : {
    "cuts" : [250, 1000, 2000, 5000, 10000],
    "count" : 38611,
    "mean" : 131.0053352671518496208,
    "max" : 236,
    "distribution" : [38611, 0, 0, 0, 0, 0]
  }
}


GET /_admin/config/description (reads the configuration desciption)

GET /_admin/config/desciption

The call returns an object describing the configuration.


GET /_admin/config/configuration (reads the configuration)

GET /_admin/config/configuration

The call returns an object containing configuration.

Front-End Session Management


GET /_admin/user-manager/sessions (reads a front-end session)

GET /_admin/user-manager/session/sid

Returns an object with the following attributes describing the session sid.

  • sid: The session identifier.
  • rights: A list of rights for the newly created session.

Note that HTTP 404 is returned, if the session is unknown or expired.


POST /_admin/user-manager/sessions (creates a front-end session)

POST /_admin/user-manager/session

Creates a new session. Returns an object with the following attributes.

  • sid: The session identifier.
  • rights: A list of rights for the newly created session.


PUT /_admin/user-manager/sessions/.../login (logs in into a front-end session)

PUT /_admin/user-manager/session/sid/login

Logs an user into an existing session. Expects an object with the following attributes.

  • user: The user name.
  • password: The password. The password must be a SHA256 hash of the real password.


PUT /_admin/user-manager/sessions/.../logout (logs out from a front-end session)

PUT /_admin/user-manager/session/sid/logout

Logs out an user from the existing session.


PUT /_admin/user-manager/sessions/.../password (changes the password of a front-end session)

PUT /_admin/user-manager/session/sid/password

Changes the password of an user. Expects an object with the following attributes.

  • password: The password. The password must be a SHA256 hash of the real password.