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

Get UID from Host object

Hello, 

I am trying to get the UID from a host object

I tried the following mgmt_cli command from the smart console terminal and I keep getting the following error:

show host name "my_host" --format json | jq ".uid"

ERROR: the parameters of show-host command should be provided in pairs (key and value). You have provided an odd number of parameters which suggests that you are probably missing a parameter.

I am running Gaia R80.40 mgmt server

 

0 Kudos
3 Replies
Bob_Zimmerman
Authority
Authority

What if you just do the `show host name "my_host"` part? No format specifier, no pipeline.

What about `show host name "my_host" --format json`, leaving off just the pipeline at the end?

I haven't used the API command line in SmartConsole, but I suspect it may not support pipelines.

0 Kudos
bhaizlett123
Contributor

Bob thank you for your response, and yes if I remove the pipeline at the end it works no issues. Only when adding the pipeline I get the errors, is using the pipeline with jq not supported when using the smart console cli terminal?

0 Kudos
PhoneBoy
Admin
Admin

The CLI in SmartConsole is not a general purpose shell, thus that command will not work.
You need to do that command from an SSH/console connection in Expert mode.

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events