For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

TimRiker's avatar
TimRiker
Icon for Cirrocumulus rankCirrocumulus
Feb 26, 2020

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.

2 Replies

  • 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.

  • 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. :(