DX Unified Infrastructure Management

 View Only
  • 1.  REST API to get a list of all monitored hosts

    Posted Jul 10, 2015 05:06 AM

    Hi All,

     

    I have been tasked with getting a list of hosts (servers and networking equipment) mapped to their origins via the API so that we can automatically create the relevant configuration items against customers within our Service Desk application at regular intervals.

     

    While the RESTful API is nice and easy to use, I am not overly familiar with the data structures within UIM. For instance, it is simple enough to pull back a list of hubs, robots and probes, but that still does not give me a list of all the end monitored hosts (those monitored by SNMP for example). There are other calls that may help, but currently the API account does not have the permissions to make those calls.

    Our UIM is hosted by a CA partner who have set up an account for us to use, but they have not had much experience with the API.

     

    I see from the documentation there are calls to get account CIs and computer systems.

    /accounts/{account_id}/computer_systems

    /accounts/{account_id}/configuration_items

     

    however, the example output seems to only return an ID for the computer system - are there any calls to then go an retrieve info for those systems, i.e. hostname, ip address, os, etc... ?

     

    Many thanks in advance



  • 2.  Re: REST API to get a list of all monitored hosts
    Best Answer

    Posted Jul 23, 2015 01:54 PM

    Hi Simon,

     

    First and foremost, thanks for your question.  Currently, the most recent version of the RESTful API (version 2.17) does not have functionality which would allow you to pull detailed information about computer systems.  However, the new version of the RESTful API (version 2.18) will incorporate a new set of calls which will allow you to retrieve this information, and, at this point, it has been implemented internally.  Additionally, we are working to try and make this version of the RESTful API backwards compatible so that a system upgrade will not be required in order to deploy the new version.  If you would have interest in evaluating this new functionality prior to the GA release of the probe, we would be happy to provide you with a beta version.  To go this route, please email either Jim Cooke (James.Cooke@ca.com) or myself (Ward.McKonly@ca.com), and we will help get you a beta version of the webservices_rest v2.18 probe to try out.  Hope this helps!

     

    Ward McKonly



  • 3.  Re: REST API to get a list of all monitored hosts

    Posted Sep 20, 2015 04:06 PM

    Hi Ward,

     

    I can confirm that the 2.18 API does indeed provide a list of monitored items, thank-you. It would be a good idea to include the pagination in the calls though, as I imagine once you get over 10 000 objects monitored then the hits on the UIM server may be noticeable. Also I notice that for many of the items there is no OS info returned (only the hostname, origin and IP info). I have not investigated this thoroughly yet, but there does not appear to be any consistency with why the info is missing. In order to back fill this info, you would need to do callbacks against the robot that is monitoring the host in question, however from the new API calls (/computer_systems) there is no information that is returned that can link a monitored host to the robot that is responsible for monitoring it.

     

    Anyway thanks again.



  • 4.  Re: REST API to get a list of all monitored hosts

    Posted Sep 29, 2015 01:20 PM

    Hi Simon,

     

    I am glad to hear that the new calls worked out for you.  Your thoughts on adding in pagination to the calls and a way to link monitored hosts to the monitoring robot certainly make sense, and I will be sure to bring them up as potential future enhancements during our planning sessions.  Thank you for taking the time to provide us with your thoughts and experiences using the RESTful API; the feedback is much appreciated.

     

    Ward McKonly