This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

If SQL application exists, set custom property.

My team handles all of the virtual infrastructure and the servers running on it. Our DBA team however is responsible for investigating performance alerts of our SQL servers. What I'm wanting to do is to base their alerts and incident creation off of a custom property on the SQL server VM node. However, I want to ensure that this custom property on the node is set automatically if the MSSQLSERVER and/or Basic MSSQL is on the server.

I thought about achieving this via alerts, but I'm stumped. Any ideas?

  • As part of an alert trigger you can set a custom property. Perhaps a trigger condition that if the node has AppInsight for SQL assigned and the custom property not set, then have the trigger action set the custom property? 

  • Thanks what I'm trying to figure out. I can't seem to make that happen. Since SQL is in App Insight, even though it's on the node, it's not a value or property of the node, so I'm not able to reference it.

  • You will want to create your own custom properties, and simply use the Alert Engine and the logic you provide to populate the value of the custom property you created. 

  • Thanks, I understood that part. I have my custom property created, and I use alerts for setting these custom properties. My issue is coming up with the logic within the alert to correlate the SQL identification and assign that to a custom property against the node.

  • My suggestion is dependent on how the node is configured to monitor ie: WMI, SNMP or etc.  If these nodes are set up with the WMI protocol and the Asset Inventory is checked in List Resources, then you could run an update query to update the node's custom property or you can set up an alert using a Custom SQL/SWQL Alert trigger condition.  I think the correct table to locate the SQL software is AssetInventory_Software.  Here's a snippet of what the Asset Inventory shows under Software Inventory.  Let me know if you need help building a query for it.  

  • I know in most of the environments I work in, I don't assign AppInsight for SQL to every single instance of SQL that is running, especially some of smaller SQL Express instances.

    An alternative might be to create a SAM template that looks for the sqlservr.exe process, assign it to all Windows servers, and then create an alert to set the custom property when the application monitor is up. If you don't want to have the template assigned permanently to all of your servers, you could just assign it temporarily to set the custom property and then, maybe, periodically to true it up.

  • I actually did a specific example of this as part of a thwack camp presentation.  Its the bottom video on this page

    thwack.solarwinds.com/.../optimize-all-the-things

  • Thanks! Sorry for the much delayed response. I'm circling back to this project. I'd love to be able to do this. Are you still willing/able to assist? SQL and SWQL is still very new to me, so I would love some assistance. I have a few ideas going this route for other custom properties we can set based on installed applications. Thanks!