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.
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:
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.
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.
07-07-2022 10:28 AM
07-07-2022 12:04 PM
RParker let me know if you still need additional help
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.
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.
07-08-2022 04:19 AM
Let me test it