Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Attention: The Community will be in read-only mode on 12/14/2017 from 12:00 am pacific to 11:30 am.

During this time you will only be able to see content. Other interactions such as posting, replying to questions, or marking content as helpful will be disabled for few hours.

We apologize for the inconvenience while we perform important updates to the Community.

New Member

CSS Keepalive Script


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

New Member

Re: CSS Keepalive Script

Could you please send output of your script?

show script your_script_name



Cisco Employee

Re: CSS Keepalive Script

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.


New Member

Re: CSS Keepalive Script

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

CreatePlease to create content