Forum Discussion
Need to remove health monitor on 1000's of pools and add a new health monitor
- Jan 23, 2021
Everything jaikumar_f5 said about CPU utilization - absolutely true.
However, I see three ways of doing this.
One-liner, replaces the monitor on any pool.
tmsh list ltm pool one-line | awk '{ print $3 }' | xargs -I pl_name tmsh modify ltm pool pl_name monitor <NEWMONITOR>
Two-liner, first it filters for any pool that has "HTTP" in its name and then writes the pool name to a txt file.
tmsh list ltm pool one-line | grep -E 'HTTP' | awk '{ print $3 }' >> /shared/tmp/<FILENAME>.scf for pl in `cat /shared/tmp/<FILENAME>.scf`; do tmsh modify ltm pool $pl monitor <NEWMONITOR> ; echo "$pl done" ; done
And last example, a two liner with manual intervention. It will write all pools to a txt file. You have to modify the text file manually and cut&replace the monitors manually, with vi or nano or else.
Afterwards you load the config from tmsh.
tmsh list ltm pool one-line >> /shared/tmp/<FILENAME>.scf # nano or vi /shared/tmp/<FILENAME>.scf load sys config file /shared/tmp/<FILENAME>.scf merge
Thank you jaikumar_f5 and Daniel Wolf. This is switch from the standard tcp profile to a custom tcp profile. I originally thought I could just modify the standard TCP Profile but on the version I'm on you can't. thank you the second one with two-lines worked great. I will do more testing on my dev LTM and monitor CPU before using on prod.
For profiles the tmsh command would be different, here an example for Client-side SSL profile
tmsh modify ltm virtual vs_myserver_443 profiles add { clientssl_myserver_new } profiles delete { clientssl_myserver_old }
Recent Discussions
Related Content
* 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