First thing you do in such cases is checking the proviliges on the files. If you’re new to nagios and trying to run it perhaps you made a mistake during the instalation proces. If you’re instaling nagios as a different user, files will be owned by you not nagios - veryfie priviliges on the files.
The second idea I get is to check if nagios and www (apache) user are in the same group because www user is trying to read cgi file.
I am getting close. I get this error when I try to run the program
Error: Invalid hostgroup object directive ‘contact_group’.
Error: Could not add object property in file ‘/usr/local/nagios/etc/hostgroups.cfg’ on line 4.
per the docs, "define hostgroup{
hostgroup_name hostgroup_name
alias alias
contact_groups contact_groups
members members
} "
I see no directive called “contact_group”
Perhaps you have made a typo. When in doubt, check the docs.
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.
9Verify 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
try sending a mail by hand, using the syntax found in checkcommands.cfg or misccommands.cfg for the send-by-email command. if you find that fails, perhaps you can edit the command to use your qmail instead of “mail” very easily.