Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Jack132897
Explorer

Query gateway version & take

Hi,

I'm currently building trying to extract gateway version & take via API in order to incorporate this into our reporting. 

So far i have only been able to find the gateway version, e.g. R82.0 but not the take number to track the currnet take & available take to see if there is a pending jumbo hotfix. 

Is this information actually available on any of the API endpoints? 

Thanks! 

0 Kudos
2 Replies
PhoneBoy
Admin
Admin

The gateway version is likely a function of it being included in the gateway object itself.
For JHF level, that likely requires parsing the output of a command like: cpinfo -y FW1 | grep Take
That could be accomplished via a run-script API call.
A good example of how to work with this is here: https://community.checkpoint.com/t5/Firewall-and-Security-Management/The-command-quot-show-ips-statu... 

0 Kudos
Adam_Forester
MVP Gold CHKP MVP Gold CHKP
MVP Gold CHKP

Hey @Jack132897 if you do mgmt_cli -r true show software-packages-per-targets targets.1 "GFG" display.installed "yes" --format json ; it will come back with any installed jumbo beyond the base take. Other wise you could use FWM Ver and FW Ver doing run script to pull the base version and you just have to reference back when that image was released. It's why the display.installed is nice cause it shows a particular take.

 

But if you want a single command that formats it you could do; 

mgmt_cli -r true show software-packages-per-targets targets.1 "GFG" display.installed "yes" --format json | jq -r '.targets[].packages.installed[]["package-id"] | split("_") as $p | "R\($p[2] | ltrimstr("R")).\($p[3]) Take \(($p[] | select(startswith("T") and length > 1 and (.[1:2] >= "0" and .[1:2] <= "9")))[1:])"'

R82.10 Take 24

 

 

{

  "targets" : [ {

    "packages" : {

      "installed" : [ {

        "package-id" : "Check_Point_R82_10_jumbo_hf_main_Bundle_T24_FULL.tgz",

        "category" : "jumbo"

      } ],

      "available" : [ ]

    },

    "name" : "GFG",

    "uid" : "3fc5f0c0-ca04-4df8-919b-3e572bf94cc7"

  } ]

}

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events