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!
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.
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.
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 )
Is there a way to get the IOS data?
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.