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

Searching the MGMT CLI

Hello,

Is there a way to "find" the Cluster object name through the CLI, either from the SMS or one of the ClusterXL HA members?

I want to send to Install policies, from the SMS CLI, using the "mgmt_cli...." but the syntax asks me to declare the name of the OBJECT of my CLUSTER, and currently, I don't have yet a license to access through the SmartConsole.

I don't remember the name that the Cluster has in the SmartConsole, so I want to know, if there is a way to find out what name this object has (when we enter the SmartConsole)....

I hope you can clarify the doubt.

Greetings.

0 Kudos
1 Solution

Accepted Solutions
PhoneBoy
Admin
Admin

That is correct: without a license, you cannot use the API.

View solution in original post

0 Kudos
11 Replies
Bob_Zimmerman
Authority
Authority

On the management server:

mgmt_cli -f json -r true show gateways-and-servers | jq -c '.objects[]|[.type,.name]'

0 Kudos
Matlu
Advisor

Hello,

I have tried to use the shared option, but I get unfavorable results.

I have tried using other syntaxes of the "mgmt_cli..." that I found on the internet, but I still get bad results.

Maybe I am misapplying the syntax?

[Expert@Smartcenter:0]# mgmt_cli -f json -r true show gateways-and-servers | jq -c '.objects[]|[.type,.name]'
Error: Failed to login to the management server
[Expert@Smartcenter:0]#
[Expert@Smartcenter:0]#
[Expert@Smartcenter:0]# mgmt_cli show host name "CP_GW01" -r true --format json | jq '."ipv4-address"'
Error: Failed to login to the management server
[Expert@Smartcenter:0]# ^C
[Expert@Smartcenter:0]#

0 Kudos
Bob_Zimmerman
Authority
Authority

For that to fail, something must be very wrong with your management server. What do these three commands return?

fwm ver

api status

cpwd_admin list

0 Kudos
Matlu
Advisor

Hello,

I have an R81 version.

My processes look good. I have the impression that it is a MGMT LICENSE issue (Actually my MGMT is not licensed yet), maybe that is why the command is not working.

I have tested the command on another MGMT that does have a license, and it does work.

Anyway I share the result of the suggested commands.

In addition to this query, is the "mgmt_cli..." able to show us the POLICY PACKETS that the SMS has created?

Greetings.

0 Kudos
Tal_Paz-Fridman
Employee
Employee

In that case what does cplic print show?

0 Kudos
Matlu
Advisor

Hello,

It shows that the license we had already expired on 29Oct.

I have the impression that this is why, on this computer (Open Server), the suggested command does not work.

It seems that for the use of "mgmt_cli..." it is mandatory to have a license on the device.

 

0 Kudos
PhoneBoy
Admin
Admin

That is correct: without a license, you cannot use the API.

0 Kudos
Matlu
Advisor

Thank you for the clarification.

Even so, I would like to know, if there is a syntax with the "mgmt_cli..." that shows me, how many "Policy Packages" have been created in my SMS.

Is this possible?

I want to validate it in a SMS that has a license.

Thank you.

0 Kudos
Bob_Zimmerman
Authority
Authority

Sure, it’s possible.

mgmt_cli -f json -r true show packages

0 Kudos
the_rock
Legend
Legend

I dont believe thats accurate. I just tested api commands on the box without valid license and worked fine.

Andy

0 Kudos
Matlu
Advisor

You already left me with the doubt 😂😑

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events