cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
563
Views
0
Helpful
3
Replies

CSS Keepalive Script

yves.haemmerli
Level 1
Level 1

Hi,

I am writing a keepalive script, which put the service in active mode or in suspended mode, depending on a web page content, requested by the script. It works very good from active to suspended, but once in suspended mode, the keepalive script is not run anymore and therefore cannot detect the page, which should put the service back online! Is there a way for the keepalive to continue, even if a service is suspended ?

Thank you

Yves Haemmerli

3 Replies 3

vnovakov
Level 1
Level 1

Could you please send output of your script?

show script your_script_name

Regards,

Vladimir

Gilles Dufour
Cisco Employee
Cisco Employee

did you capture a trace to confirm the keepalive was not running anymore ?

If a service is manually suspended, the keepalive will stop.

But if it is down, the keepalive should continue.

The interval between keepalive can change when the service is down. This time is defined with the command 'keepalive retryperiod'.

By default it is 5 sec.

Gilles.

Yes, I traced what the script does and it is clear to me that the keepalive stops if the service is put in suspended mode. I agree with you, if the service is down, the keepalive continue every retryperiod.

But I solved my problem in the following way : I created a second service, which uses another script (actually a subset of the first script), which also monitors the test pages on the server. This second script always exits with return code 0 (sucessful) and therefore never stops working. As soon the second script recognizes the character string "PORTALUP" in the test page, it sets the first service in active mode, which restarts the keepalive scheduling. It works perfectly and this allows to put a server in maintenance mode (suspend) from the server itself, without to stop existing user flows.

As this is a workaround solution, it would be better if the CSS would continue to keepalive in suspend mode...

Yves Haemmerli