Reply

outputting all session and other logs in one go from NetMRI

Guru
Posts: 23
5148     1

Something I have been trying to get around to for ages is how I can get all job log files in one go from  NetMRI. So I have a script that runs on 500 devices in a particular Job. Each of the 500 devices has a separate entry with log files for that specific device. 

It is time consuming to download all and need to understand a better way of doing this. 

 

Additionally, one thing that has confused me for a long time (and, granted, I havent really asked) is that the Job itself has Details, Issues and Files tabs, but I am unsure how to populate the Files tab. Presumably there is a mechanism in Perl and Python to write into these tabs.

 

Re: outputting all session and other logs in one go from NetMRI

New Member
Posts: 1
5148     1

The way to get the file into the main job details page is by utilizing CCS Data Archive. An example for this is in the Action-Commands:

 

example:

ARCHIVE (filename.txt): show interfaces

 

This creates an archive zip with all of the outputs in it. You can create variables based on the well-known variables (i.e. $ipaddress will name the file based on the ip address of the device).

 

I'm trying to automate downloading of this archive currently, so I can't help you out there. 

Re: outputting all session and other logs in one go from NetMRI

Guru
Posts: 23
5148     1

Hi, Thanks for the reply. Think this still creates one file per device which is what I am tryiing to avoid. So im trying to concatenate all outputs (from > 500 devices) into one file. 

 

However thanks for reminding me of the Archive command.

Re: outputting all session and other logs in one go from NetMRI

Guru
Posts: 23
5149     1

Also, forgot to mention that I need to do this via Perl and/or Python - not CCS.

 

 

Re: outputting all session and other logs in one go from NetMRI

Authority
Posts: 16
5149     1

see if the 'extra undocumented features' mentioned in this link might help?

https://community.infoblox.com/t5/how-to-articles/netmri-saving-data-to-files-using-archive/ba-p/226...


Re: outputting all session and other logs in one go from NetMRI

Superuser
Posts: 115
5149     1

RParker let me know if you still need additional help

Follow me on LinkedIn: https://www.linkedin.com/in/sifbaksh
Twitter: https://twitter.com/sifbaksh

https://sifbaksh.com

Re: outputting all session and other logs in one go from NetMRI

New Member
Posts: 2
5149     1

I've used the method that Sif described but it still requires a bunch of manipulation to extract all of the files from the (500) job entries and then concatenate them or whatever.

 

IIRC, over a decade ago, someone (Mike Griffin? Marc Jensen?) suggested appending to a separate file in a Perl-based script.  Presumably the file system would handle any collision of multiple writers.

Re: outputting all session and other logs in one go from NetMRI

Guru
Posts: 23
5149     1

Thanks, Sif. used your documenation eventually and the CCS Archive might actually work. 

The person who is doing the work is OK at the moment with the CCS Archive as mostly its Show commands. 

He is not familar with the language so working through it. It would be great if there was a Perl and Python version of Archive as it would make life a lot easier all around.

Rgds

Re: outputting all session and other logs in one go from NetMRI

Superuser
Posts: 115
5149     1
You should be able to use that command in Python and PERL

Let me test it
Follow me on LinkedIn: https://www.linkedin.com/in/sifbaksh
Twitter: https://twitter.com/sifbaksh

https://sifbaksh.com
Showing results for 
Search instead for 
Did you mean: 

Recommended for You