Skip to content

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

Merged
fgalan merged 34 commits into
masterfrom
task/add_health_middleware
Mar 11, 2026
Merged

Task/add health check to /iot/about /metrics and /ready#1764
fgalan merged 34 commits into
masterfrom
task/add_health_middleware

Conversation

@AlvaroVega

@AlvaroVega AlvaroVega commented Feb 27, 2026

Copy link
Copy Markdown
Member

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
Comment thread CHANGES_NEXT_RELEASE Outdated
@@ -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
Copy Markdown
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
Copy Markdown
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

Comment thread CHANGES_NEXT_RELEASE Outdated
Comment thread doc/api.md
AlvaroVega and others added 2 commits March 11, 2026 11:29
Co-authored-by: Fermín Galán Márquez <fgalan@users.noreply.github.com>
Co-authored-by: Fermín Galán Márquez <fgalan@users.noreply.github.com>
Comment thread CHANGES_NEXT_RELEASE Outdated

@fgalan fgalan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@fgalan
fgalan merged commit 9055fa8 into master Mar 11, 2026
8 checks passed
@fgalan
fgalan deleted the task/add_health_middleware branch March 11, 2026 10:40
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