Quantcast
Channel: THWACK: Message List - Network Configuration Manager
Viewing all articles
Browse latest Browse all 8827

Re: Where configs are being stored ?

$
0
0

Should be fairly simple.    The config itself is contained in the NCM_ConfigArchive table.  If you're doing SWQL it would be the Cirrus.ConfigArchive table (not the NCM.ConfigArchive table! which doesn't have the config there from what I can tell).

 

So, a quick query might look like:

 

SELECT *

FROM [dbo].[NCM_ConfigArchive]

WHERE Config like '%searchtext%'

 

If you'd rather have something like the Node's name, IP Address and config, you'd have to join it with another table or two, maybe something like this which will find configs that haven't had a config change since the last reboot, but have downloaded a new copy of the RunningConfig.

 

SELECT TOP 10 ND.Caption, ND.IP_Address, NCA.Config

FROM NCM_ConfigArchive NCA

JOIN NCM_NodeProperties NNP ON (NCA.NodeID = NNP.NodeID)

JOIN NodesData ND ON (ND.NodeID = NNP.CoreNodeID)

WHERE (ConfigType = 'Running') AND (Config LIKE '%No configuration change%')

 

The same in SWQL would be:

 

SELECT TOP 10 N.Caption, N.IP_Address, CA.Config

FROM Cirrus.ConfigArchive CA

JOIN NCM.Nodes NNP ON (CA.NodeID = NNP.NodeID)

JOIN Orion.Nodes N ON (N.NodeID = NNP.CoreNodeID)

WHERE (ConfigType = 'Running') AND (Config LIKE '%No configuration change%')

 

One thing to watch out for is this table can become HUGE, so doing queries on it can cause things to time out.  The more you can cut down what it needs to search, the better.   If I took off "TOP 10" from either of these queries they time out on me.


Viewing all articles
Browse latest Browse all 8827

Trending Articles



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