Hi - Need to export VIP name, IP, status (offline/available/unknown), pool and Poolmembers
Hi, I went through many articles but couldn't find any script for a consolidated report that would have these details: VIP name VIP IP VIP Status (offline/available/unknown) pool poolmembers I did find separate articles though but not a consolidated one. I am new and not verse with scripting. https://my.f5.com/manage/s/article/K72255145 https://my.f5.com/manage/s/article/K000135606 If anyone can please help with this required script it would be of great help. Thanks in advance. Regards, Ravi31Views0likes1CommentCOPYING OF OBJECTS AND OTHER CONFIGS FROM BIG-IP 5050 TO WORKING BIG-IP VPR-B2250
Hi Team, From BIG-IP 5050 TO WORKING (BIG-IP VPR-B2250) to BIG-IP 5050 TO WORKING (BIG-IP VPR-B2250), we intend to copy the objects and other configurations. If someone knows how to do it using script, please let me know. I want to copy the items below. virtual, nodes, pools, monitor instances interfaces, nats, self ips,snats,trunks, tunnels, vlans. Thank you480Views0likes5CommentsREST API authorization in a cronjob, recommendation
I'd like to run an automatic script via cronjob to trigger REST API calls on a BIG-IQ (the script is located on the BIG-IQ itself). What possibilities are available in regards to authorization, especially from a security point of view, meaning avoiding placing credentials in the script. Is there maybe an option to use mutual SSL as trust? Right now doing manual testing I first create a token with basic credentials and then doing the REST-call with this token. But having an automatic script, there is no posibility to enter the password, means it needs to be placed somewhere. Any ideas would be very helpful. Thank you! Regards Stefan 🙂533Views0likes3Commentstmsh script to change a profile in all virtual servers in all partitions
Inspired by some articles on devcentral ( in special Stop Using the Base TCP Profile! and Rapid iRule Removal via Tmsh Script ), I decided to write a tmsh script to replace a profile for all virtual servers in all partitions. Maybe someone can use it or has any hints for optimization. Example: root@(lab1)(cfg-sync Standalone)(Active)(/Common)(tmos) create cli alias shared changeprofile command "run cli script changeProfile.tcl" root@(lab1)(cfg-sync Standalone)(Active)(/Common)(tmos) changeprofile /Common/tcp /Common/tcp-lan-optimized The /Common/tcp profile was replaced with the /Common/tcp-lan-optimized profile for the following virtuals in partition /Common : The /Common/tcp profile was replaced with the /Common/tcp-lan-optimized profile for the following virtuals in partition /LAB1 : testvip1-http testvip1-https testvip2-https tmsh script: cli script changeProfile.tcl { proc script::init {} { set ::info "Usage: changeprofile IMPORTANT: ALL virtual servers in ALL partitions!" } proc script::run {} { if { $tmsh::argc != 3 } { puts $::info exit 0 } set old_profile [lindex $tmsh::argv 1] set new_profile [lindex $tmsh::argv 2] set all_partitions [tmsh::get_config auth partition] foreach partition $all_partitions { set current_partition "/[lindex [split $partition " "] 2]" tmsh::cd $current_partition set profiles "" set vips [tmsh::get_config /ltm virtual] puts "The $old_profile profile was replaced with the $new_profile profile for the following virtuals in partition $current_partition : " tmsh::begin_transaction foreach vip $vips { set profiles [tmsh::get_field_value $vip "profiles"] if { $profiles contains $old_profile } { tmsh::modify /ltm virtual [tmsh::get_name $vip] profiles delete "{" $old_profile "}" profiles add "{" $new_profile "}" puts "\t[tmsh::get_name $vip]" } } tmsh::commit_transaction } } proc script::help {} { if { $tmsh::argc != 3 } { tmsh::add_help $::info } } proc script::tabc {} { if { $tmsh::argc != 3 } { tmsh::add_tabc $::info } } }355Views0likes0CommentsScript that generates tmsh commands
I found the following awesome command on devcentral that creates a file named commands.sh that contains all of the tmsh commands needed to modify the 3rd octet of every VIP on the unit: echo '!/bin/bash' > /shared/commands.sh; tmsh list ltm virtual destination | tr '\n' ' ' | sed 's/ \+/ /g;s/ltm virtual/\ntmsh modify ltm virtual/g;s/nation 10\.23\.206/nation 10.23.207/g' >> /shared/commands.sh; chmod 755 /shared/commands.sh What I need is a much simpler version of this command that will create a file named commands.sh that contains all of the tmsh commands needed to re-create all of the nodes on an existing unit, on a brand new unit. So the result would be: tmsh create ltm node address tmsh create ltm node address tmsh create ltm node address etc... I know there are easier ways to do this, like copying the node portion of the existing config and pasting it into the new config, but I have my reasons for wanting to do it the above way that I won't go into. Any help is much appreciated.384Views0likes6CommentsCombine and Modify Grep Output
Hi, I'm trying to write a script to output virtual server stats. Can anyone help me modify the output? Right now the GREP output looks like this: Ltm::Virtual Server: www.website.com.443 Bits In 2.1G 0 - Bits Out 2.3G 0 - Ltm::Virtual Server: www.website.com.80 Bits In 1.4G 0 - Bits Out 740.8M 0 - I need help making the output like this: www.website.com.443 Bits In 2.1G Bits Out 2.3G www.website.com.80 Bits In 1.4G Bits Out 740.8M Afterwards, I can diff files from different dates, and figure out which VIPS are not being used.367Views0likes2CommentsConverting NGINX script to F5 iRules
Hii Everyone, Can i ask about converting NGINX script to iRules F5? I have a NGINX script : [root@webdplk conf.d]# cat simponi.conf server { listen 80; listen 443; server_name dplk.bni.co.id; location / { proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Server $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto https; proxy_pass http://192.168.3.187; } location /mobile { rewrite /mobile(.*) /$1 break; proxy_pass http://192.168.3.186:7005/; } } server { listen 7005; server_name dplk.bni.co.id; location / { rewrite /mobile(.*) /$1 break; proxy_pass http://192.168.3.186:7005/; } } [root@webdplk conf.d]# How if that script if convert to F5 IRules?? Thankyouu930Views0likes1Commenttmsh script and pool members
Hi, Probably easy one but not for me 😞 I am looking for simplest and fastest way to verify settings of pool member in given pool/s - for example description. Right now I have such code that is working but maybe there is simpler way? set pool_names [lrange $tmsh::argv 1 end] foreach pn1 $pool_names { foreach obj1 [tmsh::get_config /ltm pool $pn1] { puts $obj1 tmsh::modify /ltm pool $pn1 description "Orange" tmsh::log "Description is [tmsh::get_field_value $obj1 description]" foreach member1 [tmsh::get_field_value $obj1 members] { puts $member1 puts "Pool member desc: \"[tmsh::get_field_value $member1 description ]\"" } } } puts are just for testing of course. So last puts returns description for each pool member in a pool. What puzzles me as well is why after using tmsh::modify /ltm pool $pn1 description "Orange" tmsh::log reports previous value. After script is finished value is set to "Orange" but inside script even after modify old value is reported. I assume as well that there is no need for tmsh save sys config to permanently save changes? Piotr328Views0likes2CommentsWhat causes the TSbd/TSbp script to be inserted into the source code of a website?
In the source code of the website I work on I see that the script below is being inserted. <script type="text/javascript"> //<![CDATA[ window["_tsbp_"] = { ba : "X-TS-BP-Action", bh : "X-TS-AJAX-Request"}; //]]> </script><script type="text/javascript" src="/TSbd/08300f25d2ab20002940ca95b1a84050e4ba6d156f677a6f2819bde419b59b20e8b36a05eca4b390?type=2"></script> As we have AMP pages on our website which doesn't allow any custom JavaScript we would like to not get this script inserted. However, we are having some problems indentifying what exactly is causing this script to be inserted. We do run the WAF on our F5 and I suspect it's the culprit but I have been unable to confirm this. Also, I've been moving around some elements in the <head> tags and when I specifically move our scripts down to the bottom the TSbd/TSbp script is no longer being inserted. What I would like to know is what triggers the TSbd/TSbp script to be inserted. I am starting to think something on the F5 looks at the first X bytes of the page and then decides whether or not to insert the script. I would also like to know if there is more information about this topic available as I've not been able to find a lot. Maybe I am just not searching for the correct thing.1.6KViews0likes1CommentMigration Test Script for LTM
Hello community! I have done quite a few F5 to F5 migrations now. But I have always wondered about utilizing some script to test the applications functionality after a cutover beyond just looking at if the VIP's, pools, nodes are marked as available and running one off curls or tcpdump/ssldumps. Let's start with just LTM. (Although having something similar for GTM would be nice). I was thinking of a bash script or something similar that would: 1) Run curls to all VIP's and the respective ports 2) Collect the relevant results for only important data so it's not so busy (perhaps HTTP response code and 2-3 lines of the body message) 3) Take file of output manually from both F5's (old and new) and compare content in diff editor (notepad++ or beyond compare, etc) A lot of these migrations I have done, all the IP addresses stay the same (VIP's & pool members). It would be nice if the script were able to just match the VIP name in the results as most migrations keep the name the same if the IP addresses do move. Any suggestions? Thanks!208Views0likes1Comment