Forum Discussion
Maneesh_72711
Cirrostratus
Apr 26, 2017Error saving/syncing the config between the LTM's
I got below i-rule when I save and try syncing the config it throws up error.
Maneesh_72711
Cirrostratus
Apr 26, 2017when HTTP_REQUEST { IP Block. Allow specific users/groups to access the status page. if { [IP::addr [IP::client_addr] equals 10.0.0.0/8 ] } { if { [HTTP::uri] eq "/json" } { set response "{ \"PD\": ["
foreach { selectedpool } [class get test] {
set thispool [getfield $selectedpool " " 1]
if { [catch {
if { [active_members $thispool] < 1 } {
Pool Status for pools with no active members
append response "{\"PN\": \"$thispool\","
append response "\"PS\":\"Inactive\"},"
} else {
Pool Status
append response "{"
append response "\"PN\": \"$thispool\","
append response "\"PMD\": \["
Pool Member Status Section
foreach { pmem } [members -list $thispool] {
append response "{\"PM\": \"$pmem\","
set nodestatus "[LB::status pool $thispool member [getfield $pmem " " 1] [getfield $pmem " " 2]]"
if {$nodestatus == "up"} {
append response "\"PMS\": \"Up\""
} elseif {$nodestatus == "down"} {
append response "\"PMS\": \"Down\""
} elseif {$nodestatus == "session_disabled"} {
append response "\"PMS\": \"Disabled\""
} else {
append response "\"PMS\": \"$nodestatus\""
}
set nodestatus null
append response "},"
}
append response "{}\]},"
}
} errmsg ] } {
append response "\"PNError\": \"$thispool: ERROR: Invalid pool name\""
}
}
append response "{}\]}"
End Pool Member Status Section
HTTP::respond 200 content $response "Content-Type" "application/json"
}
} }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
