Monday 13 January 2020

Creating an F5 Pool And Assign Multiple Health Monitors To It

Say I create two nodes SERVER1 and SERVER2
create ltm node SERVER1 description SERVER1 address 10.1.1.1%200
create ltm node SERVER2 description SERVER2 address 10.1.1.2%200
After I added the nodes I wanted to create a pool and assign it multiple Health Monitors instead of just a single one. In my script I have something like this
create ltm pool some_pool_1 members add { SERVER1:0 SERVER2:0 } monitor health_monitor_1 health_monitor_2 monitor_3 health_monitor_4 health_monitor_5
This will only assign this health_monitor_1 before throwing a Syntax Error: "health_monitor_2" unknown property. When I go into health_monitor_1 I can see SERVER1 and SERVER2 but when I go into any of the other Health Monitors I do not see the nodes SERVER1 and SERVER2in there. I have to go into the Pool and manually assign it the other Health Monitors. Can someone help me change my script create ltm pool some_pool_1 members add { SERVER1:0 SERVER2:0 } monitor health_monitor_1 health_monitor_2 monitor_3 health_monitor_4 health_monitor_5 to be able to assign multiple health monitors to my pool?

solution:--
If you want to attach multiple monitors to the pool you are creating, you need to put them in parentheses:
create ltm pool p1 members add { 10.1.1.1:80 10.1.1.2:80 } monitor "http https"
or, if you want to have a minimum number of two monitors working:
create ltm pool p1 members add { 10.1.1.1:80 10.1.1.2:80 } monitor min 2 of { tcp http https } 

No comments:

Post a Comment

iRule

  iRule: -- o iRule is a powerful and flexible feature within the BIG-IP local traffic management (LTM). o IRule is a powerful & flexibl...