Forum Discussion
Ed_Carpon_13196
Jan 23, 2014Nimbostratus
Multiple health monitors to pool
Has anyone modified an iApp to include an option to add multiple health monitors to one pool? If so, can you please provide examples of how you did this?
- Jan 27, 2014
I posted my version of this multi-monitor template at https://community.f5.com/t5/codeshare/http-template-with-multiple-monitors/ta-p/278393
Fred_Slater_856
Historic F5 Account
A simple change to the implementation will allow existing monitors to work. Replace:
1,0,1 { monitor $::monitor__monitor }
1,0,0 { monitor $::monitor__monitor }
with:
1,0,1 { monitor [join $::monitor__monitor " and "] }
1,0,0 { monitor [join $::monitor__monitor " and "] }
The "Create a new HTTP monitor" option is trickier to mix with the others, and would take more code changes.
Ed_Carpon_13196
Jan 24, 2014Nimbostratus
I was able to create the separate question successfully in the presentation section, but it looks like I am still having issues in the Implementation section for monitor1.
Presentation
section monitor {
multichoice monitor display "xxlarge" tcl {
package require iapp 1.0.0
set choices "[iapp::get_items ltm monitor http]\n[iapp::get_items ltm monitor https]\n[iapp::get_items -filter NAME != "external" ltm monitor external]"
return $choices
}
choice monitor1 display "xxlarge" default "/create_new" tcl {
package require iapp 1.0.0
set choices "/create_new"
return $choices
}
optional ( ssl_encryption_questions.help == "max" ) {
message monitor_max
}
optional ( monitor1 == "/create_new" ) {
optional ( ssl_encryption_questions.legacy_advanced == "yes"
|| ssl_encryption_questions.advanced == "yes" ) {
string frequency display "medium" required default "30"
optional ( ssl_encryption_questions.help == "max" ) {
message freq_max
}
choice http_method display "xxlarge" default "GET"
optional ( ssl_encryption_questions.help == "max" ) {
message method_max
}
}
Implementation
1,1,1 { monitor1 [iapp::conf create ltm monitor $http_or_https \
${app}_${http_or_https}_monitor \
defaults-from $http_or_https \
interval $::monitor__frequency \
timeout [expr { $::monitor__frequency * 3 + 1 } ] \
[expr { [iapp::is ::monitor__anonymous "no"] ? \
"username $::monitor__user password $::monitor__passwd" : "" }] \
send [iapp::substa send_string_arr($advanced,$http11,$http_post)]\
recv '$::monitor__response'] }
1,1,0 { monitor1 [iapp::conf create ltm monitor $http_or_https \
${app}_${http_or_https}_monitor \
defaults-from $http_or_https \
interval 30 \
timeout 91 \
send [iapp::substa send_string_arr($advanced,$http11,$http_post)]\
recv '$::monitor__response'] }
1,0,1 { monitor1 [join $::monitor__monitor " and "]}
1,0,0 { monitor1 [join $::monitor__monitor " and "]}
* { monitor1 none }
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