17-Mar-2023 07:56 - edited 17-Mar-2023 08:26
Hello pretty new to creating iRules specially sidebands, what I want to accomplish is get an IP from an APM session and drop it on a datagroup with a sideband. This is what I have below not sure if I'm in the right path
when ACCESS_POLICY_COMPLETED {
set clientip [ACCESS::session data get "session.user.clientip"]
set send_info [send -timeout 1000 -status send_status $conn_id $clientip]
send data [send"/mgmt/tm/ltm/datagroup/internal/active_visitor_ips\?options=\/"$clientip/""]
#set data [send PATCH {"op": "add", "path": "/mgmt/tm/ltm/datagroup/internal/active_visitor_ips\&options\=$clientip/-", "value": "$clientip" }]
}
when ACCESS_SESSION_CLOSED {
set clientip [ACCESS::session data get "session.user.clientip"]
}
17-Mar-2023 08:51
Why not store the client IP address in the irules table or use HSL send client ip to syslog server?
You keep modifying the datagroup through the icontrolrest API will cause F5 icontrolrest api error and restjavad busy
and in tcl, you need to escape special characters in json or dict, such as { or "
17-Mar-2023 10:39
thank you for your response just curious how would I do this " store the client IP address in the irules table"
17-Mar-2023 22:39