DX Unified Infrastructure Management

  • 1.  Importing devices into the Cisco monitor

    Posted Jul 30, 2008 09:27 AM
    During our demonstration of the Nimbus product we asked if there was a way to import a list of devices into the Cisco monitor.  The answer was yes.  We're having some difficulty getting it to work.  In fact we can't find any documentation on it. 

    If you drag information from an open Wordpad document into the right side of the Cisco monitor window your mouse pointer changes to a box with a plus sign.  To me this implies that you are about to add something.  However when you let go of your mouse button nothing happens. 

    I have dozens of items to add.  I can't imagine that you have to do it all manually.  Can anyone provide some direction?  Thanks.


  • 2.  Importing devices into the Cisco monitor
    Best Answer

    Posted Aug 05, 2008 04:34 AM
    Many network probes such as interface_traffic, snmpget and others
    support various methods of import like formatted text or a /etc/hosts
    formatted file.  Unfortunately this is not supported by the
    cisco_monitor.  I looked over the proposals for the next version and it
    will support this feature.

    You may, however, create a small NAS
    script that will generate the configuration for you, or at least help
    you speed up the process abit.  Note that this requires nas version 3.x.


    -- cisco_monitor (host,snmpversion,params,...)
    -- usage:
    --   version=1  => cisco_monitor("myhost",1,"mycommunity")
    --   version=2c => cisco_monitor("myhost",2,"mycommunity")
    --   version=3  => cisco_monitor("myhost",3,"myuser","mypassword","SHA")
    --
    -- returns status-code, 0=ok
    function cisco_monitor (name,version,p1,p2,p3)
       pname = "/profiles/"..name

       community = "public"
       user  = ""
       pass  = ""
       auth  = "none"

       cfg = pds.create ()

       if version ~= 3 then
          community = p1
       else
          user = p1
          community = p2
          auth = p3
       end
         
       if community == nil then
          community = "public"
       end

       pds.putString (cfg,pname.."/active","yes")
       pds.putString (cfg,pname.."/name",name)
       pds.putString (cfg,pname.."/host",name)
       pds.putString (cfg,pname.."/group","Default Group")
       pds.putString (cfg,pname.."/interval","5min")
       pds.putString (cfg,pname.."/retries","3")
       pds.putString (cfg,pname.."/timeout","30")
       pds.putString (cfg,pname.."/version",version)

       if version ~= 3 then
          pds.putString (cfg,pname.."/community",community)
       else
          pds.putString (cfg,pname.."/user",user)
          pds.putString (cfg,pname.."/community",community)
          pds.putString (cfg,pname.."/auth",auth)
       end

       args = pds.create()
       pds.putString(args,"name","cisco_monitor")
       pds.putPDS   (args,"as_pds",cfg)

       rs,rc = nimbus.request (target_robot,"probe_config_set",args)
      
       pds.delete(args)
       pds.delete(cfg)

       return rc
    end

    -- !! Remember to change target robot address !!
    target_robot = "/Domain/Hub/Robot/controller"   -- eg /MyDomain/MyHub/xptest/controller

    cisco_monitor ("casetest1",1,"public")
    cisco_monitor ("casetest2",3,"myuser","mypass","SHA")