How to return a customized error page when the LB is Out Of Service in NetScaler
1.Create a backup LB virtual server. The service IP bound to this LB vserver can be any IP.
add lb vserver backup HTTP 0.0.0.0 0 -persistenceType NONE -cltTimeout 180 => We don't need an IP for this backup virtual server.
bind lb vserver backup <service_name>
2.Disable the health monitor for the service, so the LB service and virtual server will be always UP.
set service <service_name> -healthMonitor NO
3.bind your responder policy to this backup LB virtual server
add responder action redirect-act respondwithhtmlpage error.html -responseStatusCode 200
add responder policy redirect-pol "SYS.VSERVER(\"<vs_name>\").STATE.EQ(OUT_OF_SERVICE)" redirect-act =><vs_name> is the name of the LB that the clients will visit and we would like to return a customized error page when this LB is Out of Service.
bind lb vserver backup -policyName redirect-pol -priority 100 -gotoPriorityExpression END -type REQUEST
4.set this LB virtual server as a backup virtual server for the LB that you want to monitor its health
https://docs.netscaler.com/en-us/citrix-adc/current-release/load-balancing/load-balancing-protect-configuration/config-backup-vserver.html
set lb vserver <vs_name> -backupVServer backup
With the above configuration , when the primary LB is DOWN or Out of Service, the backup LB will hit and the responder policy will be evaluated.