<?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: Do we have API command to get the checkpoint gateway uptime &amp;amp; exported into CSV format? in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Do-we-have-API-command-to-get-the-checkpoint-gateway-uptime-amp/m-p/213991#M8511</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 999px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/25632iF22C096B0C310CB7/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I run login and then run script.&lt;/P&gt;
&lt;P&gt;For this I would use echo value to a file.&lt;/P&gt;
&lt;P&gt;If you want to automate it in some capacity you could also add this to a cron job.&lt;/P&gt;
&lt;P&gt;[Expert@Amir:0]# echo $(uptime) &amp;gt;&amp;gt; test.csv&lt;BR /&gt;[Expert@Amir:0]# echo $(uptime) &amp;gt;&amp;gt; test.csv&lt;BR /&gt;[Expert@Amir:0]# echo $(uptime) &amp;gt;&amp;gt; test.csv&lt;BR /&gt;[Expert@Amir:0]# echo $(uptime) &amp;gt;&amp;gt; test.csv&lt;BR /&gt;[Expert@Amir:0]# echo $(uptime) &amp;gt;&amp;gt; test.csv&lt;BR /&gt;[Expert@Amir:0]# cat test.csv&lt;BR /&gt;08:56:40 up 16:58, 1 user, load average: 0.08, 0.08, 0.05&lt;BR /&gt;08:56:41 up 16:58, 1 user, load average: 0.08, 0.08, 0.05&lt;BR /&gt;08:56:41 up 16:58, 1 user, load average: 0.08, 0.08, 0.05&lt;BR /&gt;08:56:42 up 16:58, 1 user, load average: 0.08, 0.08, 0.05&lt;BR /&gt;08:56:42 up 16:58, 1 user, load average: 0.08, 0.08, 0.05&lt;/P&gt;</description>
    <pubDate>Mon, 13 May 2024 06:00:18 GMT</pubDate>
    <dc:creator>Amir_Senn</dc:creator>
    <dc:date>2024-05-13T06:00:18Z</dc:date>
    <item>
      <title>Do we have API command to get the checkpoint gateway uptime &amp; exported into CSV format?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Do-we-have-API-command-to-get-the-checkpoint-gateway-uptime-amp/m-p/213903#M8506</link>
      <description>&lt;P&gt;I am trying to get the gateway uptime and other detail via management server &amp;amp; then need to export it into CSV format.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know if there is any option.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;LI-PRODUCT title="API and CLI Discussion" id="api-cli-discussion"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 May 2024 11:56:27 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Do-we-have-API-command-to-get-the-checkpoint-gateway-uptime-amp/m-p/213903#M8506</guid>
      <dc:creator>riyalsandeep1</dc:creator>
      <dc:date>2024-05-11T11:56:27Z</dc:date>
    </item>
    <item>
      <title>Re: Do we have API command to get the checkpoint gateway uptime &amp; exported into CSV format?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Do-we-have-API-command-to-get-the-checkpoint-gateway-uptime-amp/m-p/213904#M8507</link>
      <description>&lt;P&gt;Personally, I never heard of such command in API. Even guide itself does not list one.&lt;/P&gt;
&lt;P&gt;Andy&lt;/P&gt;
&lt;P&gt;&lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/#introduction~v1.9.1%20" target="_blank"&gt;https://sc1.checkpoint.com/documents/latest/APIs/#introduction~v1.9.1%20&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 11 May 2024 12:45:55 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Do-we-have-API-command-to-get-the-checkpoint-gateway-uptime-amp/m-p/213904#M8507</guid>
      <dc:creator>the_rock</dc:creator>
      <dc:date>2024-05-11T12:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Do we have API command to get the checkpoint gateway uptime &amp; exported into CSV format?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Do-we-have-API-command-to-get-the-checkpoint-gateway-uptime-amp/m-p/213936#M8508</link>
      <description>&lt;P&gt;You can use GAIA API command "Run Script".&lt;BR /&gt;Basically you can inject command. You can write uptime to a file.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://sc1.checkpoint.com/documents/latest/GaiaAPIs/index.html#web/run-script~v1.7%20" target="_blank"&gt;https://sc1.checkpoint.com/documents/latest/GaiaAPIs/index.html#web/run-script~v1.7%20&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 12 May 2024 10:11:02 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Do-we-have-API-command-to-get-the-checkpoint-gateway-uptime-amp/m-p/213936#M8508</guid>
      <dc:creator>Amir_Senn</dc:creator>
      <dc:date>2024-05-12T10:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: Do we have API command to get the checkpoint gateway uptime &amp; exported into CSV format?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Do-we-have-API-command-to-get-the-checkpoint-gateway-uptime-amp/m-p/213980#M8510</link>
      <description>&lt;P&gt;Hey Amir,&lt;/P&gt;
&lt;P&gt;Do you have simple example you can give? Would like to try it in the lab.&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Andy&lt;/P&gt;</description>
      <pubDate>Sun, 12 May 2024 22:21:39 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Do-we-have-API-command-to-get-the-checkpoint-gateway-uptime-amp/m-p/213980#M8510</guid>
      <dc:creator>the_rock</dc:creator>
      <dc:date>2024-05-12T22:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: Do we have API command to get the checkpoint gateway uptime &amp; exported into CSV format?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Do-we-have-API-command-to-get-the-checkpoint-gateway-uptime-amp/m-p/213991#M8511</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 999px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/25632iF22C096B0C310CB7/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I run login and then run script.&lt;/P&gt;
