mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-27 15:54:03 +02:00
Health: more granular details
This commit is contained in:
parent
eb087bc8b2
commit
21dff9d6d9
@ -258,11 +258,15 @@ class Health
|
|||||||
$ts = $latest->getDeploymentTimestamp();
|
$ts = $latest->getDeploymentTimestamp();
|
||||||
$time = DateFormatter::timeAgo($ts);
|
$time = DateFormatter::timeAgo($ts);
|
||||||
if ($latest->succeeded()) {
|
if ($latest->succeeded()) {
|
||||||
$check->succeed('The last Deployment was successful ' . $time);
|
$check->succeed("The last Deployment was successful $time");
|
||||||
} elseif ($latest->isPending()) {
|
} elseif ($latest->isPending()) {
|
||||||
$check->warn('The last Deployment is still pending');
|
if ($ts + 180 < time()) {
|
||||||
|
$check->warn("The last Deployment started $time and is still pending");
|
||||||
|
} else {
|
||||||
|
$check->succeed("The last Deployment started $time and is still pending");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$check->fail('The last Deployment failed');
|
$check->fail("The last Deployment failed $time");
|
||||||
}
|
}
|
||||||
|
|
||||||
return $check;
|
return $check;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user