Хотелка: HTTP ping

Mini web-сервер для печати чеков на фискальных регистраторах из мобильных приложений через HTTP запрос JSON.
Аватара пользователя
Сообщения: 224
Зарегистрирован: 16 май 2017, 08:36

Хотелка: HTTP ping

Сообщение Вторник » 06 июл 2020, 17:35

Для задач мониторинга очень хочется иметь сабж. Такой, как здесь:
/ping HTTP endpoint

The ping endpoint accepts both GET and HEAD HTTP requests. Use this endpoint to check the status of your InfluxDB instance and your version of InfluxDB.


GET http://localhost:8086/ping
HEAD http://localhost:8086/ping

verbose option

By default, the /ping HTTP endpoint returns a simple HTTP 204 status response to let the client know that the server is running. Default value is false. When verbose option is set to true (/ping?verbose=true), an HTTP 200 status is returned. The verbose=true option is required for Google Cloud Load Balancing health checks.
или здесь:

You can ‘ping’ the Kapacitor server to validate you have a successful connection. A ping request does nothing but respond with a 204.

NOTE: The Kapacitor server version is returned in the X-Kapacitor-Version HTTP header on all requests. Ping is a useful request if you simply need the verify the version of server you are talking to.


GET /kapacitor/v1/ping


| Code | Meaning |
| ---- | ------- |
| 204 | Success |