Oracle Standby instance monitoring


I’m looking for a script that will check to make sure logs are shipped and applied to a oracle standby node.

I can run this query under the oracle user, but not nagios. (as sydba). Nagios says the instance is unavailable.
SQL select process, pid, status, client_process, group# “Stdby Redo Log Gr”, block# from v$managed_standby

Anyone have or know of a script to alarm if the MRP is in waiting_gap mode, and logs are not being applied?
Seems pretty typical idea that people would want to make sure an oracle standby box is getting and applying the logs.