A diagnostic report can combine failure and staleness signals into a compact health label without reading live host state.

Program

Play the program to choose failed checks and inspect the diagnostic signal.

diagnostic_signal_report.f90
program diagnostic_signal_report_demo
    implicit none
    integer :: failed_checks
    integer :: stale_minutes
    character(len=8) :: signal

    failed_checks = 
    stale_minutes = 12
    if (failed_checks >= 4) then
        signal = 'critical'
    else if (failed_checks > 0 .or. stale_minutes > 20) then
        signal = 'watch'
    else
        signal = 'clean'
    end if
    print '(A, I0, 1X, A, I0, 1X, A)', 'failed=', failed_checks, 'stale=', stale_minutes, trim(signal)
end program diagnostic_signal_report_demo
program diagnostic_signal_report_demo
    implicit none
    integer :: failed_checks
    integer :: stale_minutes
    character(len=8) :: signal

    failed_checks = 
    stale_minutes = 12
    if (failed_checks >= 4) then
        signal = 'critical'
    else if (failed_checks > 0 .or. stale_minutes > 20) then
        signal = 'watch'
    else
        signal = 'clean'
    end if
    print '(A, I0, 1X, A, I0, 1X, A)', 'failed=', failed_checks, 'stale=', stale_minutes, trim(signal)
end program diagnostic_signal_report_demo
program diagnostic_signal_report_demo
    implicit none
    integer :: failed_checks
    integer :: stale_minutes
    character(len=8) :: signal

    failed_checks = 
    stale_minutes = 12
    if (failed_checks >= 4) then
        signal = 'critical'
    else if (failed_checks > 0 .or. stale_minutes > 20) then
        signal = 'watch'
    else
        signal = 'clean'
    end if
    print '(A, I0, 1X, A, I0, 1X, A)', 'failed=', failed_checks, 'stale=', stale_minutes, trim(signal)
end program diagnostic_signal_report_demo
diagnostic signal The `signal` value stores the derived health label as ordinary program state.
combined condition The report checks both failure count and stale diagnostic age before printing.
static report The final row keeps raw diagnostic values beside the selected health label.