HI all,
This is related to the following posting:
Mass Editing Nodes? Juniper J/M/SRX Series CPU/Mem Monitoring
I have taken the SQL there and adjusted it to meet our needs to add CPU and Memory monitoring to multiple nodes.
The next thing I would like to be able to do is add 'Asset Inventory' to multiple nodes using the same method.
I've trailed adjusting the SQL section:
SELECT NodeID AS NodeID, 'Core.NeedsInventory' AS SettingName, 'Cpu:Memory:Asset Inventory' AS SettingValue
with variations of 'Asset', and 'Asset Inventory' where 'CPU' and 'Memory' as keywords work fine but not had success yet.
Can anyone tell me what the keyword would be in such an SQL script, or if it can even be done?
The full SQL I am using is below, note that where it states:
AND (LOWER(MachineType) LIKE '%Windows 2008 R2 Server%')
this can be adjusted to make changes to various different machine types.
Specifically I am trying to modify the:
SELECT NodeID AS NodeID, 'Core.NeedsInventory' AS SettingName, 'Cpu:Memory:Asset Inventory' AS SettingValue
section to successfully add the asset inventory to multiple nodes at once, where CPU and Memory already works.
Thanks for any input,
CRe
FULL SQL:
FULL SQL |
---|
--Begin change INSERT INTO dbo.[NodeSettings] SELECT NodeID AS NodeID, 'Core.NeedsInventory' AS SettingName, 'Cpu:Memory:Asset Inventory' AS SettingValue FROM dbo.[Nodes] WHERE ObjectSubType = 'SNMP' AND (LOWER(MachineType) LIKE '%Windows 2008 R2 Server%') AND NodeID NOT IN (SELECT NodeID FROM dbo.[NodeSettings] WHERE SettingName = 'Core.NeedsInventory') |