Forum Discussion
irule to help me sleep
Hi all, hoping to get some pointers on how to start this little effort and to find out if it is even possible.
Like many of you, you are likely responsible for your companies websites, and in our case we have an external monitoring service that lets me know when things are not quite right, and often it seems to happen in the wee hours of the morning when I'm trying to sleep. In this age of social networking, it seems that more and more, our business is using the Facebook like button, along with the Twitter tweet button. With all sites, there are days when even the big boys are having network or server issues. What frustrates me, is that I'll get alerted because these assets are not responding, or are very slow. The worse part is, there is really nothing that I can do as an IT person to stop it. Well I'm hoping with my F5 in hand that this isn't the case.
What I'd like to be able to do, is create an iRule that looks at the response from our web servers, and if it sees a certain URL, that it just replaces it with something benign or nothing at all. So effectively what I'm hoping to do is to remove the Facebook like button and/or the Twitter tweet button HTML code from being sent to the user.
My thoughts are that they are down anyhow, so the fact that the button doesn't show in the first place, it's likely its not working either, so if they were missing altogether what would it matter. I'm tying to be a bit selfish here for my own sanity.
Here is a sample snippet of how we use it today:
<iframe src="..." scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:145px; height: 20px;" allowTransparency="true">iframe><br>
So what I'm hoping to do is write an iRule that effectively neutralizes the above, and doesn't show the offending item.
I'll still get alerted when it happens, but at least I can either enable an iRule, or add some text to a data group or something to disable the links and then go back to bed, when they get things working again, I'd just turn it back on. I'm hoping to make it generic enough to apply to things like pixels as well as those too are often issues.
Can anyone here offer some pointers on how I might proceed with this one? Any articles or references would be great.
- c_p_i_o_17707Historic F5 AccountI'm wondering if the use of sideband connections (introduced in v11) could be used to solve this problem.
- Michael_YatesNimbostratusHi Dave,
- L4L7_53191NimbostratusAgreed. Stream expressions are the way to go here, but I'll add a twist: I would consider setting dummy pools for both facebook and twitter so you actually monitor them. In your rule you can then simply check the status of the pool(s). If up, don't modify the response content. If not, null it out. From a design perspective the advantage to this is that you're not actually monitoring via the data plane, like a sideband connection or HTTP::retry would do: in other words, you're not potentially stalling the response waiting for an OOB connection to another site. Native BigIP monitoring facilities seem like a better choice here, and allow you the same flexibility if not more.
- Sam_Parkes_1110NimbostratusHi - I'm also very interested to hear the outcome of your tests with stream expressions, but just a thought to help you sleep for now, as I totally understand.
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