Error Processing Object Config Files In Nagios
Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Server Fault Questions Tags Users Badges Unanswered Ask Question _ Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Is there a way to more detail on this error message “Error processing object config files!” from Nagios up vote 1 down vote favorite I am migrating from Nagios 3.2.3 to 4.02 and I am stuck with a non-specific error message: Is there a way to coax some more detail out of Nagios Core? I get no clue from the attached error output what might be wrong, or even which .cfg file is the culprit. /usr/local/nagios/bin/nagios -vvvvvv /usr/local/nagios/etc/nagios.cfg Nagios Core 4.0.2 Copyright (c) 2009-present Nagios Core Development Team and Community Contributors Copyright (c) 1999-2009 Ethan Galstad Last Modified: 11-25-2013 License: GPL Website: http://www.nagios.org Reading configuration data... Read main config file okay... Processing object config file '/usr/local/nagios/etc/objects/commands.cfg'... Processing object config file '/etc/nagios/objects/contacts.cfg'... Processing object config file '/etc/nagios/objects/escalations.cfg'... Processing object config file '/etc/nagios/objects/timeperiods.cfg'... Processing object config file '/etc/nagios/objects/templates.cfg'... Processing object config file '/etc/nagios/objects/signal-hosts.cfg'... Processing object config file '/etc/nagios/objects/servicechecks.cfg'... Processing object config file '/etc/nagios/objects/passivechecks.cfg'... Processing object config file '/etc/nagios/objects/websites/aws1-checkwebservices.cfg'... Processing object config file '/etc/nagios/objects/websites/aws2-checkwebservices.cfg'... Processing object config file '/etc/nagios/objects/websites/awscabot-checkwebse
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Nagios: Error in config http://serverfault.com/questions/578190/is-there-a-way-to-more-detail-on-this-error-message-error-processing-object-con file - First line (NULL Value) up vote 0 down vote favorite I'm running Nagios 3.5.1 and I'm getting an error saying there's an error in my config file. When I run nagios -v /etc/nagios3/conf.d/hosts.cfg, I get this error Reading configuration data... Error in configuration file '/etc/nagios3/conf.d/hosts.cfg' - Line 5 (NULL value) Line 5 is the first like with content. Lines 1-4 are comments. When http://stackoverflow.com/questions/24905828/nagios-error-in-config-file-first-line-null-value I remove 1-4, the error moves to the first line still. And commenting out the first host just moves the same error lower. My hosts.cfg is not complicated define host { use server address 10.203.130.187 host_name production-mgmt-nagios-server-20140325-10-203-130-187 hostgroups all,linux,nagios-server } and so on. Simplifying with one host or even the example host gives the same error. Creating a new file and typing a basic version gives the same error. Running out of ideas and anything will be appreciated. Thank you! chef nagios cookbook share|improve this question asked Jul 23 '14 at 8:45 Roger Lam 354416 add a comment| 2 Answers 2 active oldest votes up vote 2 down vote accepted You are correct. As per the documentation for Nagios 3.x for configuration verification you are to run the following command: /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg And assuming you have no errors or warnings that might cause issues restart Nagios. The restart command will depend on your OS Flavour. share|improve this answer answered Jul 24 '14 at 1:43 Matt 23k71837 add a comment| up vote 2 down vote Always an easy solution that takes forever to find. Don't run nagios -v on hosts.cfg. Run it on nagios.c
• All times are UTC - 6 hours [ DST ] Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Nagios? 1.1 Checking the Log Files 1.2 Validating the Configuration Files 1.3 Start/Stop/Restart Nagios Daemon How do I troubleshoot problems with Nagios? The most common problem encountered by users of the JumpBox for Nagios3 is misconfigurations in the nagios configuration file that prevent Nagios from starting. This can result in the following Nagios error screen: If you are using the NagiosAdmin web interface to configure your JumpBox, it is probably a good practice to check the front page of Nagios after every time you save a new configuration. It is possible that you make a change with the NagiosAdmin tool that will prevent Nagios from restarting properly. The sooner you catch it, the easier it will be to identify the problem. Checking the Log Files In some cases you may have to SSH into the Nagios3 JumpBox to troubleshoot a problem. It is useful to know that there is a Nagios logfile here: /usr/local/nagios/var/nagios.log Validating the Configuration Files The syntax of the Nagios configuration files can be tested with this command: /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg The output of this command will look something like the following example when everything is OK: admin@nagios3:~$ /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg Nagios Core 3.2.0 Copyright (c) 2009 Nagios Core Development Team and Community Contributors Copyright (c) 1999-2009 Ethan Galstad Last Modified: 08-12-2009 License: GPL Website: http://www.nagios.org Reading configuration data... Read main config file okay... Processing object config file '/usr/local/nagios/etc/timeperiods.cfg'... Processing object config directory '/var/data/nagiosadmin/data/nagios'... Processing object config file '/var/data/nagiosadmin/data/nagios/hostgroups.cfg'... Processing object config file '/var/data/nagiosadmin/data/nagios/templates.cfg'... Processing object config file '/var/data/nagiosadmin/data/nagios/hosts.cfg'... Processing object config directory '/var/data/nagiosadmin/data/nagios/backups'... Processing object config file '/var/data/nagiosadmin/data/nagios/contactgroups.cfg'... Processing object config file '/var/data/nagiosadmin/data/nagios/contacts.cfg'... Processing object config file '/var/data/nagiosadmin/data/nagios/commands.cfg'... Read object config files okay... Running pre-flight check on configuration data... Checking services... Checked 3 services. Checking hosts... Checked 2 hosts. Checking host groups... Checked 1 host groups. Checking service groups... Checked 0 service groups. Checking contacts... Checked 1 contacts. Checking contact group