If the standby server is unable to receive the WAL stream and the postgresql standby server gets restarted
postgres[123]: walreceiver FATAL: could not receive data from WAL stream: ERROR: requested WAL segment 123ABC has already been removed
then the check reports OK even if there is no replication active
POSTGRES_HOT_STANDBY_DELAY OK: DB "postgres" (host:localhost) 43172953448 and 0 seconds | time=0.08s replay_delay=43172953448;2048;4096 receive-delay=43174652600;2048;4096 time_delay=0;30;60
Without restarting the standby server the check correctly reports CRITICAL:
POSTGRES_HOT_STANDBY_DELAY CRITICAL: DB "postgres" (host:localhost) 42855064712 and 2866 seconds | time=0.08s replay_delay=42855064712;2048;4096 receive-delay=42855059928;2048;4096 time_delay=2866;30;60
If the standby server is unable to receive the WAL stream and the postgresql standby server gets restarted
then the check reports OK even if there is no replication active
Without restarting the standby server the check correctly reports CRITICAL: