I am setting up Nagios 2.0b4 on SuSE 10 on a test server.
I already have Nagios 1.2 running on another server on the same network.
I just stopped Nagios on that server, just in case there were conflicts, which I don’t think is my problem.
I brought over my config files from the main server, which believe me left me troubleshooting and reconfiguring for hours.
All errors are from the test server running SuSE 10 and Nagios 2.0b4
I’ve Googled these problems, and nothing I’ve found seems to help. Most of the links led back to this forum, but didn’t seem to help, because I’m still confused…
I seem to be having trouble defining contact groups.
Here are the errors I’m getting
linux:~ # /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
[blockquote]
Nagios 2.0b4
Copyright (c) 1999-2005 Ethan Galstad (nagios.org)
Last Modified: 08-02-2005
License: GPL
Reading configuration data…
Error: Invalid hostgroup object directive ‘contact_groups’.
Error: Could not add object property in file ‘/usr/local/nagios/etc//hostgroups.cfg’ on line 11.
[/blockquote]
I get the above error on all /whatever_customer/hostgroup.cfg files
Example hostgroup file
[blockquote]
################################################################################
HOST GROUP DEFINITIONS
#Customer
################################################################################
define hostgroup{
hostgroup_name customer
alias customer
contact_groups mycompany**<—LINE 11**
members customer_config_file1,customer_config_file2,customer_config_file3
}
[/blockquote]
I have a folder for each customer with the different cfg files
When I comment out line 11 (on all /whatever_customer/hostgroups.cfg), I get these errors:
linux:~ # /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
[blockquote]
Nagios 2.0b4
Copyright (c) 1999-2005 Ethan Galstad (nagios.org)
Last Modified: 08-02-2005
License: GPL
Reading configuration data…
Running pre-flight check on configuration data…
Checking services…
Checked 53 services.
Checking hosts…
Error: Host ‘customer_config_file’ has no default contact group(s) defined!
Error: Host ‘customer_config_file’ has no default contact group(s) defined!
Error: Host ‘customer_config_file’ has no default contact group(s) defined!
(And so on)
Checked 33 hosts.
Checking host groups…
Checked 9 host groups.
Checking service groups…
Checked 0 service groups.
Checking contacts…
Checked 4 contacts.
Checking contact groups…
Checked 1 contact groups.
Checking service escalations…
Checked 0 service escalations.
Checking service dependencies…
Checked 0 service dependencies.
Checking host escalations…
Checked 0 host escalations.
Checking host dependencies…
Checked 0 host dependencies.
Checking commands…
Checked 30 commands.
Checking time periods…
Checked 4 time periods.
Checking extended host info definitions…
Checked 33 extended host info definitions.
Checking extended service info definitions…
Checked 35 extended service info definitions.
Checking for circular paths between hosts…
Checking for circular host and service dependencies…
Checking global event handlers…
Checking obsessive compulsive processor commands…
Checking misc settings…
Total Warnings: 0
Total Errors: 33
***> One or more problems was encountered while running the pre-flight check…[/blockquote]
**I do believe I have things defined properly.
Here are my config files:**
CONTACTGROUPS.CFG
################################################################################
################################################################################
CONTACT GROUP DEFINITIONS
SYNTAX:
################################################################################
‘mycompany’ contact group definition
define contactgroup{
contactgroup_name mycompany
alias Company Full Name
members myboss,myself
}
CONTACTS.CFG
################################################################################
CONTACT DEFINITIONS
SYNTAX:
################################################################################
‘myboss’ contact definition
define contact{
contact_name myboss
alias Name
service_notification_period 24x7
host_notification_period 24x7
service_notification_options c,r
host_notification_options d,r
service_notification_commands notify-by-email
host_notification_commands host-notify-by-email
email myboss@domain
}
‘myself’ contact definition
define contact {
contact_name myself
alias name
service_notification_period 24x7
host_notification_period 24x7
service_notification_options c,r
host_notification_options d,r
service_notification_commands notify-by-email
host_notification_commands host-notify-by-email
email myself@domain
}
I feel that I am almost there
I hope I was able to explain myself and provided enough information.
I’ve read through the documentation(several times in the past month as we’ve been using Nagios)and believe I’ve done everything correctly.
If anyone can provide some assistance, I would be grateful.
If you need anymore information, just ask.
I’m a newbie, but I’m starting to get a basic grasp of things.
Thanks for reading this post, I know it was long.
EDIT:
Here are the contents of my Nagios log
I bolded the line I didnt see before
linux:/usr/local/nagios/var # tail nagios.log -f
[1131560415] Bailing out due to one or more errors encountered in the configuration files. Run Nagios from the command line with the -v option to verify your config before restarting. (PID=13545)
[1131560453] Error: Cannot open main configuration file ‘/usr/local/nagios/libexec/status’ for reading!
[1131560453] Nagios 2.0b4 starting… (PID=13547)
[1131560453] LOG VERSION: 2.0
[1131560453] Bailing out due to one or more errors encountered in the configuration files. Run Nagios from the command line with the -v option to verify your config before restarting. (PID=13547)
[1131560700] Nagios 2.0b4 starting… (PID=13556)
[1131560700] LOG VERSION: 2.0
[1131560700] Error: Invalid hostgroup object directive ‘contact_groups’.
[1131560700] Error: Could not add object property in file ‘/usr/local/nagios/etc/premier/hostgroups.cfg’ on line 11.
[1131560700] Bailing out due to one or more errors encountered in the configuration files. Run Nagios from the command line with the -v option to verify your config before restarting. (PID=13556)
I dont have a ‘status’ file in my /libexec directory, only plugins
Edited ]