I’ve put in too many hours trying to get monitoring working from transactional replication latency. I was unable to find anything online that mimicked my issue. The issue was that in replication monitoring I was able to generate warnings for latency, but they weren’t writing to the application log to kick the alert. As a work around I used a sql alert based on Perfmon sql counters, that looked for latency over 60 secs. The counters I used were:
sql server:Replication Dist/Dist Latency
sql server:Replication Logreader/Logreader:Delivery Latency
I know this is a hack but it brought me down an untraveled path in the vast landscape of sql server which is leveraging the alerts. My only issue now is that they need to include all the Perfmon counters as it will save me a bundle in sitescope licenses. I know this can be done using the system monitor alerts, but too much maintenance and email infrastructure to work.