Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 

iRule Sideband datagroup

fraandres
Nimbostratus
Nimbostratus

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"]

}

3 REPLIES 3

xuwen
MVP
MVP

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 "

thank you for your response just curious how would I do this " store the client IP address in the irules table"