cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 10

List components that do not inherit from template

Jump to solution

I am trying to standardize a bunch of APM checks. I would really like to be able to see what components have a setting that is not inheriting from the template.  We are trying to force everyone to use templates and not override templates to make the same change on multiple servers.  I am trying to go back and find all the ones that were changed to not inherit that should not have been.  I have a lot of components and it takes a long time.  If I could create a custom report that listed all the components and their associated server that is set to not inherit, this would save me a ton of time.

0 Kudos
1 Solution

This query will list all settings which are currently overridden on application level (not inherited from template):

SELECT n.Caption as Node, a.Name as Application, c.Name as Component, cs.[Key], cs.Value from APM_ComponentSetting cs
INNER JOIN APM_Component c ON cs.ComponentID = c.ID
INNER JOIN APM_Application a ON c.ApplicationID = a.ID
INNER JOIN Nodes n ON a.NodeID = n.NodeID

If you are interested only in credentials, add following where clause to filter other settings out:

WHERE cs.[Key] = '__CredentialSetId'

View solution in original post

7 Replies
Level 7

Apologies for resurrecting an old post but the Original SQL didn't work well for me. This, along with the fact that this is the main page I kept hitting when searching for a solution leads me to add this.

This modified SQL works and lists all components that deviate from their template along with their new thresholds

USE SWMonitoring

SELECT APM_Component.ID, APM_ApplicationTemplate.Name AS ApplicationTemplate, Nodes.Caption, APM_Component.Name AS Component, APM_Threshold.ThresholdName, APM_Threshold.Warning, APM_Threshold.Critical

FROM APM_Component

INNER JOIN APM_Application ON APM_Component.ApplicationID = APM_Application.ID

INNER JOIN APM_ApplicationTemplate ON APM_Application.TemplateID = APM_ApplicationTemplate.ID

INNER JOIN Nodes ON APM_Application.NodeID = Nodes.NodeID

LEFT JOIN APM_Threshold ON APM_Component.ID = APM_Threshold.ID

WHERE APM_Component.ID IN (SELECT ID FROM APM_Threshold WHERE IsTemplate = 0 AND ID IN (SELECT APM_Component.ID FROM APM_Component JOIN APM_Application ON APM_Application.ID = APM_Component.ApplicationID))

0 Kudos
Level 10

anyone find a way to do this? specifically I am looking for exceptions where the credentials have been overridden.

0 Kudos

This query will list all settings which are currently overridden on application level (not inherited from template):

SELECT n.Caption as Node, a.Name as Application, c.Name as Component, cs.[Key], cs.Value from APM_ComponentSetting cs
INNER JOIN APM_Component c ON cs.ComponentID = c.ID
INNER JOIN APM_Application a ON c.ApplicationID = a.ID
INNER JOIN Nodes n ON a.NodeID = n.NodeID

If you are interested only in credentials, add following where clause to filter other settings out:

WHERE cs.[Key] = '__CredentialSetId'

View solution in original post

0 Kudos

Thanks guys this is most helpful.

0 Kudos
Level 13

Hi andrew--

This looks like a feature request. I'll make sure the product managers see it.

M

0 Kudos

Did this progress any?

Thanks, Robert

0 Kudos