<?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: Query RAS user count using API in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Query-RAS-user-count-using-API/m-p/78071#M4575</link>
    <description>&lt;P&gt;happy to help&lt;/P&gt;</description>
    <pubDate>Thu, 12 Mar 2020 07:59:57 GMT</pubDate>
    <dc:creator>_Val_</dc:creator>
    <dc:date>2020-03-12T07:59:57Z</dc:date>
    <item>
      <title>Query RAS user count using API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Query-RAS-user-count-using-API/m-p/77953#M4562</link>
      <description>&lt;P&gt;Hello community,&lt;/P&gt;&lt;P&gt;does anybody know a way to query the count of current RAS users using the API?&lt;/P&gt;&lt;P&gt;I guess during the current time of extended home office working due to pandemic precautions, having a good overview over the current RAS user count per gateway is helpfull.&lt;/P&gt;&lt;P&gt;I'm aware of sk54641, but the value retrievable via SNMP is just wrong. Its the same wrong number, SmartConsole/SmartViewMonitor/GaiaDashboard is showing as Active Tunnels - Remote Access. The table Users by Gateway in SmartViewMonitor is showing the correct number (when counting the lines).&lt;/P&gt;&lt;P&gt;See here the CLI output:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;fw tab -t userc_users -s
HOST NAME ID #VALS #PEAK #SLINKS
localhost userc_users 165 554 662 0

iso.3.6.1.4.1.2620.1.2.5.4.23.0 = Counter64: 2245
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The value 554 is the correct one. 2245 is just wrong and I have no idea, how this number is calculated.&lt;/P&gt;&lt;P&gt;Just plain old IPSecVPN blade here, if this is important. No MobileAccess blade. All users are using current Endpoint VPN Security Client and Office Mode.&lt;/P&gt;&lt;P&gt;As long as this ?bug? is not fixed, we need a way to retrieve the correct number remotely.&lt;/P&gt;&lt;P&gt;Btw, has anybody experience with NRPE or something like that on GAIA?&lt;/P&gt;&lt;P&gt;Thanks for any ideas!&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 10:18:28 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Query-RAS-user-count-using-API/m-p/77953#M4562</guid>
      <dc:creator>Tobias_Moritz</dc:creator>
      <dc:date>2020-03-11T10:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: Query RAS user count using API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Query-RAS-user-count-using-API/m-p/77955#M4563</link>
      <description>&lt;P&gt;fw tab is the best command for this purpose - see&amp;nbsp;&lt;A href="https://community.checkpoint.com/t5/Remote-Access-Solutions/Remote-Access-Users-license-count/m-p/39181?search-action-id=13395385831&amp;amp;search-result-uid=39181" target="_blank"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Remote Access Users license + count &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/A&gt;&amp;nbsp;for other possible parameters and outputs !&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 10:29:03 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Query-RAS-user-count-using-API/m-p/77955#M4563</guid>
      <dc:creator>G_W_Albrecht</dc:creator>
      <dc:date>2020-03-11T10:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: Query RAS user count using API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Query-RAS-user-count-using-API/m-p/77957#M4564</link>
      <description>&lt;P&gt;Thank you, Albrecht, for this quick reply, but this is what I know already: fw tab is giving the correct information.&lt;/P&gt;&lt;P&gt;The question was, how to retrieve this value remotely. From a system monitoring platform like HP OpenView, Solar Winds, Icinga or whatever.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 10:33:04 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Query-RAS-user-count-using-API/m-p/77957#M4564</guid>
      <dc:creator>Tobias_Moritz</dc:creator>
      <dc:date>2020-03-11T10:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: Query RAS user count using API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Query-RAS-user-count-using-API/m-p/77962#M4565</link>
      <description>&lt;P&gt;You can use&amp;nbsp;&lt;SPAN&gt;mgmt_cli run-script command, look here for more details:&amp;nbsp;&lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/#cli/run-script~v1.6%20" target="_blank"&gt;https://sc1.checkpoint.com/documents/latest/APIs/#cli/run-script~v1.6%20&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 12:04:49 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Query-RAS-user-count-using-API/m-p/77962#M4565</guid>
      <dc:creator>_Val_</dc:creator>
      <dc:date>2020-03-11T12:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: Query RAS user count using API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Query-RAS-user-count-using-API/m-p/77963#M4566</link>
      <description>&lt;P&gt;That could work, thank you, Val.&lt;/P&gt;&lt;P&gt;We would need to make mgmt_cli runnable on a non Check Point Linux host (monitoring worker plattform) and it is a quite costly operation to just retrieve a single value (create session with management which creates session with gateway (I hope not in using CPMI)), but it should work. From a security point of view, I have concerns. What kind of permissions would be needed for mgmt_cli run-script on a gateway target and it is a good idea to provide such high priviledge credentials to a monitoring plattform?&lt;/P&gt;&lt;P&gt;BTW, any idea, why the values retrievable by SNMP and GUI tools are wrong?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 12:21:40 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Query-RAS-user-count-using-API/m-p/77963#M4566</guid>
      <dc:creator>Tobias_Moritz</dc:creator>
      <dc:date>2020-03-11T12:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: Query RAS user count using API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Query-RAS-user-count-using-API/m-p/77964#M4567</link>
      <description>&lt;P&gt;I thought you already have REST API based solution and want to get the date this way.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;From where I stand, you could run Ansible or Terraform, or any other popular tools to retrieve the data. In addition, similar API call is available directly from GAIA OS API:&amp;nbsp;&lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/#clish/run-script~v1.6%20" target="_blank"&gt;https://sc1.checkpoint.com/documents/latest/APIs/#clish/run-script~v1.6%20&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;For API calls, you need an admin account and client defined. You can also run mgmt_cli tool on the management itself.&lt;BR /&gt;&lt;BR /&gt;It is a good idea, actually, cause you could use the default admin for auth with mgmt_cli, and then SIC auth (no additional admin credentials) to reach out to GWs and run the scripts there.&amp;nbsp;./jq or basic grep would do the rest.&lt;/P&gt;
