Quantcast
Channel: THWACK: Message List
Viewing all articles
Browse latest Browse all 20490

Re: Re: Group Seletion via Dynamic Query against two Object field types??

$
0
0

Alex Soul

 

I'm not sure about elegant, but a workaround alright.

If you had a Node custom property called NodeTest, you create an Application custom property (say) NodeTestCopy of the same data type. The Node property can have a drop down of values but the Application one need not

 

Create a SQL Trigger using the following trigger definition and modify the property names in italics as appropriate

 

CREATE TRIGGER [dbo].[CopyNodeCPtoAppCP]

  ON [dbo].[Nodes]

  AFTER UPDATE, INSERT

  AS

    BEGIN

UPDATE APM_ApplicationCustomProperties

SET APM_ApplicationCustomProperties.NodeTestCopy = b.NodeTest

FROM APM_ApplicationCustomProperties a,  Nodes b, APM_Application c

WHERE a.ApplicationID=c.ID AND b.NodeID=c.NodeID

  END

 

This trigger will update copy over the Node custom property to all the application monitors on the corresponding node, whenever you update your Node custom property. So, you only need to manage this custom property once. Whenever (in the future) all the node custom properties are made available to select for Application objects as well, it should be an easy change to swap the dynamic query definition and delete this Application custom property & the trigger

 

p.s: This would fall in the unsupported category for sure, but this one shouldn't cause any issues.


Viewing all articles
Browse latest Browse all 20490

Trending Articles



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