Is there a method to delete a completed network discovery via the API? I've successfully automated the addition of nodes through the network discovery but would like to do cleanup afterwards so that those discoveries don't pile up.
No, there is not a method to delete discovery profiles. However, you may be able to avoid needing to do the cleanup later using this method. From https://github.com/solarwinds/OrionSDK/wiki/Discovery:
Set the
IsHidden
option totrue
to cause the discovery profile to be removed after the discovery completes. Leave itfalse
for the discovery profile to stick around, which would allow you to run it again in the future from the Orion website.
Using IsHidden=true actually does NOT delete the profile from the database. It only hides the profile from being displayed in the SolarWinds discovery web page.
Since SolarWinds requires a re-scan to re-discover newly added filesystems, we've a nightly re-scan of all servers, but with >1000 servers that was adding 1000+ discovery jobs every night and after not very long there are many hidden profile discovery jobs which actually have caused the Configuration Wizard problems as it has to process them all (making the config wizard run very slow). As such, I had to write a task to run nightly that runs a SQL to delete the unneeded discovery jobs (the names are unique from other jobs making it easy to filter on the profiles to delete).
Would love either for SolarWinds to auto-rescan nodes to find new filesystems or would love the SDK to have an option to actually delete the profile discovery job
SolarWinds solutions are rooted in our deep connection to our user base in the THWACK® online community. More than 195,000 members are here to solve problems, share technology and best practices, and directly contribute to our product development process.