&lt;P&gt;For this I would use echo value to a file.&lt;/P&gt;
&lt;P&gt;If you want to automate it in some capacity you could also add this to a cron job.&lt;/P&gt;
&lt;P&gt;[Expert@Amir:0]# echo $(uptime) &amp;gt;&amp;gt; test.csv&lt;BR /&gt;[Expert@Amir:0]# echo $(uptime) &amp;gt;&amp;gt; test.csv&lt;BR /&gt;[Expert@Amir:0]# echo $(uptime) &amp;gt;&amp;gt; test.csv&lt;BR /&gt;[Expert@Amir:0]# echo $(uptime) &amp;gt;&amp;gt; test.csv&lt;BR /&gt;[Expert@Amir:0]# echo $(uptime) &amp;gt;&amp;gt; test.csv&lt;BR /&gt;[Expert@Amir:0]# cat test.csv&lt;BR /&gt;08:56:40 up 16:58, 1 user, load average: 0.08, 0.08, 0.05&lt;BR /&gt;08:56:41 up 16:58, 1 user, load average: 0.08, 0.08, 0.05&lt;BR /&gt;08:56:41 up 16:58, 1 user, load average: 0.08, 0.08, 0.05&lt;BR /&gt;08:56:42 up 16:58, 1 user, load average: 0.08, 0.08, 0.05&lt;BR /&gt;08:56:42 up 16:58, 1 user, load average: 0.08, 0.08, 0.05&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 06:00:18 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Do-we-have-API-command-to-get-the-checkpoint-gateway-uptime-amp/m-p/213991#M8511</guid>
      <dc:creator>Amir_Senn</dc:creator>
      <dc:date>2024-05-13T06:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: Do we have API command to get the checkpoint gateway uptime &amp; exported into CSV format?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Do-we-have-API-command-to-get-the-checkpoint-gateway-uptime-amp/m-p/214004#M8512</link>
      <description>&lt;P&gt;Will try it later.&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Andy&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 11:11:44 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Do-we-have-API-command-to-get-the-checkpoint-gateway-uptime-amp/m-p/214004#M8512</guid>
      <dc:creator>the_rock</dc:creator>
      <dc:date>2024-05-13T11:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: Do we have API command to get the checkpoint gateway uptime &amp; exported into CSV format?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Do-we-have-API-command-to-get-the-checkpoint-gateway-uptime-amp/m-p/214014#M8513</link>
      <description>&lt;P&gt;Just tested it, good! I will try with watch -d flag later to see if that works.&lt;/P&gt;
&lt;P&gt;Andy&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 12:07:12 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Do-we-have-API-command-to-get-the-checkpoint-gateway-uptime-amp/m-p/214014#M8513</guid>
      <dc:creator>the_rock</dc:creator>
      <dc:date>2024-05-13T12:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: Do we have API command to get the checkpoint gateway uptime &amp; exported into CSV format?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Do-we-have-API-command-to-get-the-checkpoint-gateway-uptime-amp/m-p/214035#M8514</link>
      <description>&lt;P&gt;How can i use this to collect the uptime from management for multiple gateways?&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 14:46:47 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Do-we-have-API-command-to-get-the-checkpoint-gateway-uptime-amp/m-p/214035#M8514</guid>
      <dc:creator>riyalsandeep1</dc:creator>
      <dc:date>2024-05-13T14:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: Do we have API command to get the checkpoint gateway uptime &amp; exported into CSV format?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Do-we-have-API-command-to-get-the-checkpoint-gateway-uptime-amp/m-p/214041#M8515</link>
      <description>&lt;P&gt;I dont think watch -d works : - (&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 14:55:42 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Do-we-have-API-command-to-get-the-checkpoint-gateway-uptime-amp/m-p/214041#M8515</guid>
      <dc:creator>the_rock</dc:creator>
      <dc:date>2024-05-13T14:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: Do we have API command to get the checkpoint gateway uptime &amp; exported into CSV format?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Do-we-have-API-command-to-get-the-checkpoint-gateway-uptime-amp/m-p/214051#M8516</link>
      <description>&lt;P&gt;This API call runs a script directly on the system against which you make the call. You would make the call on each firewall individually, then your client would assemble the results.&lt;/P&gt;
&lt;P&gt;You&amp;nbsp;&lt;EM&gt;could&lt;/EM&gt; use that call against the management to have the management run a script like &lt;A href="https://community.checkpoint.com/t5/Security-Gateways/Run-a-command-on-each-firewall-via-CPRID/m-p/156873" target="_self"&gt;this one to run commands on every firewall&lt;/A&gt; reporting to that management. This takes a lot of familiarity with BASH scripting.&lt;/P&gt;
&lt;P&gt;You can use the management API call &lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/gaia-api~v1.9.1%20" target="_self"&gt;/gaia-api&lt;/A&gt; to tell the management to tell a gateway to run something.&lt;/P&gt;
&lt;P&gt;If you have a script in the management script repository, you can use the management API call &lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/run-script~v1.9.1%20" target="_self"&gt;/run-script&lt;/A&gt; to run it against whichever firewalls you specify.&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 15:17:40 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Do-we-have-API-command-to-get-the-checkpoint-gateway-uptime-amp/m-p/214051#M8516</guid>
      <dc:creator>Bob_Zimmerman</dc:creator>
      <dc:date>2024-05-13T15:17:40Z</dc:date>
    </item>
    <item>
      <title>Re: Do we have API command to get the checkpoint gateway uptime &amp; exported into CSV format?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Do-we-have-API-command-to-get-the-checkpoint-gateway-uptime-amp/m-p/214136#M8519</link>
      <description>&lt;P&gt;thank you!! is there an article that i can follow to setup?&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 09:50:29 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Do-we-have-API-command-to-get-the-checkpoint-gateway-uptime-amp/m-p/214136#M8519</guid>
      <dc:creator>riyalsandeep1</dc:creator>
      <dc:date>2024-05-14T09:50:29Z</dc:date>
    </item>
  </channel>
</rss>

