jaikumar_f5_226
Mar 03, 2019Nimbostratus
Pass Alert Message as Arguments to custom script
Hi All,
I couldn't find much on this, so I thought I rather ask in the forum.
My requirement:
Whenever there's a particular log observed, I'm planning to make custom alerts and execute a command.
So I'd have to touch the user_alert.conf file to add my alert to something like below.
alert my_alert_name "" {
exec command="/path/tomy/script"
}
But would I be able to pass the matched message as an argument to my execution script.
alert my_alert_name "" {
exec command="/path/tomy/script "
}
Note: My matched message is dynamic and would be having something like,
The inbound request is /abcd/xyz
Basically it's the log local0. Msg coming from Irule. So if I could pass the complete matched message as argument, my script has the functionality to filter my uri's and perform certain functions.
Or does anyone has suggestions/alternatives or ideas in achieving this.