Find the answer to your Linux question:
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 23
Hi, I've installed nagios into my server using the nagios user guide. The steps that I've completed are 1)Downloading the nagios and plugins 2)Take care of the prerequisites 3)Create user ...
  1. #1
    Just Joined!
    Join Date
    Dec 2009
    Posts
    13

    Problems making nagios work

    Hi,

    I've installed nagios into my server using the nagios user guide. The steps that I've completed are
    1)Downloading the nagios and plugins
    2)Take care of the prerequisites
    3)Create user and group for nagios
    4)Install nagios
    5)Configure the web interface
    6)Compile and install nagios plugins

    Now when I proceed into the next step using the command :

    #chkconfig --add nagios
    #chkconfig nagios on
    to add nagios to the startup routine, I'm returned with an error :

    error reading information on service nagios: No such file or directory


    Pls help me solve this problem

  2. #2
    Just Joined!
    Join Date
    Aug 2009
    Location
    Mumbai, India
    Posts
    75
    Hi,

    As a part of the nagios install process did you enter this command @ the CLI
    Code:
    make install-init
    This command copies the nagios script into the init directories. You could verify this by checking if the file nagios exists in the /etc/init.d/ directory.

    The error you've mentioned is probably because the chkconfig command is not able to find the nagios file in the init.d directory

    --Syd

  3. #3
    Just Joined!
    Join Date
    Dec 2009
    Posts
    13
    Ok so in the nagios directory, I type make install-init, after that I use the 2 commands I mentioned, :

    chkconfig --add nagios
    chkconfig nagios on


    Works fine (No error returned).

    And then, I type

    /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios

    and I am returned with an error :

    Error : Cannot open main configuration file 'usr/local/nagios/etc/nagios' for reading.

    Error processing main configuration file.
    By right I should get this output if it were successful :

    Total Warnings: 0
    Total Errors: 0
    Things look okay - No serious problems were detected during the pre-flight check

  4. #4
    Just Joined!
    Join Date
    Aug 2009
    Location
    Mumbai, India
    Posts
    75
    Hi,

    Does the nagios config file exist in the /usr/local/nagios/etc directory. As a part of the nagios install process seems you might have missed out another command
    Code:
    make install-config
    Why don't you check out this URL and refer to the quickstart guides on the basis of your OS. It could help....

    Nagios Quickstart Installation Guides

    --Syd

  5. #5
    Just Joined!
    Join Date
    Dec 2009
    Posts
    13
    Ok tqs so much....finally works for me...Now jus need to know whether or not Nagios checks the mysql server and apache (httpd) server details.

    The services listed are Current Load, Current Users, HTTP, PING, Root Partition, SSH, Swap usage, & Total Processes.

    Nothing on MySQL or HTTPD.

  6. #6
    Just Joined!
    Join Date
    Aug 2009
    Location
    Mumbai, India
    Posts
    75
    Hi,

    The services you've listed are the default ones configured for the localhost on which Nagios is installed. Additional services check scripts would be available in the /usr/local/nagios/libexec/ directory.

    You could additionally search the net for custom nagios plugins for mysql / http in addition to the one available in the libexec directory or script it yourself if you are comfortable with it.

    For monitoring remote systems, you'll need to install some additional softwares like nrpe for Linux and NSClient for Windows.


    --Syd

  7. #7
    Just Joined!
    Join Date
    Dec 2009
    Posts
    13
    I found the answer that I should type this line :

    command[check_mysqld]=/usr/lib/nagios/plugins/check_mysql_query -q 'select 1+2' -u nagiosCheck -p 'password' -w 3:3 -c 3:3
    in the nrpe.cfg file.

    But now my problem is that I can't find that file in my system. I can't even locate it using the which nrpe.cfg command through the terminal.

  8. #8
    Just Joined!
    Join Date
    Aug 2009
    Location
    Mumbai, India
    Posts
    75
    Hi,

    NRPE is required for monitoring remote systems. I assume NRPE is not installed on your system since you are not able to locate the file. Try out this link for NRPE install steps. http://nagios.sourceforge.net/docs/nrpe/NRPE.pdf

    --Syd

  9. #9
    Just Joined!
    Join Date
    Dec 2009
    Posts
    13
    I've followed the steps in the pdf file you've attached. Under the sub-topic Remote Host Setup, everything works till step 5, which is Test the NRPE daemon locally.

    Next, to check the NRPE daemon is functioning properly. To do this, this is the command :
    /usr/local/nagios/libexec/check_nrpe -H localhost
    By right, I should get a string back that tells what version of NRPE is installed, like this:
    NRPE v2.8
    Instead, I'm returned with this :
    CHECK_NRPE: Error - Could not complete SSL handshake.
    Pls help me resolve this.

  10. #10
    Just Joined!
    Join Date
    Aug 2009
    Location
    Mumbai, India
    Posts
    75
    Hi,

    Try running the check_nrpe command with the -n flag. This disables SSL. Your command would be
    Code:
    /usr/local/nagios/libexec/check_nrpe -n -H localhost
    If i recollect correctly, an alternative would be to recompile nrpe with the following parameters to the configure command ( the docs just list the command as ./configure )

    Code:
    ./configure --enable-ssl
    This command might require that you have the ssl, ssl-devel packages & dependencies. Hence just ensure it's installed prior to recompiling nrpe.

    --Syd

Page 1 of 3 1 2 3 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...