Skip to content

Task/add health check to /iot/about /metrics and /ready#1764

Open
AlvaroVega wants to merge 31 commits intomasterfrom
task/add_health_middleware
Open

Task/add health check to /iot/about /metrics and /ready#1764
AlvaroVega wants to merge 31 commits intomasterfrom
task/add_health_middleware

Conversation

@AlvaroVega
Copy link
Member

@AlvaroVega AlvaroVega commented Feb 27, 2026

fix for #1763

  • Update doc
  • new config env vars: IOTA_HEALTH_CHECK_INTERVAL, IOTA_HEALTH_CHECK_TIMEOUT, IOTA_HEALTH_CHECK_DOWN_AFTER_FAILS
  • Add Test

This produces:
curl -i -X GET http://localhost:4052/iot/about

{
"libVersion":"4.13.0-next",
"port":"4052",
"baseRoot":"/",
"version":"3.13.0-next",
"connections":{
  "contextBroker":{
     "ok":true,
     "configured":true,
     "url":"http://iot-orion:1026",
     "lastOk":"2026-02-27T13:28:53.484Z",
     "lastError":null,
     "latencyMs":7,
     "consecutiveFails":0},
  "iotagentManager":{"ok":true,"configured":true,"url":"http://iot-iotagent-manager:8082","lastOk":"2026-02-27T13:28:53.494Z","lastError":null,"latencyMs":17,"consecutiveFails":0},
  "mongodb":{"ok":true,"configured":true,"url":"mongodb://iot-mongo:27017/iotajson","lastOk":"2026-02-27T13:28:53.482Z","lastError":null,"latencyMs":5,"consecutiveFails":0},
  "mqtt":{"ok":true,"configured":true,"url":"mqtt://iot-mosquitto:1883","lastOk":"2026-02-27T13:28:53.485Z","lastError":null,"latencyMs":7,"consecutiveFails":0}
}
}

curl -i -X GET http://localhost:4052/ready
HTTP/1.1 200 OK
X-Powered-By: Express
Fiware-Correlator: 930a1b27-da53-4fe4-91fb-db26e1b5809f
Content-Type: application/json; charset=utf-8
Content-Length: 2
ETag: W/"2-vyGp6PvFo4RvsFtPoIWeCReyIC8"
Date: Fri, 06 Mar 2026 07:16:59 GMT
Connection: keep-alive
Keep-Alive: timeout=5

{}

@AlvaroVega AlvaroVega changed the title Task/add health middleware Task/add health check to /about Mar 2, 2026
@AlvaroVega AlvaroVega changed the title Task/add health check to /about Task/add health check to metrics and /ready Mar 4, 2026
@AlvaroVega AlvaroVega changed the title Task/add health check to metrics and /ready Task/add health check to /iot/about /metrics and /ready Mar 6, 2026
@AlvaroVega AlvaroVega marked this pull request as ready for review March 6, 2026 10:28
@AlvaroVega AlvaroVega requested a review from fgalan March 6, 2026 10:28
@@ -1,2 +1,3 @@
- Upgrade express dep from 4.21.2 to 4.22.1
- Upgrade markdown dep from 3.3.4 to 3.8.1
- Add to endpoint /about info about status of CB, IotaM, Mongo and MQTT broker (#1763)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • The new 4 env vars should be mentioned
  • The improvements in GET /metrics should be mentioned
  • The new operation GET /ready should be mentioned

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done into 707e1ba

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants