mirror of
https://github.com/hanzoai/deploy.git
synced 2026-10-07 08:44:50 +00:00
21 lines
532 B
Lua
21 lines
532 B
Lua
local hs = {}
|
|
if obj.status ~= nil and obj.status.health ~= nil then
|
|
if obj.status.health == "green" then
|
|
hs.status = "Healthy"
|
|
hs.message = "Logstash status is Green"
|
|
return hs
|
|
elseif obj.status.health == "yellow" then
|
|
hs.status = "Progressing"
|
|
hs.message = "Logstash status is Yellow"
|
|
return hs
|
|
elseif obj.status.health == "red" then
|
|
hs.status = "Degraded"
|
|
hs.message = "Logstash status is Red"
|
|
return hs
|
|
end
|
|
end
|
|
|
|
hs.status = "Progressing"
|
|
hs.message = "Waiting for Logstash"
|
|
return hs
|