Nagios cannot be started, but the syntax check is disabled, and nagios cannot.

Source: Internet
Author: User

Nagios cannot be started, but the syntax check is disabled, and nagios cannot.

[root@mode objects]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfgNagios Core 3.4.3Copyright (c) 2009-2011 Nagios Core Development Team and Community ContributorsCopyright (c) 1999-2009 Ethan GalstadLast Modified: 11-30-2012License: GPLWebsite: http://www.nagios.orgReading configuration data...   Read main config file okay...Processing object config file '/usr/local/nagios/etc/objects/commands.cfg'...Processing object config file '/usr/local/nagios/etc/objects/contacts.cfg'...Processing object config file '/usr/local/nagios/etc/objects/timeperiods.cfg'...Processing object config file '/usr/local/nagios/etc/objects/templates.cfg'...Processing object config file '/usr/local/nagios/etc/objects/hosts.cfg'...Processing object config file '/usr/local/nagios/etc/objects/services.cfg'...Processing object config directory '/usr/local/nagios/etc/objects/services'...Error: Could not open config directory '/usr/local/nagios/etc/objects/services' for reading.   Error processing object config files!***> One or more problems was encountered while processing the config files...     Check your configuration file(s) to ensure that they contain valid     directives and data defintions.  If you are upgrading from a previous     version of Nagios, you should be aware that some variables/definitions     may have been removed or modified in this version.  Make sure to read     the HTML documentation regarding the config files, as well as the     'Whats New' section to find out what has changed.

The solution to this problem is as follows:

First, make sure that

You mustCommands. cfgAdd the check_nrpe plug-in configuration

#Vi commands. cfgAfter entering, press shift + g to cut to the end and add the following content.

# 'Check _ nrpe 'command definition

Define command {

Command_name check_nrpe

Command_line $ USER1 $/check_nrpe-H $ HOSTADDRESS $-c $ ARG1 $

}

Next, check vi nagios. cfg.

Export _file =/usr/local/nagios/etc/objects/hosts. cfg
Export _file =/usr/local/nagios/etc/objects/services. cfg
Export _dir =/usr/local/nagios/etc/objects/services

I have made the following changes to this configuration file:

No services directory is created.

After I create the service directory, I find that it can run normally.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.