Forum Discussion
Payload irule to send specficic event data to another pool
Hi, Currently I have and iRule that sends and exact copy of data to two different pools. How do I just send specific data to pool A? so for example if I wanted to look in the payload and send anything that contained the word CISCO to just pool A and nothing else but continue to send Cisco and all the other data to Pool B. My current iRule to send equal copy of data to both pools is as follows but I want to just send CISCO to pool A
when CLIENT_ACCEPTED { set hsl [HSL::open -proto UDP -pool pool_A] set hsl1 [HSL::open -proto UDP -pool pool_B]
} when CLIENT_DATA { HSL::send $hsl [UDP::payload] }
7 Replies
What is the purpose of $hsl1 ? Its getting defined and not used?
Cheers, Kai
- rmoss25
Altostratus
Hi, hsl1 is sending a copy of the payload to pool_B. Just to elaborate we are sending syslog event data to a VIP and using this iRule to send a mirrored copy to both pool A and pool B. But what I would like to do is is find a way to just send CISCO events to pool A and send the rest of the data, including CISCO events to pool B.
In the end you dont want to mirror the syslog data, but instead content-switch the individual syslog request either to pool A or pool B based on certain key words?
Cheers, Kai
- rmoss25
Altostratus
Sort of. I am sending Cisco, checkpoint and juniper logs to my VIP. I want to send just Cisco to pool A and send those same Cisco logs as well as checkpoint and juniper to pool B.
- Stanislas_Piro2
Cumulonimbus
Hi,
If you want to send same data, you can use clone pool command.
Okay, I've got the point and will post some useful snippets below... :-)
Cheers, Kai
Hi Rmoss25,
you may use the iRules below to parse the incomming SYSLOG message for a specific keywords and forward the request which are containing the string "CISCO" additionally to pool A.
when CLIENT_ACCEPTED { set hsl [HSL::open -proto UDP -pool pool_A] } when CLIENT_DATA { if { [UDP::payload] contains "CISCO" } then { HSL::send $hsl [UDP::payload] } }
Cheers, Kai
Recent Discussions
Related Content
* 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