Click the links for instructions on how to check the system status for the Nexus Personal Messaging components:
...
This article describes how to run health check and check logs and statistics for Hermod.
Expand |
---|
title | View application information |
---|
|
To check that Hermod is alive, and view the running instance id and version, use the following command. Make sure to use the correct port:
Code Block |
---|
title | Example: Health check |
---|
| GET https://my-hermod-server:20400/<contextPath>/info
Response 200 OK
Body
{
"id":"hermod.6d99c1",
"build":{
"version":"2.0.0.RELEASE",
"artifact":"cod-hermod",
"name":"Cod Hermod",
"group":"com.nexusgroup.cod.hermod",
"time":1497432675000
}
} |
|
Expand |
---|
title | Check application health |
---|
|
To check health information and status for the running Hermod, use the following command. Make sure to use the correct port: Code Block |
---|
title | Example: Health check |
---|
| GET https://my-hermod-server:20400/<contextPath>/health
{
"status":"UP",
"diskSpace":{
"status":"UP",
"total":15442378752,
"free":2757484544,
"threshold":10485760
},
"db":{
"status":"UP",
"database":"PostgreSQL",
"hello":1
},
"configServer":{
"status":"UP",
},
"hystrix":{
"status":"UP"
}
} |
These are the built-in statuses: Status | DOWN | OUT_OF_SERVICE | UP | UNKNOWN |
|
Expand |
---|
|
To check the logs: Code Block |
---|
language | text |
---|
title | Example: Check logs |
---|
| # Login to the host
ssh user@machine
su - docker
# Check logs
cd compose/hermod
docker-compose logs -f --tail=100 |
|
Expand |
---|
|
Hermod stores metrics since the last restart. These can be viewed via a http request. To view the Hermod metrics: Code Block |
---|
language | text |
---|
title | Example: Check metrics |
---|
| # Find the current port for an Hermod instance (33700 in this case)
docker-compose ps | grep hermod_hermod
hermod_hermod_1 ./fatjar-entrypoint.sh app ... Up 0.0.0.0:33700->20400/tcp
# Use curl to get metrics (You can use https://jsonformatter.curiousconcept.com/ to format the output)
curl http://localhost:33600/<contextPath>/metrics
{
"mem":673568,
"mem.free":336830,
"processors":2,
"instance.uptime":57997012,
"uptime":58006488,
"systemload.average":0.0,
"heap.committed":579072,
"heap.init":112640,
"heap.used":242241,
"heap":1585664,
"nonheap.committed":96768,
"nonheap.init":2496,
"nonheap.used":94496,
"nonheap":0,
"threads.peak":50,
"threads.daemon":23,
"threads.totalStarted":2493,
"threads":49,
"classes":10343,
"classes.loaded":10343,
"classes.unloaded":0,
"gc.ps_scavenge.count":22,
"gc.ps_scavenge.time":294,
"gc.ps_marksweep.count":2,
"gc.ps_marksweep.time":142,
...
} |
|
Links