Forum Discussion

skywalker's avatar
skywalker
Icon for Nimbostratus rankNimbostratus
Jul 29, 2015

how can be delete a member from different pools

Hello all,

 

how can be delete via cli same member quickly from different pools (approx 50) on BIG-IP LTM with the Version 10.2.4

 

Thank you,

 

skywalker

 

2 Replies

  • I don't think there is a built in option for this.

    I guess I would look at a couple of options. Note, I haven't used v10 for a while so test as needed.

    A quick script like this may do the trick

    !/bin/bash
    
    DELMEMBER="10.10.10.10:http"
    
    POOLS=`tmsh list ltm pool | awk 'BEGIN {RS="ltm"} /'"$DELMEMBER"' / {print $2}'`
    
    for x in ${POOLS}
        do
            `tmsh modify ltm pool $x members delete { $DELMEMBER }`
            printf "deleting $DELMEMBER from $x…\n"
        done
    

    or

    grab a copy of the bigip.conf, grab the pools you need from it into a separate file, edit out the pool member in question and merge back into the config (by pasting from terminal) with the following commands, first will verify, second for real,

    run /util bi verify merge -
    run /util bi merge -
    

    if you need to identify which pools have the member then run this

    DELMEMBER="10.10.10.10:http"; tmsh list ltm pool | awk 'BEGIN {RS="ltm"} /'"$DELMEMBER"' / {print $2}'
    

    cheers