Advise a good healthcheck (for docker self tests or monit control) #1014
Replies: 3 comments
-
I don't know of such a situation... I probably update too often to get into a stuck state. What exactly would the symptoms be? |
Beta Was this translation helpful? Give feedback.
-
I wouldn't state that it happens friequently. Once upon a time my lovely Logitech Squeezebox Radio stopped connecting to LMS and I just restarted last one. I rather take care of general proactive monitoring and at the moment I scripted requesting [.../settings/server/status.html] and checking if the response headers contains [Server: Logitech Media Server]. |
Beta Was this translation helpful? Give feedback.
-
I think I'd rather use the JSON/RPC interface to get the % curl -sX POST -d '{"id":0,"params":["",["serverstatus"]],"method":"slim.request"}' http://myserver:9000/jsonrpc.js | jq .
{
"method": "slim.request",
"result": {
"info total duration": 6005098.22300003,
"other player count": 0,
"info total albums": 1657,
"newversion": "Eine neue Version von Logitech Media Server ist verfügbar (8.5.0 - 1709149164). <a href=\"/html/docs/picore-update.html?installerFile=https://downloads.slimdevices.com/nightly/logitechmediaserver-8.5.0-1709149164-noCPAN.tgz\" target=\"update\">Klicken Sie hier für weitere Instruktionen</a>.",
"info total genres": 77,
"version": "8.5.0",
"mac": "00:04:20:00:01:02",
"lastscan": "1708967551",
"uuid": "999999-9999-9999-9999-9999999999",
"httpport": "9000",
"player count": 1,
"info total artists": 604,
"ip": "192.168.y.x",
"info total songs": 22081
},
"id": 0,
"params": [
"",
[
"serverstatus"
]
]
} See https://lms-community.github.io/reference/using-the-cli/#jsonrpcjs |
Beta Was this translation helpful? Give feedback.
-
hello
I run an image lmscommunity/logitechmediaserver in docker enviriment and this is good to have it available. That's great!
And if the running mediaserver is exited because of error then the docker enviroment recreates it and this approach works pretty well.
However if the running mediaserver is mulfunctioning then it remains running this way and the docker enviroment doesn't restart it.
I would like to set up some system health checks for extra availability.
So I am asking to advise a representative healchcheck (kind of curl localhost:9000/status.json) to detect such situations and automate restarts or allarming.
Beta Was this translation helpful? Give feedback.
All reactions