Forum Discussion
prasadpkulkarni
Nimbostratus
Apr 20, 2011HTTP health monitor using iRule
Hi
Need help to configure Health Monitor using iRule
- We have two web Servers in Active / Standby mode , running three websites on each server (on three seperate IP with IP Bindings) , our requirement is if any one of the website in a Pool goes down , all web sites should be shifted to other Pool.
Issue with normal HTTP health monitor is that it deosn't detect the health monitor ( ASP page) configured for other website ( It should be because it deosn't find path for the Virtual directory) , so the health monitor marks the site as down even if it is up. Is there any way to make it work with help of iRule or any ?? please refer me to the solution if already provide ( I am new to this group)
Thanks & regards
14 Replies
- naladar_65658
Altostratus
Welcome Prasad!
This one probably belongs over in the Management, Reporting and Logging area:
http://devcentral.f5.com/Community/TopicGroups/tabid/1082223/asg/44/showtab/groupforums/Default.aspx
That being said here are few areas you might want to check out..
Tips for health monitors:
http://devcentral.f5.com/wiki/default.aspx/AdvDesignConfig/ApplicationHealthMonitoring.html
Here is a good post for creating a simple health monitor:
http://devcentral.f5.com/Community/GroupDetails/tabid/1082223/asg/44/aft/61823/showtab/groupforums/Default.aspx - naladar_65658
Altostratus
Check that area and post out. If you still run into an issue when trying to configure the monitor you might post a little more detail and provide the nitty gritty details of what your monitor needs to check, url path, timeouts on the monitor and stuff like that. - prasadpkulkarni
Nimbostratus
Hi Nathan,
Thanks for reply , I have gone through those link & posts but seems to be quite heavy for me ( at this stage at least :( !!!. ) , My requirment is like this
We have two webserver with three websites.
IP SERVER site
x.x.x.1 WebSrv_1 www.abc.com ; www.123.com ; www.xyz.com ( Pool 1)
x.x.x.2 WebSrv_2 www.abc.com ; www.123.com ; www.xyz.com (Pool 2)
We have three health monitor abc.asp , 123.asp , xyz.asp , this health monitor prduces an output ( Receive string) depending on IIS & Database accordingly the pool becomes up and down.
Our requirement is any one of the website in a pool goes down , remaining 2 websites also should be marked down.
logic should be something like ....if (abc & 123 & xyz ) are OK then WebSrv_1 else WebSrv_2
let me know if you need any further details
thanks - Michael_Yates
Nimbostratus
You can do things like checking the number of pool members available before sending traffic to the pool with an iRule, but I don't think that you can check the availability of a downstream application status with an iRule.
The Pool can have numerous Health Checks applied to it and requirements on the number of health checks that must be successful in order to have the node marked up, but that would be an all or nothing.
I would suggest setting up a different pool and health check per site if you really want to be as accurate as possible. - prasadpkulkarni
Nimbostratus
Hi Michael,
Can you give samples of the iRule that you mentioned ?
I tried configuring multiple health checks on each pool , but it didn't work.
Thanks - prasadpkulkarni
Nimbostratus
Nathan / Michael --- Any clues or examples ??
Thanks in Advance.
Regards,
Prasad. - hoolio
Cirrostratus
Hi Prasad,
You could create three custom monitors that check your logic for abc.asp, 123.asp and xyz.asp. If you hardcode the destination port in the monitors and assign each of the monitors to both pool members and set the pool to require all monitors succeed, if any one monitor fails the pool member will be marked down.
If that's not the exact logic you want, can you give example IP:ports and host header values for the different web apps and explain how you want the dependencies built?
Thanks, Aaron - prasadpkulkarni
Nimbostratus
Hi Aaron,
Thanks for the reply , I did exactly same thing for montoring , however it didn't work , the issue I faced is the health monitor only work for that particular website i.e "abc.asp" works for "www.abc.com" only , remaining two monitors i.e 123.asp & xyz.asp marks the node as down even if it is up.
Monitors are as below
for "ABC" - get http://abc.com/include/abc.asp - receive string "abc"
for "123" - get http://123.com/123.asp - receive string "123"
for "xyz" - get http://xyz.com/dir/xyz.asp - receive string "xyz"
Now if I apply all three monitors for one wesbite ..say for abc.com - only "ABC" monitor works remaining two i.e 123 & xyz marks the node as down even if it is up , same is for other website.
Can you help ?
Thanks & regards,
Prasad. - Colin_Walker_12Historic F5 AccountIf you have all three sites running on both nodes in the pool, then why wouldn't all three monitors return true for both servers?
I think I'm a little bit confused by the requirements here. If you need to monitor 3 sites on each server, and all 3 are running on each server, then your above logic would work correctly, wouldn't it?
Colin - prasadpkulkarni
Nimbostratus
Hi Colin ,
Logic is simple and straightforward ..but it's not working :( !!
The reason that I am assuming are
1) Three websites are on three different IP's.
2) The Virtual directory for three web sites are different.
So when the health monitor tries to look for the .asp page other than it's own , it does not find the directory and gives an error 404 ( file or directory not found) and eventually it marks the node as down.
Is there any possibility that iRule will monitor the website independently and decides the pool ??
Thanks & regards,
Prasad.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects