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

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

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

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