Forum Discussion
Find all blade serial numbers with REST call
How to I discover the serial numbers for all blades in a VIPRION chassis over REST? The data in /mgmt/tm/sys/hardware and /mgmt/tm/sys/license seems to only include the primary blade. We'd like to run a report to insure we have support coverage on all blades and chassis.
- suttonscEmployee
I don't believe there is a specific endpoint that will list the entire set of serial numbers. However, you can get the serial numbers from the slots using a 'util/bash' endpoint and sending a clsh command.
Here is an example of getting the blade serial numbers:
# curl -sku admin:${bigip_pass} https://${BIGIP-MGMT-ADDR}/mgmt/tm/util/bash -X POST -H "Content-Type: application/json" -d "{ \"command\":\"run\", \"utilCmdArgs\":\"-c 'clsh tmsh show sys hardware field-fmt \| awk \\\'/\^sys hardware system-info/,/\^}/ {if(\$1==\\\"host-board-serial-num\\\") print $2}\\\''\"}" | jq .commandResult | xargs echo -e host-board-serial-num bld012429s host-board-serial-num bld012451s
The core command is "utilCmdArgs": "-c 'clsh tmsh show sys hardware field-fmt" the rest just gets the specific serial information and dumps it in a more readable format.
Let me know if this gets you closer to what you are looking for.
- TimRikerCirrocumulus
I'll test this out. This requires that the account has advanced shell access, correct?
I only get one "host-board-serial-num" entry for the current blade. :(
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com