Example Virtual Domain configuration
Use these examples to familiarize yourself with the default OQL inserts that are appended to the VirtualDomainSchema.cfg file to configure Virtual Domain when it is launched.
Example configuration of the config.defaults table
The OQL sample below configures the config.defaults table.
insert into config.defaults
(
m_HealthCheckPeriod,
m_FailoverTime,
m_AutoTopologyDownload
)
values
( 60, 300, 1 );This insert triggers the following behavior:
- Virtual Domain performs a health check of each of the processes listed in the state.services table every 60 seconds. The health check applies the filters in the state.filters table to the values in state.services (the current state of the processes being monitored by the CTRL process).
- Virtual Domain has a default time difference of 300 seconds between the current time and the Health Check Resolution event timestamp. When the difference exceeds this value Network Manager fails over. The time difference is set to this value to avoid spurious failover.
- The backup server downloads the topology every time the TCP connection is lost and remade with the primary server.
Example configuration of the state.filters table: Event Gateway filter
The following sample OQL insert specifies one of the default filters provided with Network Manager.
insert into state.filters
(
m_ServiceName,
m_Filter,
m_Description
)
values
(
"ncp_g_event",
"m_ChangeTime > eval(long,'$TIME - 300') and m_CtrlState <> 7",
"The Gateway has been running within the last 300 seconds"
);This insert triggers the following behavior:
- Virtual Domain applies the filter (to be specified later in the insert) against the Event Gateway process, ncp_g_event.
- Virtual Domain applies a filter that checks that the m_CtrlState value is not equal to 7 (the service has not failed), and that the time stamp m_ChangeTime is not older than 300 seconds.
- Virtual Domain outputs the following description of the filter: The Gateway has been running within the last 300 seconds.
Example configuration of the state.filters table: filter for additionally configured poller
Additionally configured pollers can trigger failover. The following sample OQL insert specifies the commented out example filter for an additionally configured poller provided in the default version of the VirtualDomainSchema.cfg file. Remove the slashes in order to uncomment this filter. The m_ServiceName setting in the filter below must match the serviceName column specified for the additionally configured poller in the $NCHOME/etc/precision/CtrlServices.cfg file.
// insert into state.filters
// (
// m_ServiceName,
// m_Filter,
// m_Description
// )
// values
// (
// "PingPoller",
// "m_ChangeTime > eval(time,'$TIME - 300') and m_CtrlState <> 7",
// "The Poller has been running within the last 300 seconds"
// );This insert triggers the following behavior:
- Virtual Domain applies the filter (to be specified later in the insert) against the additionally configured poller, PingPoller.
- Virtual Domain applies a filter that checks that the m_CtrlState value is not equal to 7 (the service has not failed), and that the time stamp m_ChangeTime is not older than 300 seconds.
- Virtual Domain outputs the following description of the filter: The Poller has been running within the last 300 seconds.