I am working with the SQL team to see if there is a way to globally whitelist IP addresses that are causing alerts within sp_Blitz? Would like to have them exclude 5 IP addresses.
-
3When you say "causing alerts within sp_Blitz," can you be more specific about what you mean? The exact alert will determine whether it can be filtered or not - I don't think SQL Server tracks IP addresses in most of the things we filter on.– Brent OzarOct 9, 2019 at 20:50
-
Hi! Welcome to DBA Stack Exchange. Can you include the details on what "alert" you're referring to? Including the full text of messages is always helpful, and sometimes necessary for others to be able to help.– AMtwoOct 9, 2019 at 22:25
1 Answer
sp_Blitz doesn't have parameters to skip IP addresses since SQL Server doesn't store IP addresses for most of the activities.
However, you can skip specific checks altogether if you want. To do that, create a table like this:
CREATE TABLE dbo.SkipChecks (ServerName NVARCHAR(128), DatabaseName NVARCHAR(128), CheckID INT);
Then, you can add rows in there for the checks you want to skip. In the far right column of sp_Blitz's output, the CheckID is listed. (For a comprehensive list of checks and IDs, see the documentation.)
- ServerName = ‘MyServer, DatabaseName = NULL, CheckId = NULL – will not check anything on servername MyServer
- ServerName = NULL, DatabaseName = ‘MyDB’, CheckId = NULL – will not check MyDB on any server
- ServerName = ‘MyServer’, DatabaseName = ‘MyDB’, CheckId = NULL – will not check MyDB on MyServer
- ServerName = NULL, DatabaseName = NULL, CheckId = 5 – will skip CheckId 5 on all databases
- ServerName = NULL, DatabaseName = ‘MyDB’, CheckId = 5 – will skip CheckId 5 on MyDB
-
I don't think they want to skip the checks, was hoping to give them a way to exclude. those IPs from causing the alerts. Oct 9, 2019 at 21:23
-
@user192730 OK, cool - just let us know which checks in the question. Thanks! Oct 10, 2019 at 1:46