Quantcast
Viewing all articles
Browse latest Browse all 12281

SQL Auto close alert not passing ${DatabaseName} in alert message

I created a component monitor in a SAM template that alerts when it detects a SQL database on a given node has Autoclose set to true=Critical, then built the associated advanced alert using property monitor 'APM: Component' to alert on.

 

Image may be NSFW.
Clik here to view.
SQL Component alert query for auto close.PNG

 

Here's the component monitor script used in the SAM template. 

 

SELECT

  count(*)

FROM

  master.sys.databases

WHERE

  is_auto_close_on = 1

 

Everything works, but in the message from Advanced Alert, I tried to parse the database name ${DatabaseName} so our DBA's know which one is set to auto close, and it comes up blank.

 

I was told by SW support that variables aren't supported across different property monitor alert types, so I wondered if my only option is to create a custom SQL alert in Advanced Alert using the same simple script and then build a custom message query?

 

Another option, I investigated was the available variables in the Advanced Alert property monitors for 'SQL AppInsight' , and see a lot of values to set up conditions, including the variable for ${DatabaseName} for my messaging portion, but nothing specific to the trigger condition of Auto-close I want to alert on. Haven't explored all of the options with AppInsight, so thought I'd mention it as perhaps another avenue I can use.

 

Thanks in advance.

 

Image may be NSFW.
Clik here to view.
AppInsight for SQL Advanced Alert property monitor options.png


Viewing all articles
Browse latest Browse all 12281

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>