Get metrics data

Use this resource to retrieve data about the internal server state. This includes memory usage, the number of running processes, and the maintenance mode status. You can use this data to continuously monitor an INUBIT application, for example with Prometheus.

To use this endpoint, an INUBIT monitoring license entry is required.

Request

To retrieve the metrics data, send a GET request to the endpoint defined below.

URL: /metrics

Method: GET

Authorization: required

GET /ibis/rest/metrics HTTP/1.1
Accept: application/json
Host: localhost:8080

Query Parameters

The following table lists the query parameters for this request.

Name Description Required Allowed values

format

Specify the output format of the response.

no (default: json )

  • json (default): Returns the response in JSON format.

  • xml: Returns the response in XML format.

  • prometheus: Returns the response in a format compatible with Prometheus.

Response

The response contains the requested metrics data.

HTTP/1.1 200 OK
Content-Type: application/json

{
  "serverName": "192.168.178.23",
  "serverId": "192.168.178.23",
  "maintenanceMode": 0,
  "blockingQueueEntries": 0,
  "maxBlockingQueueSize": 200000,
  "usedMemoryInMByte": 305.0,
  "freeMemoryInMByte": 462.0,
  "maxMemoryInMByte": 2048.0,
  "licensedThreads": 1500,
  "threadsInUse": 0,
  "maxThreadSize": 10,
  "privilegedThreadsInUse": 0,
  "maxPrivilegedThreads": 0,
  "users": {
    "root": {
      "WAITING": 0,
      "ERROR": 0,
      "OK": 2
    }
  },
  "groups": {}
}

Errors

This request might return one of the following error codes:

Authorization Failed (401)

Authorization with the given username and password failed. Please revisit both values and provide valid credentials.

<html>

    <head>
        <title>Status page</title>
    </head>

    <body style="font-family: sans-serif;">
        <p style="font-size: 1.2em;font-weight: bold;margin: 1em 0px;">Unauthorized</p>
        <p>The request requires user authentication</p>
        <p>You can get technical details <a
                href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2">here</a>.<br>
            Please continue your visit at our <a href="/">home page</a>.
        </p>
    </body>
</html>
Invalid value (404)

Returned if the format parameter value is invalid.

Server Error (500)

Execution on the INUBIT server failed. Have a look into the response message, otherwise access to the INUBIT log is required to retrieve further information.

Service Unavailable (503)

In maintenance mode the INUBIT server endpoint will not respond to incoming requests but return this error response. Once the maintenance mode is switched off the endpoint will respond normally.