Login to the leader node (10.10.25.10) and use the configure gslbhealthmonitor <monitor name> command to provide type and port number for the monitor.

: > configure gslbhealthmonitor global-http-hm
: gslbhealthmonitor> type health_monitor_http
: gslbhealthmonitor> monitor_port 80
: gslbhealthmonitor> save

Configuring GSLB External Health Monitor

The external health monitor allows scripts to be written to provide highly customized and granular health checks. The scripts may be Linux shell, Python, or Perl, which can be used to execute wget, netcat, curl, snmpget, mysql-client, or dig. External monitors have constrained access to resources, such as CPU and memory to ensure the normal functioning of NSX Advanced Load Balancer SEs. As with any custom scripting, thoroughly validate the long-term stability of the implemented script before pointing it at production servers.

The following is the sample script to use an external health monitor.

Here is a sample script/example:

 #curl -v $IP:$PORT >/run/hmuser/$HM_NAME.$IP.$PORT.out
 #echo "$IP" > "/tmp/myfile"
 #echo "$PORT" > "/tmp/myfile"
 if [[ $IP =~ : ]];
 then curl -v [$IP]:$PORT;
 else curl -v $IP:$PORT;
 fi

$IP and $PORT are the pool member’s IP address and port for the health monitor.

Note:

This tmp file information logging is not recommended for production setup and is recommended only for debugging.

An external health monitor can be used to monitor other entities in addition to GSLB pool members.

Sample script:

#!/bin/bash
curl -I https://www.avinetworks.com:443 2>/dev/null | head -n 1 | grep "200"
Note:

When an external health monitor is used for an entity other than the GSLB pool members ( as shown in the script above), it is mandatory to have a different SE group for DNS and load balancing virtual service.