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.

Enable Hardware Health Sensors via sdk

Looking for some help if it is possible to trigger the following SQL query via the SDK.  I keep finding nodes that do not have the hardware sensors enabled, and thinking might be beneficial to routinely run this in order to try to keep up.  Preference is to utilize Python, just not sure how to 'translate' this query into something that the API's can use.

https://support.solarwinds.com/SuccessCenter/s/article/Enable-Hardware-Health-Sensor-in-bulk-using-SQL-query

INSERT INTO dbo.[NodeSettings] (NodeID, SettingName, SettingValue)
SELECT
n.NodeID,
'NeedsInventory',
'HWH'
FROM Nodes n
LEFT JOIN APM_HardwareInfo hw
ON (n.NodeID = hw.NodeID)
WHERE n.ObjectSubType = 'SNMP'
AND hw.NodeID IS NULL
AND n.NodeID NOT IN (SELECT
NodeID
FROM dbo.[NodeSettings]
WHERE SettingName = 'NeedsInventory'
AND SettingValue = 'HWH')