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.

Removing stale and obsolete Volumes/interfaces data from NPM

Hello All,

I have large number of over 3000 stale interfaces/volumes/hardware sensors in NPM. Is there any Ideal and easy way to search -select and delete these through backend SQL commands on the database?

or  I have to go through one by one and delete them from the UI. Is that the only option?

Thanks in Advance,

Chetz

  • Hello... that should be possible via Orion API through Orion SDK (Orion SDK Information).

    You just need to know the uri of the object, which you're about to delete. The objects incl. their statistical data will be deleted with the next DB maintenance (e.g. interfaces are moved from Interfaces->DeletedInterfaces table)

    Example for PowerShell:

    #region PSSnapin presence check/add

    if (!(Get-PSSnapin -Name "SwisSnapin" -ErrorAction SilentlyContinue))

      {

      Add-PSSnapin SwisSnapin -ErrorAction SilentlyContinue

      }

    #endRegion

    $Target="localhost"

    # Connect to SWIS with default admin credentials

    $swis = Connect-Swis -host $Target -UserName admin -Password ""

    ##selects interfaces and deletes. Filter the select by your needs (sends for removal by database maintenance)

    (Get-SwisData $swis "Select Uri from Orion.NPM.Interfaces") |Remove-SwisObject $swis

    I hope it helps.

    H.

  • Thanks for the Quick reply Jan.

    what is URI and How do I get the URI of the objects? Interfaces/volumes?

    Is there any similar SQL query that can be executed on the Database manager on Primary poller?

    thanks,

    Chetz

  • Hi, you get the uri exactly as I written - by query against SolarWinds Information Service V3 (use some scripting language or SWQL studio, bundled with Orion SDK). You won't find uri in DB in those tables as it's in-memory generated unique identifier (consisting from information like hostname, namespace, name of entity and primary keys). Those API operations have associated also the backend operations, which cause cleanup by DBM. SQL executes only what you give it.

    H.

  • Orion Platform 2019.2 includes the ability to automatically delete these 'unknown' volumes. For more information, check the link below.

    https://thwack.solarwinds.com/docs/DOC-204353#jive_content_id_Automatic_Removal_of_Unknown_Volumes