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.

How can I get Recv Percent Utilization from HTTP API call?

Hi again,

I am working on another project where I need to get some information form the Solarwinds API. I am trying to make a request similar to

https://myhost.com:17778/SolarWinds/InformationService/v3/Json/Invoke/Orion.Alert/Acknowledge but instead of trying to acknowledge an alert, this time I just want to find out what the Recv Percent Utilization is of one of my Nodes.

Right now, I have an alert set up to notify me when the Recv Percent Utilization exceeds a certain threshold but I'd also like to be able to get this information out via an http request.

I downloaded the SDK Schema and tried to search for Recv Percent Utilization but no matter what I try, I can't find anything that looks like what I am looking for. Any help would be appreciated.

  • Receive percent utilization is a property of interfaces, not nodes.The relevant property is Orion.NPM.Interfaces.InPercentUtil. You can get the percent utilization numbers for all of the interfaces on a node with a query like this:

    SELECT InPercentUtil AS RecvPctUtil FROM Orion.NPM.Interfaces WHERE NodeID=103

    If you just want to find out the utilization of the busiest interface on the node, you could use this instead:

    SELECT MAX(InPercentUtil) AS RecvPctUtil FROM Orion.NPM.Interfaces WHERE NodeID=103

    To run this query through the REST interface, POST to https://myhost.com:17778/SolarWinds/InformationService/v3/Json/Query with a body like this:

    {"query":"SELECT MAX(InPercentUtil) AS RecvPctUtil FROM Orion.NPM.Interfaces WHERE NodeID=103"}

    Or, using query parameters, a body like this:

    {

      "query": "SELECT MAX(InPercentUtil) AS RecvPctUtil FROM Orion.NPM.Interfaces WHERE NodeID=@node",

      "parameters": {"node": 103}

    }

  • Okay, this makes sense. I'm trying to run a command:

    curl -k -u user:password -X POST -H "Content-Type:application/json" -d "{\"query\":\"SELECT InPercentUtil AS RecvPctUtil FROM Orion.NPM.Interfaces WHERE NodeID=126\"}" https://mysite.com:17778/SolarWinds/InformationService/v3/Json/Query

    which I expected was correct, however, I get no output from the command, not even an error. Any suggestions?

  • When I get no output from curl, my next step is always to add "-v" to the command line so I can see everything that happens, including the TLS details all of the request and request and response headers. Try that and see if it helps.