- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
outputting all session and other logs in one go from NetMRI
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2022 08:17 AM
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2022 10:59 AM
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2022 03:20 AM
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2022 03:59 AM
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2022 10:28 AM
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2022 12:04 PM
RParker let me know if you still need additional help
Twitter: https://twitter.com/sifbaksh
https://sifbaksh.com
Re: outputting all session and other logs in one go from NetMRI
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2022 12:50 PM
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2022 12:03 AM
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2022 04:19 AM
Let me test it
Twitter: https://twitter.com/sifbaksh
https://sifbaksh.com