## Verifying Your NetSaint Configuration

Verifying The Configuration From The Command Line

Once you've entered all the necessary data into the configuration file, its time to do a sanity check. Everyone make mistakes from time to time, so its best to verify what you've entered. NetSaint automatically runs a "pre-flight check" before before it starts monitoring, but you also have the option of running this check manually before attempting to start NetSaint. In order to do this, you must start NetSaint with the -v command line argument as follows...

./netsaint -v <main_config_file>

Note that you should be entering the path/filename of your main configuration file as the second argument and not your host configuration file. NetSaint will read your main configuration file and from there determine where your host configuration file resides (remember the cfg_file option in the main config file?).

Relationships Verified During The Pre-Flight Check

During the "pre-flight check", NetSaint verifies that you have defined the data relationships necessary for monitoring. Services, hosts, host groups, contacts, contact groups, and time periods are all related and need to be setup properly in order for things to run. This is a list of the basic things that NetSaint attempts to check before it will start monitoring...

1. Verify that all contacts are a member of at least one contact group.
2. Verify that all contacts specified in each contact group are valid.
3. Verify that all hosts are a member of at least one host group.
4. Verify that all hosts specified in each host group are valid.
5. Verify that all hosts have at least one service associated with them.
6. Verify that all commands used in service and host checks are valid.
7. Verify that all commands used in service and host event handlers are valid.
8. Verify that all commands used in contact service and host notifications are valid.
9. Verify that all notification time periods specified for services, hosts, and contact are valid.
10. Verify that all service check time periods specified for services are valid.

Fixing Configuration Errors

If you've forgotten to enter some critical data or just plain screwed things up, NetSaint will spit out a warning or error message that should point you to the location of the problem. Error messages generally print out the line in the configuration file that seems to be the source of the problem. On errors, NetSaint will often exit the pre-flight check and return to the command prompt after printing only the first error that it has encountered. This is done so that one error does not cascade into multiple errors as the remainder of the configuration data is verified. If you get any error messages you'll need to go and edit your configuration files to remedy the problem. Warning messages can generally be safely ignored, since they are only recommendations and not requirements.

Where To Go From Here

Once you've verified your configuration files and fixed any errors, you can be reasonably sure that NetSaint will start monitoring the services you've specified. On to starting NetSaint!