Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
kcech committed Nov 9, 2020
1 parent 8e1b1ac commit b06ab71
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/api_docs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Contents:
api_docs/general_model
api_docs/security
api_docs/rate_limiting
api_docs/monitor_api
api_docs/services

The Application Programming Interface (API) of Sentilo defines a set of commands,
Expand Down
40 changes: 40 additions & 0 deletions docs/api_docs/monitor_api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
Monitor API (Beta)
==================

Since v1.9, Sentilo offers a internal monitor API that enables direct access to
useful real-time information of the API server. It can be also to remotely restart API server.

Monitor API run on a different port then public API. The default port number is *7081* and is configured in
/sentilo/sentilo-platform/sentilo-platform-server/src/main/resources/properties/config.properties
by property *monitor.port*:

..
monitor.port=7081

This API currently works with the Catalog Application token. You can find the catalog token in the Application
section of the Catalog.

.. note::

The catalog application token is very sensitive information, since it is used for admin operations. Make sure
you do store it in a private repository. Also make sure calls to the monitoring API are encrypted. See more in the
`Security section <./api_docs/services/security.html>`__


List of API resources in the monitoring API:

+--------------------------+--------+-----------------------------------------------------------------------------------+
| Resource | Method | Description |
+==========================+========+===================================================================================+
| /monitor/ping | GET | Simple service that responds with http code 200 if the server is up and running. |
+--------------------------+--------+-----------------------------------------------------------------------------------+
| /monitor/rl_input_status | GET | Returns values of global rate limiting (incoming requests), for the last hour. |
+--------------------------+--------+-----------------------------------------------------------------------------------+
| /monitor/metrics | GET | Returns a list of components with their metrics |
+--------------------------+--------+-----------------------------------------------------------------------------------+
| /monitor/restart | POST | Gracefully restarts the API server. No body needed. |
+--------------------------+--------+-----------------------------------------------------------------------------------+
| /monitor/force-restart | POST | Forces a restart of the API server. No body needed. |
+--------------------------+--------+-----------------------------------------------------------------------------------+

0 comments on commit b06ab71

Please sign in to comment.