.. _management_endpoint: ******************* Management Endpoint ******************* App Suite Proxy comes with an additional management endpoint which allows administrators and third party systems to get access to runtime environment. Following topics are currently covered: * Prometheus Metrics * Microprofile Health Check * Configuration Reload To enable management endpoint on startup set configuration property ``proxy.admin.port.enabled`` to ``true``. For a complete reference to all possible configuration properties and their defaults see section :ref:`Settings `. .. hint:: To get an overview of all exposed endpoints open root entry at **http://:** .. _Settings: Settings -------- .. note:: All properties can be found in ``application.properties``. If a property is missing, not set or the value is not in range the default value will be used. :proxy.admin.port.enabled: Enables Management Endpoint Default: ``false`` Reloadable: ``false`` EnvVar: ``PROXY_ADMIN_PORT_ENABLED`` :proxy.admin.port: The Management Endpoint Port. Supported port range 8081-9999 Default: ``8888`` Reloadable: ``false`` EnvVar: ``PROXY_ADMIN_PORT`` :proxy.admin.http.errorresponse.enabled: Get a detailed error message in case of any HTTP Error (4xx, 5xx). This property can be changed on runtime. Default: ``false`` Reloadable: ``true`` EnvVar: ``PROXY_ADMIN_HTTP_ERRORRESPONSE_ENABLED`` :proxy.health.default.procedures.enabled: Register default health check procedures. See :ref:`Developers Guide ` for prerequisites. Default: ``false`` Reloadable: ``false`` EnvVar: ``PROXY_HEALTH_DEFAULT_PROCEDURES_ENABLED`` :proxy.health.default.package: Classes within this package will be registered on server startup. See :ref:`Developers Guide ` for prerequisites. Default: ``io.ox.proxy.health.impl.checks`` Reloadable: ``false`` EnvVar: ``PROXY_HEALTH_DEFAULT_PACKAGE`` :proxy.health.jvm.threadcount.max: Health Check Threads- After exceeding this value the health check change to DOWN. Supported range 1 - Integer.MAX_VALUE. This property can be changed on runtime. Default: ``50`` Reloadable: ``true`` EnvVar: ``PROXY_HEALTH_JVM_THREADCOUNT_MAX`` :proxy.health.jvm.heapmemory.maxpercentage: Health Check Memory - After exceeding this value the health check change to DOWN. 0.01 -> 1%, 0.99 -> 99% of max heap. Supported range 0.01 - 0.99. This property can be changed on runtime. Default: ``0.9`` Reloadable: ``true`` EnvVar: ``PROXY_HEALTH_JVM_HEAPMEMORY_MAXPERCENTAGE`` :proxy.health.http: Health Check HTTP - If Endpoint is not available health check change to DOWN. If no value is present health check will be skipped. This property can be changed on runtime. Default: ```` Reloadable: ``true`` EnvVar: ``PROXY_HEALTH_HTTP`` :proxy.admin.openapi.enabled: Creates an additional Open API Endpoint when enabled. Endpoint is then available under ``{{baseUrl}}/openapi``, ``{{baseUrl}}/openapi.json``, ``{{baseUrl}}/openapi.yaml``. Must be set before Server Startup. Default: ``false`` Reloadable: ``false`` EnvVar: ``PROXY_ADMIN_OPENAPI_ENABLED`` :proxy.admin.properties.sanitizekeys: Property names containing one the given keys will be sanitized when exposing via HTTP API. The values of well known properties will be sanitized even if this parameter is not set. Those values are ``.password,.secret,.key.,.token,.credentials``. By setting this property keys will be added as additional keys to the list. Does not support regular expressions Default: ``false`` Reloadable: ``false`` :proxy.admin.properties.filter: Use positive filter where only property names matches the given value will be exposed via HTTP API. Leave this blank will disable the filter and lead to exposing all properties. Filter does not support regular expressions Default: ```` Reloadable: ``true`` Sample `````` A sample configuration may look like this: .. literalinclude:: config-examples/application-admin.properties :language: properties .. note:: This configuration will start the management listener on port 8888 and register all default health checks. Empty parameters will fall back to their default. Microprofile Health Check ------------------------- App Suite Proxy comes with an implementation of `Microprofile Health API `_. Some basic health checks are available by default and will be registered when enabled (see :ref:`Settings `). According to the API specification these health checks will be exposed to ``/health`` ``/health/live`` ``/health/ready``. Payload from ``http://:/health`` looks like the following example: .. literalinclude:: config-examples/health-payload.json :language: json Prometheus Metrics ------------------ Monitoring Metrics from server runtime will be exposed under ``/metrics``. The format follows the `Prometheus Format specification `_ . Payload from ``http://:/metrics`` looks like the following example: .. literalinclude:: config-examples/metrics-payload.txt :language: text Open API ------------------ Management Endpoint comes with an integrated Open API documentation which can be created while server startup, see section :ref:`Settings `. Once enabled the documentation is available at ``/openapi``, ``/openapi.yaml`` and ``/openapi.json``. ``/metrics``. Use this endpoint to import the payload in a tool of your choise e.g. Postman, or use ``/application.wadl`` to help with client generation. Payload from ``/openapi`` looks like the following example: .. literalinclude:: config-examples/openapi-payload.yaml :language: yaml