&lt;P&gt;If you do not want to invest time and efforts into Orchestration tools at this point, simple python based scripts would do the trick.&lt;BR /&gt;&lt;BR /&gt;Or, the laziest way is to use technique described here:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.checkpoint.com/t5/Enterprise-Appliances-and-Gaia/GAIA-Easy-execute-CLI-commands-on-all-gateways-simultaneously/m-p/50883#M3783" target="_blank"&gt;https://community.checkpoint.com/t5/Enterprise-Appliances-and-Gaia/GAIA-Easy-execute-CLI-commands-on-all-gateways-simultaneously/m-p/50883#M3783&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 12:46:57 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Query-RAS-user-count-using-API/m-p/77964#M4567</guid>
      <dc:creator>_Val_</dc:creator>
      <dc:date>2020-03-11T12:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: Query RAS user count using API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Query-RAS-user-count-using-API/m-p/78032#M4573</link>
      <description>If SNMP is returning wrong data a TAC case is in order.</description>
      <pubDate>Thu, 12 Mar 2020 00:23:49 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Query-RAS-user-count-using-API/m-p/78032#M4573</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2020-03-12T00:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: Query RAS user count using API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Query-RAS-user-count-using-API/m-p/78067#M4574</link>
      <description>&lt;P&gt;You're right, there is of course no need to use mgmt_cli, as run-script is also available over API web service. Not sure, why I didn't had that idea yesterday. Thanks also for hinting me to all the other options we have!&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 07:34:10 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Query-RAS-user-count-using-API/m-p/78067#M4574</guid>
      <dc:creator>Tobias_Moritz</dc:creator>
      <dc:date>2020-03-12T07:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: Query RAS user count using API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Query-RAS-user-count-using-API/m-p/78071#M4575</link>
      <description>&lt;P&gt;happy to help&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 07:59:57 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Query-RAS-user-count-using-API/m-p/78071#M4575</guid>
      <dc:creator>_Val_</dc:creator>
      <dc:date>2020-03-12T07:59:57Z</dc:date>
    </item>
    <item>
      <title>Re: Query RAS user count using API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Query-RAS-user-count-using-API/m-p/78387#M4586</link>
      <description>&lt;P&gt;Btw, OID .1.3.6.1.4.1.2620.1.2.5.4.23 surprisingly works on SMB but it only counts users with built-in accounts. Those that are using their domain ones are not counted.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 06:58:27 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Query-RAS-user-count-using-API/m-p/78387#M4586</guid>
      <dc:creator>HristoGrigorov</dc:creator>
      <dc:date>2020-03-16T06:58:27Z</dc:date>
    </item>
  </channel>
</rss>

