Skip to content

Alert if worker node is down #703

Answered by jhuckaby
bb3454 asked this question in Q&A
Dec 22, 2023 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

There's an undocumented API you can use. See this discussion here: #674

First, you need to create an administrative API key. That process is described here: #479

Then you can hit the new get_servers API, which will tell you which servers are up/down. Look for the disabled property inside each server object. It'll be set to true if the server is down.
Example:

http://mini.local:3012/api/app/get_servers?api_key=da323d6cb9c29a37a59bf95d1726920b&pretty=1
{
	"code": 0,
	"servers": {
		"mini.local": {
			"hostname": "mini.local",
			"ip": "192.168.3.46",
			"master": 1,
			"uptime": 95,
			"data": {
				"cpu": 5.7,
				"mem": 57663488
			},
			"disabled": 0
		},
		"joework.local": {
			"hostname"

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@jhuckaby
Comment options

@bb3454
Comment options

@jhuckaby
Comment options

Answer selected by jhuckaby
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants