Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
ram_kum
Participant
Jump to solution

access-policy-name details for all gateways and clusters

Hello checkpoint guru's,

i am running below command which gives me cluster name, cluster ip-address, cluster members but unable to get access-policy-name details, what am i doing wrong here?

cmd:

[Expert@checkpoint-server:0]# mgmt_cli show gateways-and-servers details-level full -r true -f json limit 10 | jq '.objects[] | select( .type == "CpmiVsClusterNetobj" ) | [."name",."ipv4-address",."access-policy-name" ,."cluster-member-names"[]] | @csv' -r

"chp-fw2v","10.x.x.x",,"chp-fwvsx2a-mgmt_chp-fw2v","chp-fwvsx2b-mgmt_chp-fw2v"



json format output:

{

  "objects" : [ {

    "uid" : "a09396ea-4f28-4b9a-b82a-d831796c3368",

    "name" : "chp-fw2v",

    "type" : "CpmiVsClusterNetobj",

    "domain" : {

      "uid" : "57854616-014e-b34c-8fb2-a851ad1c6bda",

      "name" : "Admin",

      "domain-type" : "domain"

    },

    "policy" : {

      "access-policy-installed" : true,

      "access-policy-name" : "outer-policy",

      "access-policy-installation-date" : {

        "posix" : 1676495853500,

        "iso-8601" : "2023-02-15T21:17+0000"

      },

      "threat-policy-installed" : false

0 Kudos
1 Solution

Accepted Solutions
PhoneBoy
Admin
Admin

You’re referring to .”access-policy-name” in your jq query when you should be referring to .policy.”access-policy-name” 

View solution in original post

3 Replies
PhoneBoy
Admin
Admin

You’re referring to .”access-policy-name” in your jq query when you should be referring to .policy.”access-policy-name” 

ram_kum
Participant

oh ok, access-policy-name is nested to policy didnt observe that, thanks @PhoneBoy .

how about if i want to search with .type == access-policy-name "outer-policy" instead of  .type == "CpmiVsClusterNetobj", my goal is to get cluster name, cluster ip-address, cluster members using policy-name

0 Kudos
PhoneBoy
Admin
Admin

I presume you'd also search for .policy."access-policy-name" as well.
However, I have not used the search function in jq.

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    Tue 23 Apr 2024 @ 11:00 AM (EDT)

    East US: What's New in R82

    Thu 25 Apr 2024 @ 11:00 AM (SGT)

    APAC: CPX 2024 Recap

    Tue 30 Apr 2024 @ 03:00 PM (CDT)

    EMEA: CPX 2024 Recap

    Thu 02 May 2024 @ 11:00 AM (SGT)

    APAC: What's new in R82

    Tue 23 Apr 2024 @ 11:00 AM (EDT)

    East US: What's New in R82

    Thu 25 Apr 2024 @ 11:00 AM (SGT)

    APAC: CPX 2024 Recap

    Tue 30 Apr 2024 @ 03:00 PM (CDT)

    EMEA: CPX 2024 Recap

    Thu 02 May 2024 @ 11:00 AM (SGT)

    APAC: What's new in R82
    CheckMates Events