<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Check contents of compressed tar archive and run fw log or fwm log in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Check-contents-of-compressed-tar-archive-and-run-fw-log-or-fwm/m-p/218018#M8568</link>
    <description>&lt;P&gt;Looks to be that way, it works on audit logs probably because it's not dependent on any other file.&lt;/P&gt;&lt;P&gt;Thanks for the response PhoneBoy, as always, we appreciate your help and support on the community.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jun 2024 22:30:37 GMT</pubDate>
    <dc:creator>jond3rd</dc:creator>
    <dc:date>2024-06-18T22:30:37Z</dc:date>
    <item>
      <title>Check contents of compressed tar archive and run fw log or fwm log</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Check-contents-of-compressed-tar-archive-and-run-fw-log-or-fwm/m-p/217679#M8555</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure if this is even possible but I'd like to gather experts opinion on this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have an archive of logs in &lt;STRONG&gt;tar.gz&lt;/STRONG&gt; format and I'm wondering if it's possible to run &lt;STRONG&gt;'fw log'&lt;/STRONG&gt; or &lt;STRONG&gt;'fwm logexport'&lt;/STRONG&gt; on all the log files (*.log) without extracting the archive itself.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried the following but for some reason, these only works on audit logs (.adtlogs)&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;zcat &lt;FONT color="#800000"&gt;&lt;STRONG&gt;oldfwlog.tar.gz&lt;/STRONG&gt;&lt;/FONT&gt; | xargs fw log -n -p&lt;/LI&gt;&lt;LI&gt;tar zxvf &lt;FONT color="#800000"&gt;&lt;STRONG&gt;oldfwlog.tar.gz &lt;/STRONG&gt;&lt;FONT color="#000000"&gt;&lt;FONT color="#800000"&gt;YYYY-MM-DD_XXXX.log&lt;/FONT&gt; --to-command='fw log -n -p $TAR_FILENAME'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800000"&gt;&lt;FONT color="#000000"&gt;First one only produce output from audit logs, the second one produce an error&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;"Failed to open file '/opt/CPmds-R81.10/log/YYY-MM-DD_XXXX.log': No such file or directory"&lt;/FONT&gt;&lt;/STRONG&gt; but the same command works if I use the audit log file as one of the parameters for tar&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;tar zxvf &lt;FONT color="#800000"&gt;&lt;STRONG&gt;oldfwlog.tar.gz &lt;/STRONG&gt;&lt;FONT color="#000000"&gt;&lt;FONT color="#800000"&gt;&lt;EM&gt;YYYY-MM-DD_XXXX.adtlog&lt;/EM&gt;&lt;/FONT&gt; --to-command='fw log -n -p $TAR_FILENAME'.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It has the same behavior if I use &lt;STRONG&gt;'fwm logexport -n -p -i'&lt;/STRONG&gt;. It works perfectly for audit logs but nor for firewall logs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;Any input will be highly appreciated&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-jon-&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2024 01:15:26 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Check-contents-of-compressed-tar-archive-and-run-fw-log-or-fwm/m-p/217679#M8555</guid>
      <dc:creator>jond3rd</dc:creator>
      <dc:date>2024-06-17T01:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: Check contents of compressed tar archive and run fw log or fwm log</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Check-contents-of-compressed-tar-archive-and-run-fw-log-or-fwm/m-p/217848#M8563</link>
      <description>&lt;P&gt;What about CPLogFilePrint?&lt;BR /&gt;See:&amp;nbsp;&lt;A href="https://support.checkpoint.com/results/sk/sk153972" target="_blank"&gt;https://support.checkpoint.com/results/sk/sk153972&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2024 23:33:42 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Check-contents-of-compressed-tar-archive-and-run-fw-log-or-fwm/m-p/217848#M8563</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2024-06-17T23:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: Check contents of compressed tar archive and run fw log or fwm log</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Check-contents-of-compressed-tar-archive-and-run-fw-log-or-fwm/m-p/217854#M8565</link>
      <description>&lt;P&gt;Hi PhoneBoy,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the response, really appreciate it.&lt;/P&gt;&lt;P&gt;That is an interesting tool, but unfortunately it doesn't work with what I want to accomplish. It gives an error "failed to open file YYYY-MM-DD_XXXX.log"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems that all the commands I've tried to process firewall logs needs all the relevant files to be extracted first before I can access the contents.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It appears that YYYY-MM-DD_XXXX.log needs the following files as well&lt;/P&gt;&lt;P&gt;YYYY-MM-DD_XXXX.logptr&lt;/P&gt;&lt;P&gt;YYYY-MM-DD_XXXX.loginitialptr&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For now, I am extracting the relevant log files just to accomplish the task that was given to me.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 01:22:20 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Check-contents-of-compressed-tar-archive-and-run-fw-log-or-fwm/m-p/217854#M8565</guid>
      <dc:creator>jond3rd</dc:creator>
      <dc:date>2024-06-18T01:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: Check contents of compressed tar archive and run fw log or fwm log</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Check-contents-of-compressed-tar-archive-and-run-fw-log-or-fwm/m-p/218009#M8567</link>
      <description>&lt;P&gt;Sounds like expected behavior as I know those files are needed to read the contents of the log correctly.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 20:10:45 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Check-contents-of-compressed-tar-archive-and-run-fw-log-or-fwm/m-p/218009#M8567</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2024-06-18T20:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: Check contents of compressed tar archive and run fw log or fwm log</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Check-contents-of-compressed-tar-archive-and-run-fw-log-or-fwm/m-p/218018#M8568</link>
      <description>&lt;P&gt;Looks to be that way, it works on audit logs probably because it's not dependent on any other file.&lt;/P&gt;&lt;P&gt;Thanks for the response PhoneBoy, as always, we appreciate your help and support on the community.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 22:30:37 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Check-contents-of-compressed-tar-archive-and-run-fw-log-or-fwm/m-p/218018#M8568</guid>
      <dc:creator>jond3rd</dc:creator>
      <dc:date>2024-06-18T22:30:37Z</dc:date>
    </item>
  </channel>
</rss>

