marcingminski / sqlwatch

SQL Server Performance Monitor
https://docs.sqlwatch.io
Other
420 stars 167 forks source link

[dbo].[usp_sqlwatch_internal_process_actions] is incompatible with expanding checks by sql_instance #402

Open kekcjkee opened 2 years ago

kekcjkee commented 2 years ago

Did you check DOCS to make sure there is no workaround? Yes

Describe the bug I have configured checks for all remote instances on the central repo. I am trying to set up alerts in telegrams. The procedure [dbo].[usp_sqlwatch_internal_process_actions] does not include remote instances (look screenshot). image image

To Reproduce Steps to reproduce the behavior:

  1. Configure Central Repo with "Expand Checks by SQL Instance"
  2. Add action for notifications (Powershell request to Telegram API in my case) by [dbo].[sqlwatch_config_check_template_action] for all remote instances in Central Repo

Expected behavior I would like to understand when receiving a notification on which server the problem exists.

Windows Server (please complete the following information):

SQL Server (please complete the following information):

SQL Server Management Studio (SSMS -> about -> copy info): SQL Server Management Studio 15.0.18369.0 SQL Server Management Objects (SMO) 16.100.46041.41 Microsoft Analysis Services Client Tools 15.0.19342.0 Microsoft Data Access Components (MDAC) 10.0.17763.1 Microsoft MSXML 3.0 6.0 Microsoft .NET Framework 4.0.30319.42000 Operating System 10.0.17763

SQLWATCH version (from DACPAC or from sysinstances)

kekcjkee commented 2 years ago

Addition to the issue: The problem is that it is impossible to determine from the notifications on which server the problem has occurred. Since the {SQL_INSTANCE} is substituted by @@SERVERNAME