we have ntp server which map to pool. we have create VS for this pool. All network device pointed to this VS to sync the time. we want to configure Health check for these server
these server are windows server. Please suggest if you understant my problem
[root@ve1023:Active] config b monitor ntp_mon list
monitor ntp_mon {
defaults from external
run "ntp_mon.pl"
}
[root@ve1023:Active] config ls -l /config/monitors/
total 19
-rwxr-xr-x 1 root root 3006 Sep 30 00:33 arg_example
lrwxrwxrwx 1 root root 19 Sep 30 01:01 builtins -> /usr/share/monitors
drwxr-xr-x 3 root root 1024 Feb 9 02:43 CPAN
-rwxr-xr-x 1 root root 3145 Feb 9 04:16 ntp_mon.pl
-rwxr-xr-x 1 root root 1454 Sep 30 00:33 sample_monitor
-rwxr-xr-x 1 root root 2252 Nov 14 22:59 testmonitor.sh
in ntp_mon.pl, i added the $node line since it is noted in external monitor wiki.
my $node = $ENV{"NODE_IP"};
$node =~ s/::ffff://;
my $port = $ENV{"NODE_PORT"};
External Monitor wiki
http://devcentral.f5.com/wiki/AdvDesignConfig.ExternalMonitor.ashx
also, i modified condition to mark pool member down if its stratum is 11.
if ($response{'Stratum'} =~ /\d+/) {
if the stratum is a number
if ($response{'Stratum'} == 11) {
return 0;
} else {
and it isn't 11
return 1;
}
} else {
return 0;
}
i set up 3 pool members. ntpd is running on 192.168.11.168 and 200.200.200.101 only. anyway, 200.200.200.101 stratum is 10. so, 200.200.200.101 and 200.200.200.102 will be marked down by the monitor.
[root@ve1023:Active] config b pool ntp_pool list
pool ntp_pool {
monitor all ntp_mon
members {
192.168.11.168:123 {}
200.200.200.101:123 {}
200.200.200.102:123 {}
}
}
[root@ve1023:Active] config b pool ntp_pool|grep -i pool\ member
+-> POOL MEMBER ntp_pool/192.168.11.168:123 active,up
+-> POOL MEMBER ntp_pool/200.200.200.101:123 inactive,down
+-> POOL MEMBER ntp_pool/200.200.200.102:123 inactive,down
I have Three member in pool .My pool member 10.43.44.7 , 10.43.44.8 , 10.43.44.9. I have to define ALL three ip. At the place of NODE_IP. no. actually, i just wanted to show i added the second line ($node =~ …) in the script. the script will take ip and port from pool.
if Any member down . Does it decrease Stratum VALUE sorry i am not sure what you mean. each ntp server has its own stratum. i do not think one affects other when it is down.
I applied this script with 2 stratum value because ntp serever have value 2. it saying node is Available. its working ?is it down if you shut down the ntp daemon?