Test and load objects are pieces of software that run in the context of the Netra Proxy Cache array daemon, communicating the health of a service/host instantiation to the monitor object (cache_monitor or dns_monitor) in that daemon. The monitor object is responsible for monitoring a service on a given array host.
The format of the values returned by test and load objects are:
From a test object, a monitor object expects a boolean value, indicating, for example, whether an interface is up or whether a service is available.
From a load object, a monitor object expects two integers, one for current load, the other for current capacity.
The return values for test and load objects can be applied to a wide variety of resources. For example, a memory-intensive service might call for a load object to measure the availability of swap space.
In the current release of the Netra Proxy Cache product, all array members have the same set of test and load objects. These objects are selected for their appropriateness for a proxy cache service and an array DNS.
The array daemon configuration file, scalrd.conf, contains parameter settings for each test and load object. The file scalrd.conf is stored in /etc/opt/SUNWscalr. If you have a serial connection to an array host, you can use the scalrcontrol (1) utility, stored in /opt/SUNWscalr/bin, to obtain the output from the test and load objects.
There is a man page for each test object type, in /opt/SUNWscalr/man/man5. These man pages describe the parameters for each test object instance below. There is also a man page for scalrcontrol, in /opt/SUNWscalr/man/man1.
In the following object descriptions, parameters are taken from scalrd.conf. Values for these parameters are the default values.
The test objects listed below are shipped with the Netra Proxy Cache product. Their output is displayed in the Host Status page that you invoke from the Array Status page.
cache_connect_test
An object of type ConnectTest (5). Tests the TCP port used by the proxy cache service (8080). Also tests the service address(es) and control address used by the proxy cache service. The test object instance is configured to test persistent TCP connections. The parameters for this test object are as follows:
ConnectTest cache_connect_test port=8080 check_addr=0.0.0.0 interval=10 retries=3 retry_interval=2 reset_min_interval=60 monitor_object=cache_monitor max_connect=99999999 check_control=true persistent_connection=true connection_test_object=cache_http_test
cache_process_test
An object of type ProcessTest (5). Tests for the presence of the process associated with the proxy cache service. The parameters for this test object are as follows:
ProcessTest cache_process_test process_id_script="/etc/init.d/scalr.cache getpid" interval=2 retries=3 retry_interval=2 reset_min_interval=60
cache_test
An object of type AndTest (5). Combines the outputs from cache_connect_test, cache_process_test, and service_interface_test. Reports failure to the monitor object (cache_monitor) if any of these "child" test objects returns failure. The parameters for this test object are as follows:
AndTest cache_test test_objects=cache_connect_test,cache_process_test reset_script="/etc/init.d/scalr.cache restart" reset_min_interval=60 monitor_object=cache_monitor
control_interface_test
An object of type PingTest (5). Tests the integrity of the control interface. The parameters for this test object are as follows:
PingTest control_interface_test ping_addr=192.168.89.255 min_replies=1 exclude_same_host=true interval=600 ping_timeout=5 retries=3 retry_interval=2
dns_connect_test
An object of type ConnectTest (5). Tests the TCP port used by the array DNS (53). Also tests the service address(es) and control address used by the DNS. The parameters for this test object are as follows:
ConnectTest dns_connect_test port=53 check_addr=0.0.0.0 interval=10 retries=3 retry_interval=2 reset_min_interval=60 monitor_object=dns_monitor max_connect=99999999 check_control=true persistent_connection=false
dns_process_test
An object of type ProcessTest (5). Tests for the presence of the process associated with the array DNS. The parameters for this test object are as follows:
ProcessTest dns_process_test process_id_script="/opt/SUNWscalr/scripts/dns.getpid" interval=2 retries=3 retry_interval=2 reset_min_interval=60
dns_test
An object of type AndTest (5). Combines the outputs from dns_connect_test, dns_udp_test, dns_process_test, and service_interface_test. Reports failure to the monitor object (dns_monitor) if any of these "child" test objects returns failure. The parameters for this test object are as follows:
AndTest dns_test test_objects=dns_connect_test,dns_process_test,dns_udp_test reset_script="/opt/SUNWscalr/scripts/dns.reset" reset_min_interval=30 monitor_object=dns_monitor
dns_udp_test
An object of type DNSTest (5). Tests the ability of the array DNS to resolve the name of a domain. By default the name localhost is used. The parameters for this test object are as follows:
DNSTest dns_udp_test domain_name=localhost port=53 check_addr=0.0.0.0 interval=10 timeout=5 retries=3 retry_interval=2 reset_min_interval=60 monitor_object=dns_monitor max_check=99999999 check_control=true
service_interface_test
An object of type PingTest (5). Tests the integrity of the service interface used by a monitor object. The parameters for this test object are as follows:
PingTest service_interface_test ping_addr=129.144.91.255 min_replies=1 exclude_same_host=true interval=60 ping_timeout=5 retries=3 retry_interval=2
The load objects listed below are shipped with the Netra Proxy Cache product. Their output is displayed in the Host Status page that you invoke from the Array Status page.
There is a man page for each load object type, in /opt/SUNWscalr/man/man5. These man pages describe the parameters for each load object instance below.
cache_adjust_load
An object of type AdjustLoad (5). Adjusts the output from the cpu_load object to account for special conditions, such as startup and shutdown. The parameters for this load object are as follows:
AdjustLoad cache_adjust_load interval=10 adjust_load_file=/tmp/.proxyload.adjust max_adjust=100 load_object=cpu_load
cpu_load
An object of type CPULoad (5). Returns the CPU utilization on a host. The parameters for this test object are as follows:
CPULoad cpu_load interval=30 divide_by_cpus=false divide_by_cpu_clocks=false
The relationship among monitor, test, and load objects is illustrated in Figure 17-2.
The significance of the relationships illustrated in Figure 17-2 is as follows:
For test objects, a failure of a lowest-level object (indicated by a not-OK status in the Host Status page) causes the parent object (cache_test and dns_test, both of type AndTest) to fail. The failure of such a parent object, in turn, causes the monitor object return failure status. This failure is also reflected in the Host Status page. When a service on a host fails, the monitor object removes the service address associated with that service from the array's DNS zone and moves the service address to the least loaded host in the array.
For load objects, the lowest-level object (cpu_load) returns its load and capacity figures to its parent (cache_adjust_load, of type AdjustLoad). Using our example, the cache_adjust_load object performs any adjustments required and returns "final" load and capacity figures to the monitor object, cache_monitor. The monitor object compares figures obtained from cache_adjust_load to high- and low-water marks that it maintains for the service and takes action if one of these thresholds is crossed. If a monitor object determines that a service is overloaded, it removes its service address from the array's DNS zone. If the monitor object determines that a formerly overloaded service is now in its normal range, it reintroduces the service address for that service in the DNS zone.