- CheckMates
- :
- Products
- :
- Developers
- :
- API / CLI Discussion
- :
- SmartConsole CLI
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Are you a member of CheckMates?
×- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
SmartConsole CLI
Hello Everyone!
I'm trying to export groups from my SmartConsole to CSV file.
I ran this script via expert mode and it worked correctly:
mgmt_cli -r true show-group name "My_Group" details-level full -f json | jq '.members[] | [.name, ."ipv4-address", .comments] |@csv'
But when I'm trying to run this script via SmartConsole CLI it's failing.
This is the SmartConsole CLI I'm trying to run:
show-group name "My_Group" details-level full -f json | jq '.members[] | [.name, ."ipv4-address", .comments] |@csv'
And this is the error:
Error: The parameters of show-group 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.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The CLI in SmartConsole doesn't support pipes (incidentally, nor does clish). It feeds the full command you enter to something a little like this:
mgmt_cli -s session.txt %
With the full text you entered replacing the %.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK, so if the CLI in SmartConsole doesn't support pipes, there is any other way I can export groups via SmartConsole CLI?
