## Program Modes

Introduction

The idea of program modes is quite simple, but you need to understand the difference between them before you start doing anything like implementing redundant monitoring hosts. There are two types of program modes - Active and Standby...

Active Mode

This is the default program mode for NetSaint. While in active mode, NetSaint will monitor all services and hosts that you have defined in your host configuration file(s). When a problem arises with one of those services or hosts, NetSaint will send out notifications to all appropriate contacts. This is equivalent to how previous versions of NetSaint worked.

Standby Mode

While in standby mode, NetSaint will continue to monitor all services and hosts you defined in your host configuration file(s), but it will not send out notifications to any contacts when problems arise. This is particularly useful when implementing redudant monitoring hosts, and is equivalent to temporarily disabling notifications for all defined services and hosts. NetSaint will not send out notifications to any contacts until it returns to active mode.

Configuring The Initial Program Mode

By default, NetSaint will enter active mode when it (re)starts. If you wish to change the initial program mode to standy, you'll have to use the program_mode option in the main configuration file.

Changing Program Modes During Runtime

You can change the current program mode between active and standby by issuing an external command to NetSaint via the command file. Of course, this assumes that you have enabled external command checks. For more information on external commands, click here.

Two sample shell scripts (enter_active_mode and enter_standy_mode) are provided in the sample-scripts/ subdirectory of the NetSaint distribution as examples of how to change the program mode during runtime. You will have to modify the scripts to match the location of your command file before you can use them.