Forum Discussion
xzjleo_133138
Nimbostratus
Oct 16, 2013iRule data group
Hi
We have some iRule data groups need to be updated regularly and the iRule will forward the traffic to different servers base on them. In order to minimize the work load, are there any ways w...
Kevin_Stewart
Employee
Oct 17, 2013I don't think SNMP is the way to go. In lieu of iControl (probably the best way), you could partially automate the process by first uploading the flat list of IP addresses. Example:
10.70.0.1/32
10.70.0.2/32
10.70.0.3/32
10.70.0.4/32
10.70.0.5/32
10.70.0.6/32
10.70.0.7/32
10.70.0.8/32
10.70.0.9/32
And then processing this file with a simple Bash script:
!/bin/bash
data_group=dgimport_ip_list
import_file=iplist
import the first line and replace everything in the data group
line=`head -1 $import_file`
tmsh modify ltm data-group internal $data_group records replace-all-with { $line }
parse the rest of the file and add the data to the data group
sed 1d $import_file |while read line
do
tmsh modify ltm data-group internal $data_group records add { $line }
done
Make sure the address-based data group has been created first.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects