What is the easiest way to get the number of objects for a specific type, e.g. hosts?
Especially if there are more than the current limit maximum value of 500?
I don't see easy commands like "get number of objects" or something like "show <objects> total"
This is what I found might work:
[Expert@X:0]# mgmt_cli login > id.txt
[Expert@X:0]# mgmt_cli show groups --format json -s id.txt | $CPDIR/jq/jq ".total"
171
And generating a variable would look like this:
[Expert@X:0]# total_groups=$(mgmt_cli show groups --format json -s id.txt | $CPDIR/jq/jq ".total")
[Expert@X:0]# echo "$total_groups"
171
Am I missing something here?