Working on a monitoring script to capture SQL server AlwaysON database latency.
Below are the values to be captured and compared to raise a alert
Latency Values to be captured and compared:
Last Connection Error If occurred?
Last Connection Error - If occurred?
last_sent_time - get date() - 30 minutes
log_send_queue_size - more than 512MB
redo_queue_size- more than 512MB