Web server monitoring

Requests

HTTP verb Endpoint Description

GET

/api/monitor/v1/websrv/cert

Reloading certificates

GET

/api/monitor/v1/websrv/sessions

Web sessions

For all requests:
Domain type: master

Reloading certificates

Reloading SSL/TLS role certificates ws from disk.
The first implementation of reloading only clears the ssl module cache, which can be applied after installing new certificates on top of old ones.
If the certificates were not installed or were invalid when the role was loaded ws and the https port was not opened,
then this operation will not cause it to be opened, for this it is necessary to reload the role for now ws.
A second implementation of reloading is planned, which will dynamically open or close the https port depending on the validity/invalidity of the
of certificates (as well as the key) when requested.

Request

Table 1. Request parameters
Specification Description

Name: mode
Type: str
Default: clear

Mode of operation. Possible values:

  • clear - clear the certificate cache, which will cause new certificates to be downloaded from disk at the next request.

Name: site
Type: str
Default: not defined

Filter by site(s). Possible values:

  • unspecified - all sites.

  • comma-delimited list.

Request example
GET /api/monitor/v1/websrv/cert?mode=clear&site=central,site2 HTTP/1.1

Response

Response example
HTTP/1.1 200 OK

{
  "resultcode": 0,
  "resultmsg": "OK",
  "data": {
    "sites": [
      {
        "site": "central",
        "servers": [
          {
            "node": "ws1@192.168.0.32",
            "status": "ok"
          }
        ]
      }
    ]
  }
}

Web sessions

Displays open web sessions and allows you to force close them depending on the mode.

Request

Table 2. Request parameters
Specification Description

Name: mode
Type: str
Default: current

Mode of operation. Possible values:

  • current - display open web sessions.

  • logout - close all user sessions in the domain.

  • close - close the session by identifier.

Name: domain
Type: str

The domain for closing sessions.

The parameter is mandatory when ?mode=logout is requested and is ignored in other cases.

Name: user
Type: str

User to close sessions. Accepts either the id or login of the entity user

The parameter is mandatory when ?mode=logout is requested and is ignored in other cases.

Name: session_id
Type: str

Session ID for closing.

The parameter is mandatory when ?mode=close is requested and is ignored in other cases.

Name: site
Type: str
Default: not defined

Filter by site. Possible values:

  • unspecified - all sites.

  • comma-delimited list.

The parameter is applied in all modes.

Request example
GET /api/monitor/v1/websrv/sessions?site=central HTTP/1.1

Response

Response example
HTTP/1.1 200 OK

{
  "resultcode": 0,
  "resultmsg": "OK",
  "data": [
    {
      "domain": "master.domain",
      "login": "adminma",
      "session_id": "1e55f2af-0176-8439-9262-e0d55e0cd303",
      "session_type": "http",
      "site": "central",
      "ttl": 40062,
      "user_id": "37eca732-016d-2962-dbfa-e0d55e0cd303"
    },
    {
      "domain": "worker.domain",
      "login": "admin",
      "session_id": "2dc39d67-0176-8566-b18c-e0d55e0cd303",
      "session_type": "http",
      "site": "central",
      "ttl": 40088,
      "user_id": "37eca732-016d-2962-dbfa-e0d55e0cd303"
    },
    {
      "connections": [
        {
          "conn_id": "15ae8d70-0176-8591-3b89-e0d55e0cd303",
          "is_pid_alive": true,
          "node": "ws1@192.168.0.32",
          "pid": "<0.7488.0>"
        }
      ],
      "domain": "master.domain",
      "login": "adminma",
      "session_id": "1e55f2af-0176-8439-9262-e0d55e0cd303",
      "session_type": "websocket",
      "site": "central",
      "ttl": 40062,
      "user_id": "37eca732-016d-2962-dbfa-e0d55e0cd303"
    }
  ]
}