09-Oct-2020 08:10
Hi All,
I am working on to turn off connection mirroring on all the legacy VIPs which are causing application performance degradation. Is there a way to automate and discover virtual server with connection mirroring enabled via script? and also disable automatically?
Thanks
Solved! Go to Solution.
16-Oct-2020
10:10
- last edited on
04-Jun-2023
21:14
by
JimmyPackets
Hello Macaron.
You need to perform bash engineering. Some examples:
tmsh list ltm virtual mirror | grep -B1 enabled
tmsh list ltm virtual mirror | grep -B1 enabled | grep ltm | awk '{print $3}'
tmsh list ltm virtual one-line all-properties | grep "mirror enabled" | awk '{print $3}'
tmsh -q -c "cd / ; list ltm recursive one-line all-properties" | grep "mirror enabled" | awk '{print $3}'
# This last one to capture VS located in different partitions.
Regarding the 1000 records, you should not have any problem, but it's better to execute it when CPU/RAM consumption in management plane is low.
Regards,
Dario.
10-Oct-2020
13:22
- last edited on
04-Jun-2023
21:15
by
JimmyPackets
Hello Macaron.
You can use some of these commands
## Check Mirroring Enabled
tmsh show sys connection type mirror
tmsh show sys ha-mirror
Regards,
Dario.
12-Oct-2020 11:43
The first command returned 1200 plus connection records for 37 VIPs in total on F5. I need to identify VIPs which has connection mirroring enabled. Is there any command for that?
14-Oct-2020
00:24
- last edited on
04-Jun-2023
21:15
by
JimmyPackets
Hello Macaron.
You can check what SNAT IPs are mirroring with the next command:
tmsh list ltm snat mirror
The same for those VS that are mirroring their connections:
tmsh list ltm virtual mirror
And finally, the same for those VS that are mirroring their persistence records:
tmsh list ltm virtual mirror persist { $(tmsh list ltm persistence one-line all-properties | grep "mirror enabled" | awk '{print$4}') }
For disabling mirroring, you just need to modify the 'mirror' option as expected.
REF - https://support.f5.com/csp/article/K13478
Please, don't forget to mark this answer as the best to help me for this contribution.
Regards,
Dario.
16-Oct-2020 09:50
Dairo,
16-Oct-2020
10:10
- last edited on
04-Jun-2023
21:14
by
JimmyPackets
Hello Macaron.
You need to perform bash engineering. Some examples:
tmsh list ltm virtual mirror | grep -B1 enabled
tmsh list ltm virtual mirror | grep -B1 enabled | grep ltm | awk '{print $3}'
tmsh list ltm virtual one-line all-properties | grep "mirror enabled" | awk '{print $3}'
tmsh -q -c "cd / ; list ltm recursive one-line all-properties" | grep "mirror enabled" | awk '{print $3}'
# This last one to capture VS located in different partitions.
Regarding the 1000 records, you should not have any problem, but it's better to execute it when CPU/RAM consumption in management plane is low.
Regards,
Dario.
19-Oct-2020
06:04
- last edited on
04-Jun-2023
21:14
by
JimmyPackets
Regarding the y/n, you can stop that by this,
tmsh modify cli preference pager disabled display-threshold 0
19-Oct-2020
08:32
- last edited on
24-Mar-2022
01:11
by
li-migration
Thank you guys. you are the best
19-Oct-2020
08:17
- last edited on
04-Jun-2023
21:14
by
JimmyPackets
if you want to disable it on all VS :
modify ltm virtual all mirror disabled