solidDB Help : Samples : HotStandby sample : Watchdog sample application
  
Watchdog sample application
A watchdog is a separate program for monitoring and controlling HotStandby (HSB) primary and secondary servers. A watchdog monitors both HSB servers and switches the states of the servers when necessary. This alleviates the need for a database administrator to monitor the servers.
solidDB provides a sample watchdog program that you can use as a basis for building a custom program that meets your needs. Pay attention to the following features of the Watchdog sample before you start programming.
The Watchdog sample is meant to be used as an example of a watchdog.
The Watchdog sample uses polling to keep up-to-date with the states of the HSB servers.
The Watchdog sample is a one-thread program.
The Watchdog sample uses the HSB API through ODBC. This API implementation can be used as a model for your own watchdog application.
The Watchdog sample has no user interface.
If you are using the Watchdog sample, you must configure a [WatchDog] section in the solidDB configuration file (solid.ini) that resides in the current working directory of the server that is running the Watchdog sample. If the Watchdog sample is running in the same directory as the primary or secondary server, then there is only one solid.ini file, which is shared by the server and the Watchdog sample. If the Watchdog sample is running in a separate directory, then the Watchdog sample has its own solid.ini file.
solid.ini has a number of configuration parameters that are specific to the Watchdog sample. These parameters are set in the [WatchDog] section of the solid.ini configuration file, see [Watchdog] section of the solid.ini configuration file. If you write your own watchdog program, you do not need to use any of these parameters.
For details of other solid.ini parameters, see Managing parameters.
See
How the Watchdog sample application works
Using the Watchdog sample application
Failure situations and watchdog actions