Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Douglas_Rich
Contributor

How to "show" only the value of a specific element with mgmt_cli

How to "show" only the value of a specific element with mgmt_cli

 

I just want to get the value of a specific setting/element on a Check Point Object.

 

Specifically this value:

"logIndexer" : true,

 

This is the command I have thus far and it shows everything but I want to be able to dial down to a specific object setting:

mgmt_cli -r true -d "Dev_Test_Customer" -f json show generic-objects name "Dev_Test_Customer_Server" details-level "full"

 

It was really simple in R77.30:

$MDSDIR/bin/cpmiquerybin attr "" network_objects "class='host_ckp'" -a __name__,log_indexer

0 Kudos
1 Reply
Norbert_Bohusch
Advisor

Add "-f json" to your command, then the output is JSON and can by parsed by JQ ($CPDIR/bin/jq)
https://stedolan.github.io/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