Hi,
Not sure if this is even possible but I'd like to gather experts opinion on this.
We have an archive of logs in tar.gz format and I'm wondering if it's possible to run 'fw log' or 'fwm logexport' on all the log files (*.log) without extracting the archive itself.
I have tried the following but for some reason, these only works on audit logs (.adtlogs)
- zcat oldfwlog.tar.gz | xargs fw log -n -p
- tar zxvf oldfwlog.tar.gz YYYY-MM-DD_XXXX.log --to-command='fw log -n -p $TAR_FILENAME'
First one only produce output from audit logs, the second one produce an error "Failed to open file '/opt/CPmds-R81.10/log/YYY-MM-DD_XXXX.log': No such file or directory" but the same command works if I use the audit log file as one of the parameters for tar
tar zxvf oldfwlog.tar.gz YYYY-MM-DD_XXXX.adtlog --to-command='fw log -n -p $TAR_FILENAME'.
It has the same behavior if I use 'fwm logexport -n -p -i'. It works perfectly for audit logs but nor for firewall logs.
seeing that command works for audit logs, I was hoping there's a switch or option I can use to perform the same on *.log.
Any input will be highly appreciated
-jon-