DX Unified Infrastructure Management

  • 1.  quickest way to find nas by script

    Posted Dec 17, 2013 08:20 PM

    Hi,

     

    What do you guys think would be the quickest way to find the hub hosting nas through a script?

     

    I was thinking of going to the closest hub and checking it's queues, but that wouldn't work if get queues are used.

     

    -jon



  • 2.  Re: quickest way to find nas by script

    Posted Dec 18, 2013 04:44 PM

    I haven't checked but the inst_list_summary or probe_list callback in the controller list everything installed then you just look for nas.



  • 3.  Re: quickest way to find nas by script

    Posted Dec 18, 2013 04:48 PM

    Hi Neal,

     

    I could get it that way, and from getrobots on the hub with details enabled as well. I'm hoping there might be some smart way to do this without polling hubs or robots. Might be I'm hoping for too much :smileyhappy:

     

    -jon



  • 4.  Re: quickest way to find nas by script

    Posted Dec 19, 2013 04:11 AM

    LOL maybe the process probe looking for the nas process of course this would mean it needs to be running.  Dir scan probe looking for the probes/service/nas folder.



  • 5.  Re: quickest way to find nas by script

    Posted Jan 05, 2014 11:18 AM

    I ended up doing it like this

     

    1. do gethubs call to the closest hub
    2. loop through hublist and take the "addr", replace "hub" with "controller" and do "probe_list" call to that address
    3. check if the returned PDS contains key "nas"
    4. if it's found, break the loop and use this address (replace "controller" with "nas", of course)

    -jon



  • 6.  Re: quickest way to find nas by script

    Posted Jan 31, 2014 11:38 PM
    "quickest" query/response is prob from the DB. much faster than traversing through all hubs, hub's robots and their probes but i do that as well. you can try something like this query if you like.

    SELECT r.*, p.*
    FROM [NimsoftSLM].[dbo].[CM_NIMBUS_ROBOT] r
    Right join [NimsoftSLM].[dbo].[CM_NIMBUS_PROBE] p
    on (p.[robot_id] = r.[robot_id])
    where p.[probe_name] = 'nas'



  • 7.  Re: quickest way to find nas by script

    Posted Feb 01, 2014 12:16 AM

    That's a pretty good trick!

     

    I think the use case here is to run from robots throughout the environment, which probably will not be able to hit the database, but I really like this tip. It may come in handy...

    :smileyhappy:



  • 8.  Re: quickest way to find nas by script

    Posted Feb 01, 2014 01:37 AM

    Heh true, doesn't fit in my case, but it's a good idea :smileyhappy: