How to Set Service Monitoring Status Based on Another Related Service on NetScaler

How to Set Service Monitoring Status Based on Another Related Service on NetScaler

book

Article ID: CTX118896

calendar_today

Updated On:

Description

This article describes how to configure service monitoring so that the health of one service is tied to the health of another potentially related service. For service A to fail, either services A or B must fail their monitors.

Background

The NetScaler allows multiple monitors to be bound to a service. These monitors by default monitor the service they are bound to, but can be configured to monitor any destination IP address, port, or both. A practical example of this is a web server which makes a call to a back end database server where, if the database server fails, you also want the web server to be marked as down.


Instructions

Complete the following procedure to configure Service Monitoring:

  1. Configure the two services:
    add service http_brown 10.198.4.61 HTTP 80
    add service database_purple 10.198.4.62 HTTP 80

  2. Set the service monitoring threshold to 11 on HTTP service which depends on the database service for its health. When this value is combined with monitor weights it allows you to control how many monitors must fail before you consider the service down. In this case if either monitor fails, NetScaler marks the service as down:
    set service http_brown -monThreshold 11

  3. Configure the monitors.
    Two of the monitors uses default settings and verifies the services they are bound to, and the third monitor verifies database_purple specifically and is bound to http_brown.
    Notice that when the monitor database_check is bound to http_brown it is bound with a weight of 10. By default, a monitor has a weight of 1, so if you take the 10 from database_check plus the 1 from the HTTP monitor, you arrive at a threshold of 11. As long as both of these monitors are up, the threshold is satisfied. If any one of the monitors fails the threshold is no longer satisfied and the service is marked as down:
    add lb monitor database_check TCP -LRTM ENABLED -destIP 10.198.4.62 -destPort 80
    bind lb monitor http database_purple
    bind lb monitor database_check http_brown -weight 10
    bind lb monitor http http_brown

When using this configuration http_brown will fail if its own default HTTP monitor fails, or if its database_check monitor fails. This ensures that if the back end database server is down, NetScaler also mark the dependent web server down.

Issue/Introduction

This article describes how to configure service monitoring so that the health of one service is tied to the health of another potentially related service.