1 Reply Latest reply on Sep 12, 2017 3:09 PM by mesverrum

    Retrieve node monitored resources with SWQL

    olivieri.dav

      Hello everyone,

       

      I am new to solarwinds and its database and I'd need a little help in crafting a SQWL query.

       

      I need to get all the monitored resources of a node the same I'd do through the webgui via the "List Resources" menu (here).

      The query, provided a nodeid (or a set of nodeid) should return the resources that are ticked in the "List Resources" view (the below is just an example from the web).

       

      Risultati immagini per solarwinds list resources

       

      I am unable to find how to get to this information by looking at the schema documentation.

      I believe it will be the result of a select on several joins but I do not understand whether I should start from Orion.Nodes or NCM.nodes.

       

      I am not a SQL savvy so any hint would be greatly appreciated!

       

      Thank you.

        • Re: Retrieve node monitored resources with SWQL
          mesverrum

          You would start with Orion.Nodes, as not all nodes would usually be in NCM.  Also the nodeid from ncm is a guid but the rest of the products just uses a regular integer for their nodeid, so when you try to join to anything in ncm you have to join the orion.nodes nodeid to the ncm.nodes.corenideid

          A decent starting point for this info would be Orion.Pollers but the data you are looking for is likely going to be spread across several different tables and your joins may involve a fair bit of case logic.