Backup the configuration file:
# cp -a /usr/local/nagios/etc/nagios.cfg /usr/local/nagios/etc/nagios.cfg.bak
Comment out all the options:
# sed -i 's/^/#/' /usr/local/nagios/etc/nagios.cfg
and verify the configuration data:
# nagios -v /usr/local/nagios/etc/nagios.cfg
you will see something like this:
Checking services...
Error: There are no services defined!
Checked 0 services.
Checking hosts...
Error: There are no hosts defined!
Checked 0 hosts.
Checking contacts...
Error: There are no contacts defined!
Checked 0 contacts.
...
Total Warnings: 0
Total Errors: 3
So, you need to include some config files which defined at least a host, some services and a contact:
cfg_file=/usr/local/nagios/etc/objects/commands.cfg
cfg_file=/usr/local/nagios/etc/objects/contacts.cfg
cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg
cfg_file=/usr/local/nagios/etc/objects/templates.cfg
...
cfg_file=/usr/local/nagios/etc/objects/localhost.cfg
Reverify:
Checking services...
Checked 8 services.
Checking hosts...
Checked 1 hosts.
Checking contacts...
Checked 34 contacts.
...
Total Warnings: 0
Total Errors: 0