Forum Discussion
don_23889
Nimbostratus
Dec 28, 2009grep'ng for 'string' in bigip.conf
grep'ng for 'string' and returning entire block of object definitions from bigip.conf for each instance of 'string', starting with 'virtual' and ending with '}'
config less bigip.con...
hwidjaja_37598
Altostratus
Jan 17, 2010What about this, my first tmsh script
proc script::run {} {
if { $tmsh::argc != 3 } {
puts "Args: , e.g., virtual http_xff"
} else {
foreach {obj} [tmsh::get_config /ltm [lindex $tmsh::argv 1] ] {
foreach {field_name} [tmsh::get_field_names value $obj] {
if { [tmsh::get_field_value $obj $field_name] contains [lindex $tmsh::argv 2]} {
puts "[tmsh::list [tmsh::get_type $obj] [tmsh::get_name $obj]]"
break
}
}
}
}
}
sample:
root@bigip(Active)(tmos) run cli script abc2 virtual http_xff
ltm virtual http_xff {
destination x.x.x.x:https
ip-protocol tcp
mask x.x.x.x
pool http_xff
profiles {
tcp { }
}
snat automap
}
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
