06-14-2007 07:36 AM
I have a service dependent on two separate keepalive ports for an ip address. The first keepalive monitors the root server web service and the second keepalive monitors an application web service on the server. If either go down I want the Load Balancer to stop services to that VIP.
I would like the state to go down if either service keepalive goes down or how can I have keepalive services watch each other and go down if it sees the other service down.
Thanks
Solved! Go to Solution.
06-14-2007 06:49 PM
On the CSS you can use the ap-kal-httplist:
The script "ap-kal-httplist" will check a list of webpages with a HEAD request and will be considered failed if any of the pages does not
answer or replies with something different that "200 OK". With it, you should be able to check the status of both the web server and
applications server at the same time.
The correct syntax to use this script is /"keepalive type script ap-kal-httplist "server1 web1 server2 web2 ...."", /so for your environment, you will need to use something like:
service test
ip address 10.10.10.11
protocol tcp
port 80
keepalive port 80
keepalive type script ap-kal-httplist "10.10.10.11 /index_web.html
/index_app.html"
active
Also you use the ap-kal-tcpports:
http://www.cisco.com/en/US/products/hw/contnetw/ps792/products_tech_note09186a00801e1e14.shtml
You need to copy the script and then upload it into the CSS, it open a socket connection for the amount of ports that you need.
Hope this help.
- Rodrigo
06-15-2007 10:48 AM
1. Save the script text as a file with no extension. i.e. ap-kal-tcp-ports
Script text is available at
http://www.cisco.com/en/US/products/hw/contnetw/ps792/products_tech_note09186a00801e1e14.shtml
(
stating line :!--- No echo.
Ending line: function SOCKET_CONNECT end )
2. Open an FTP session to the CSS (use CSS credentials).
3. change the directory to scripts
4. upload the file (ap-kal-tcp-ports)
5. configure keepalive type ap-kal-tcp-ports under service
service server1
ip address 192.168.1.1
port 80
protocol tcp
ap-kal-tcp-ports "192.168.1.1 80 2099"
keepalive freq 15
6. Activate the service
7. Activate the Content rule
hope it helps
Syed iftekhar Ahmed
06-14-2007 11:26 AM
You didnt mention the Loadbalancer you are using.I will discuss all the three Cisco LBs for multiple probes requirement
If you are using CSS
There is a custom scripted keepalive; which tests different TCP, however TAC does not
support scripted keepalives.
Cisco TAC can provide you with the script.I dont remember the name of the script but it checks two ports and mark the service down if either one of the probe fails.
On CSM
when you configure multiple probes for the same serverfarm, all of them
have to be succeful in order to maintain the servers in serverfarm OPERATIONAL
serverfarm sfarm1
nat server
no nat client
real 1.1.1.1
inservice
real 1.1.1.2
inservice
probe PING
probe GET
In the above example if we are CSM doesnt get a GET response, CSM will mark it down inpsites of the fact that pings from CSM to service are successful.
On ACE
Similar to CSM if you configure multiple probes, service will go down as soon as one probe fails
Hope it helps
Syed Iftekhar Ahmed
06-14-2007 06:49 PM
On the CSS you can use the ap-kal-httplist:
The script "ap-kal-httplist" will check a list of webpages with a HEAD request and will be considered failed if any of the pages does not
answer or replies with something different that "200 OK". With it, you should be able to check the status of both the web server and
applications server at the same time.
The correct syntax to use this script is /"keepalive type script ap-kal-httplist "server1 web1 server2 web2 ...."", /so for your environment, you will need to use something like:
service test
ip address 10.10.10.11
protocol tcp
port 80
keepalive port 80
keepalive type script ap-kal-httplist "10.10.10.11 /index_web.html
/index_app.html"
active
Also you use the ap-kal-tcpports:
http://www.cisco.com/en/US/products/hw/contnetw/ps792/products_tech_note09186a00801e1e14.shtml
You need to copy the script and then upload it into the CSS, it open a socket connection for the amount of ports that you need.
Hope this help.
- Rodrigo
06-15-2007 06:19 AM
all I want to do on my CSS11506 is monitor this server ip 192.168.1.1 address and port 80(web service) and 2099(app service) so that if either of these ports goes down the state goes down and users are directed to other server and vice versa.
service server1
ip address 192.168.1.1
port 80
protocol tcp
keepalive port 80
keepalive type tcp
keepalive freq 15
service server1
ip address 192.168.1.1
port 2099
protocol tcp
keepalive port 2099
keepalive type tcp
keepalive freq 15
service server2
ip address 192.168.1.1
port 80
protocol tcp
keepalive port 80
keepalive type tcp
keepalive freq 15
service server2
ip address 192.168.1.1
port 2099
protocol tcp
keepalive port 2099
keepalive type tcp
keepalive freq 15
content with vip and add services
and
group vip and add destination services
thanks
06-15-2007 10:48 AM
1. Save the script text as a file with no extension. i.e. ap-kal-tcp-ports
Script text is available at
http://www.cisco.com/en/US/products/hw/contnetw/ps792/products_tech_note09186a00801e1e14.shtml
(
stating line :!--- No echo.
Ending line: function SOCKET_CONNECT end )
2. Open an FTP session to the CSS (use CSS credentials).
3. change the directory to scripts
4. upload the file (ap-kal-tcp-ports)
5. configure keepalive type ap-kal-tcp-ports under service
service server1
ip address 192.168.1.1
port 80
protocol tcp
ap-kal-tcp-ports "192.168.1.1 80 2099"
keepalive freq 15
6. Activate the service
7. Activate the Content rule
hope it helps
Syed iftekhar Ahmed
06-26-2007 05:49 AM
06-26-2007 05:58 AM
When I ran script ap-kal-tcp-ports both ports opened however I received error at end
Error could not remove variable.
attached script play result
06-26-2007 06:16 AM
When I ran script ap-kal-tcp-ports both ports opened however I received error at end
Error could not remove variable.
attached script play result
06-27-2007 03:24 AM
Syed, this worked perfectly. I am monitoring both ports and have tested if one goes down the service is down and requests go to other service. For new people, the 5th line in above config is:
keepalive type script then the ap-kal etc...
Thanks, and the only thing I am watching now is when the service goes down clients have to refresh the page from no service page, unless there is an auto redirection that I can put in config above. I'll update if I can figure it out.
Thanks
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide