Operational Diagnostics Reports
Dependency Health Report
Score dependency health from failed and total counts and assign a status label.
Dependency Health Report
dependency_health.php
<?php
$failedDeps = ;
$totalDeps = 5;
$healthyDeps = $totalDeps - $failedDeps;
$depStatus = "green";
if ($failedDeps >= 3) {
$depStatus = "red";
} elseif ($failedDeps > 0) {
$depStatus = "watch";
}
echo "failed=" . $failedDeps . " healthy=" . $healthyDeps . " status=" . $depStatus . "\n";
<?php
$failedDeps = ;
$totalDeps = 5;
$healthyDeps = $totalDeps - $failedDeps;
$depStatus = "green";
if ($failedDeps >= 3) {
$depStatus = "red";
} elseif ($failedDeps > 0) {
$depStatus = "watch";
}
echo "failed=" . $failedDeps . " healthy=" . $healthyDeps . " status=" . $depStatus . "\n";
<?php
$failedDeps = ;
$totalDeps = 5;
$healthyDeps = $totalDeps - $failedDeps;
$depStatus = "green";
if ($failedDeps >= 3) {
$depStatus = "red";
} elseif ($failedDeps > 0) {
$depStatus = "watch";
}
echo "failed=" . $failedDeps . " healthy=" . $healthyDeps . " status=" . $depStatus . "\n";
dependency health
Dependency health scoring reduces a set of component checks to a single status label.