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 to run javacurdclient using eclipse ?

Error: Could not find or load main class SwisClient

And also unable to import the wsdl files.

  • Hi aftab​! The example that's out on the GitHub for SolarWinds leverages the REST API instead of the SOAP interface that would require a WSDL. There's no SwisClient class beyond showing you an example of creating a JSON request and submitting it to the service URL using the stock jersey web client Java libraries.

    Check out this example:

    OrionSDK/App.java at master · solarwinds/OrionSDK · GitHub

    Here's some documentation for Jersey webclient:

    Client (jersey-bundle 1.17 API)

    Does that help you at all? If not, can you give more detail about what exactly you're trying to add to Eclipse?

    Thanks in advance,

    --

    Steven W. Klassen

    Programmer Analyst @ Loop1 Systems

    http://www.loop1systems.com/

    http://www.linkedin.com/in/mrxinu

  • Hi Steven ,

    Its working !!

    Thank for kind help .

    Regards,

    Aftab

  • I'm glad to hear it! That's excellent!

  • Steven,

    How to put device in maintenance mode using API ?

    i have device name and time duration for the device to put in maintenance

    Can you please help ?

  • I don't have a java example, but this python example is just about spot on as far as what's required. You need to pass the net object ID ('N:' + nodeID), a start time in UTC (now), and end time in UTC (e.g., tomorrow), and then the boolean 'False' if you don't mean for the time span to be relative. Trust me, just set it to False. There was an explanation from tdanner​ on one of the recent API labs about what it means to be True but I've already forgotten.

    Here's the python for reference:

    orionsdk-python/unmanage_node.py at master · solarwinds/orionsdk-python · GitHub

    To see what swis.invoke() is doing with the parameters, check out this as well:

    orionsdk-python/swisclient.py at master · solarwinds/orionsdk-python · GitHub

  • Thank You Steven !!!

    Can we find the current individual CPU utilization if the device has many via API ?

  • You sure can. there's an entity in SWQL called Orion.CPUMultiLoad that gives you the per-CPU loads historically (including the weight!). There's even a handy linking property to the Orion.Nodes entity called (Nodes). If you need help wrangling a query for this one, shout.

    2016-05-09_15-50-22.png

    Also, did you send me a LinkedIn connect request? I accepted because I *think* I only know one aftab, but I wasn't sure. emoticons_happy.png

  • Hi Steven,

    Thank You for accepting my LinkedIn request !!

    pastedImage_0.png

    What is CPU index here ?

    Do we have any table which has node id and name mapping ?

  • It's my pleasure! Thanks for the invitation.

    This query is going to give you the CPU statistics for all nodes and CPUs in the last 60 minutes:

    SELECT cpm.CPUIndex, cpm.AvgLoad

    FROM Orion.CPUMultiLoad cpm

    WHERE MINUTEDIFF(cpm.TimeStampUTC, GETUTCDATE()) < 60

    2016-05-10_21-54-46.png

    So that information isn't terribly useful without its corresponding node information like you've already discovered. This is what makes SWQL so cool - the linking property: the bit at the bottom that says "Node (Orion.Nodes)". In the query above I've aliased Orion.CPUMultiLoad as cpm so to reach into Orion.Nodes all I have to do is adjust the query to use the Node link:

    SELECT

        cpm.Node.NodeID,

        cpm.Node.Caption,

        cpm.Node.Vendor,

        cpm.CPUIndex,

        cpm.AvgLoad

    FROM Orion.CPUMultiLoad cpm

    WHERE MINUTEDIFF(cpm.TimeStampUTC, GETUTCDATE()) < 60

    2016-05-10_22-04-32.png

    Although now that I've written that query there's no way to tell why the L1SDC03 & CPUIndex 0 repeats. I know it's because we're looking at multiple samples over time, but let's go ahead and add the DateTime column so it's more obvious. And we'll order by the timestamp, nodeid, and the cpuindex so they're grouped together:

    SELECT

        cpm.Node.NodeID,

        cpm.Node.Caption,

        cpm.Node.Vendor,

        cpm.CPUIndex,

        cpm.AvgLoad,

        cpm.TimeStampUTC

    FROM Orion.CPUMultiLoad cpm

    WHERE MINUTEDIFF(cpm.TimeStampUTC, GETUTCDATE()) < 60

    ORDER BY cpm.TimeStampUTC, cpm.Node.NodeID, cpm.CPUIndex

    2016-05-10_22-08-51.png

    Finally I'd like to say what's up to tdanner​ and thank my partner in solarwinds​​ crime, zackm​​, and last but not least my two pups and three cats. And also adatole​.

    Hope this helps!

  • It's Working !!

    Actually i am newbie to solarwinds and not familiar with DB tables names and API etc ..

    Thanks so much Steven for your kind help as always !!