This section discusses the Watchdog sample application available in the samples included in your solidDB® installation.
A watchdog is a separate program for monitoring and controlling Primary and Secondary servers. The watchdog monitors both hot standby servers and switches their states when necessary. This alleviates the need for a database administrator to monitor the servers.
solidDB® provides a sample watchdog that you can use as a basis for building a custom watchdog that meets your needs. This sample application is called the Watchdog. Pay attention to the following features of the Watchdog sample before you start programming.
▪The Watchdog is meant to be used as an example of a watchdog
▪The Watchdog uses polling to keep itself up-to-date with server states
▪The Watchdog is a one-thread program
▪The Watchdog uses the HSB API through ODBC. This API implementation can be used as a model for your own watchdog application.
▪The Watchdog has no user interface.
If you are using the Watchdog, you need to configure a [WatchDog] section in the solidDB® configuration file (solid.ini), which resides in the current working directory of the Watchdog. If the Watchdog is running in the same directory as the Primary or Secondary server, then you will have only one solid.ini file, which will be shared by the server and the Watchdog. If the Watchdog is running in a separate directory, then the Watchdog will have its own solid.ini file.
Furthermore, this section contains explanations of solid.ini configuration parameters that are specific to the Watchdog. These parameters are set in the [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 a discussion of other solid.ini parameters, see solidDB® Administrator Guide.