You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -653,6 +657,52 @@ The following metrics are available:
653
657
- `migrator_gin_migrations_applied{type="tenant_migrations_total"}`- migrator total tenant migrations applied (for all tenants)
654
658
- `migrator_gin_migrations_applied{type="tenant_scripts_total"}`- migrator total tenant scripts applied (for all tenants)
655
659
660
+
# Health Checks
661
+
662
+
Health checks are available at `/health` endpoint. migrator implements [Eclipse MicroProfile Health 3.0 RC4](https://download.eclipse.org/microprofile/microprofile-health-3.0-RC4/microprofile-health-spec.html) spec.
663
+
664
+
A successful response returns HTTP 200 OK code:
665
+
666
+
```json
667
+
{
668
+
"status": "UP",
669
+
"checks": [
670
+
{
671
+
"name": "DB",
672
+
"status": "UP"
673
+
},
674
+
{
675
+
"name": "Loader",
676
+
"status": "UP"
677
+
}
678
+
]
679
+
}
680
+
```
681
+
682
+
In case one of the checks has DOWN status then the overall status is DOWN. Failed check has `data` field which provides more information on why its status is DOWN. Health check will also return HTTP 503 Service Unavailable code:
683
+
684
+
```json
685
+
{
686
+
"status": "DOWN",
687
+
"checks": [
688
+
{
689
+
"name": "DB",
690
+
"status": "DOWN",
691
+
"data": {
692
+
"details": "failed to connect to database: dial tcp 127.0.0.1:5432: connect: connection refused"
693
+
}
694
+
},
695
+
{
696
+
"name": "Loader",
697
+
"status": "DOWN",
698
+
"data": {
699
+
"details": "open /nosuchdir/migrations: no such file or directory"
700
+
}
701
+
}
702
+
]
703
+
}
704
+
```
705
+
656
706
# Tutorials
657
707
658
708
In this section I provide links to more in-depth migrator tutorials.
0 commit comments