DX Unified Infrastructure Management

 View Only
  • 1.  How to extract the Cisco_Monitor contents to text file

    Posted Nov 13, 2012 02:02 AM

    Hi Everyone!

     

    I'm completely new to LUA and I have a request to extract the contents of the Cisco_Monitor to a text file, for later use in Excel..

     

    Its a shame IM doesn't store this data in a CFG file somewhere, or allow Copy & Paste...

     

    Does any one happen to have done this task before? Hopefully with some kind of example script..

     

    Thanks in advance!

     

    Sam



  • 2.  Re: How to extract the Cisco_Monitor contents to text file

    Posted Nov 13, 2012 02:09 AM
    Just remembered an application I used to use years ago..

    I think it will solve this issue..

    For others with the same problem, and no LUA knowledge, try this (sysexporter):

    http://www.freewaregenius.com/sysexporter-extract-infromation-from-any-program-or-window-even-when-copying-and-pasting-is-not-an-option/


  • 3.  Re: How to extract the Cisco_Monitor contents to text file

    Posted Nov 13, 2012 07:46 AM

    If you want to extract the contents of the config file, you can press Ctrl+N with the probe selected in Infrastructure Manager to open the config in Notepad. You cannot make changes there, but you can copy the contents.



  • 4.  Re: How to extract the Cisco_Monitor contents to text file

    Posted Nov 13, 2012 05:31 PM

    You can use the following function to get you started. The backupFile argument is the new file name, I believe it will store it in the nsa or nas execution folder.

     

    function ConfigFileBackup(controllerAddr,probeDir,cfgFile,backupFile)
       mypds = pds.create()
       pds.putString ( mypds, "directory",   probeDir )
       pds.putString ( mypds, "file",        cfgFile  )
       pds.putInt    ( mypds, "buffer_size", 10240000 )
       output1,return_status1 = nimbus.request ( controllerAddr, "text_file_get", mypds )
       if return_status1 == NIME_OK then
          value1 = output1["file_content"]
          fname1 = backupFile
          file.create ( fname1 )
          file.write ( fname1, value1 )
           print ("Success")
       else
          print ("Failed")
          pds.delete (mypds)
          exit (2)
       end
       pds.delete (mypds)
    end

     



  • 5.  Re: How to extract the Cisco_Monitor contents to text file

    Posted Nov 15, 2012 04:16 PM

    Thanks everyone!

     

    Is there a way to get the IOS data?

     

    Cheers!

    Sam

     



  • 6.  Re: How to extract the Cisco_Monitor contents to text file

    Posted Nov 15, 2012 04:56 PM

    Use the discovery server should give you this info depending on switch type I guess I know it works great on ciscos.  Juniper I don't believe so.  Not sure on any other depends on the mib I guess all they look for is the osdesc the parse that for just about everything.  Nimsoft also dumps some discovery data in the cm_device_attribute so if you are running discovery check there as I am not aware of that data being displayed anywhere.