Configure a Maintenance Page on NetScaler IMP
A Quick Guide to Setting Up Responder Policies in NetScaler
Website Visitors:In this guide, we will set up a maintenance page using a responder policy on NetScaler. We’ll cover both the Graphical User Interface (GUI) and the Command Line Interface (CLI) for creating a responder action, responder policy, and binding it to a load balancing virtual server (vServer). Additionally, we will create a custom HTML page for the maintenance message, upload it to the NetScaler, and use it in the responder action.
Step 1: Create a Custom HTML Page
Before configuring the responder action, we need a custom HTML page that will display the maintenance message. You can design your own maintenance page with custom text, styling, and images. Here’s a basic example:
|
|
- Replace the
your-image-url-here
with the URL of any custom image you’d like to display. - Save this file as
Maintenance_Window_HTMLPage.html
.
Step 2: Upload the HTML Page to NetScaler
-
Log in to the NetScaler GUI.
-
Navigate to AppExpert → Responder → HTML Page Imports.
-
Click Add and Enter a Name (Maintenance_Window_HTMLPage), Select “File” option under “Import From” option. Under “Local File” option browse to the html file you created earlier.
-
The HTML page is now uploaded to the NetScaler and can be used in the responder action.
Step 3. Create the Responder Action
Using GUI:
- After importing the HTML file, go to AppExpert → Responder → Actions.
- Click on the Add button to create a new responder action.
- Enter
"Maintenance Window Action"
in the Name field. - Choose Respond with HTML Page as the Action Type.
- In the HTML Page field, select the page you imported earlier (
Maintenance_Window_HTMLPage
). - Set HTTP Status Code to
503
(Service Unavailable). - Click Create.
Using CLI:
Run the following command to create the responder action:
|
|
This creates a responder action that serves the custom maintenance HTML page with the HTTP status code 503
(Service Unavailable).
Step 4. Create the Responder Policy
Using GUI:
- Go to AppExpert → Responder → Policies.
- Click on the Add button to create a new responder policy.
- Enter
"Maintenance Window Policy"
in the Name field. - Under Action, choose the responder action you created earlier (
Maintenance Window Action
). - Under Expression, use
SYS.TIME.WITHIN(GMT 2024 OCT 07 13h 05m,GMT 2024 OCT 07 13h 15m)
. Change this to the time as you need. This is in GMT format. - Click Create.
Using CLI:
Run the following command to create the responder policy:
|
|
This command creates a policy that triggers the Maintenance Window Action
during the specified time window.
Step 5. Bind the Responder Policy to a Load Balancing vServer or Citrix Gateway
Using GUI:
- Navigate to Traffic Management → Load Balancing → Virtual Servers.
- Select the virtual server (vServer) you want to apply the policy to (e.g.,
"WebServer LB"
). - Click on Policies under the vServer’s settings.
- Choose Responder from the drop-down and type as Request.
- Select
"Maintenance Window Policy"
from the list of policies. - Set Priority to
100
. - Click Bind.
Using CLI:
Run the following command to bind the policy to the load balancing virtual server:
|
|
This binds the responder policy to the WebServer LB
virtual server with a priority of 100
.
Final Notes
- The responder policy will automatically activate during the specified time window, serving the maintenance page to users.
- After the time window elapses, users will no longer see the maintenance page.
With this setup, your NetScaler will effectively handle planned maintenance, presenting a custom message and maintaining a professional experience for users during downtime.
Want to learn more on Citrix Automations and solutions???
Subscribe to get our latest content by email.