How to exclude SQL Error Log alerts for certain errors and clients?
PeterDanielsCRB
Posts: 126 Bronze 3
Apparently, our network admins use a port vulnerability scanner that causes a variety SQL Server Error Log errors. With the default settings, these fired SQL Monitor alerts, which sent a flood of email notifications to my team (my bad). I want to find a way to exclude these from SQL Monitor alerts. However, I would prefer not to just completely stop/exclude all alerts with these error #s as I would like to be notified when we get "real" errors. I considered excluding errors with messages that contained [CLIENT: ##.###.##.##] (the scanner IP address). Unfortunately, there are separate lines in the error log for the Error and the Message that contains the CLIENT IP. Any advice on handling this situation?
TIA,
-Peter
TIA,
-Peter
Tagged:
Answers
On a side note, for now, I am just not raising a medium alert unless the severity is >=21 (it was 20). That keeps us from getting spammed when the scanner runs, but does not give us alerts from "real" error log entries that are sev 20.
You just need to come up with some regex that will match a list of known errors that you want to ignore (granted you may not currently know all messages you want to ignore), and then filter those out in the same regex to ignore messages from the IP address. Though you did say in the initial email that the ClientIP address and messages were on different lines.
BTW, I have the medium alert severity set to >=10 to catch all non-info messages as well. I came across this cool website which helped me fine tune the solution, highly recommended. https://regexr.com/
/CLIENT: 12.34.56.78/
I couldn't find that interface on SSMS. Please advise!