skip to Main Content

I am trying to install nagios-plugins-2.2.1 on redhat machine

when running this command:

Nagios /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

i am getting the error as

no such file or directory

pls help

https://www.youtube.com/watch?v=VsIrAsXzbx4

5

Answers


  1. It looks like "nagios.cfg" does not exist.

    Try to create it and configuring it manually.

    Then try again.

    Login or Signup to reply.
  2. You can try to look at where your nagios.cfg file has been created, using

    locate nagios.cfg
    

    for instance, to make sure your file is in the right path and maybe call that newly displayed path instead.

    /usr/local/nagios/bin/nagios -v [path_of_nagios_cfg]
    
    Login or Signup to reply.
  3. It looks like the nagios binary is located in another location not in /usr/local/nagios/bin/nagios

    To find where it is run:

    which nagios
    

    If nagios was installed using the RHEL package manager so it will be usually in:

    /usr/sbin/nagios
    

    If it did not come back with result just type the first 3 letters "nag" then type the "Tab" key and it will complete it.

    Once you find it then use it instead of /usr/local/nagios/bin/nagios

    Then make sure you get the right nagios.cfg file location by running the 2 following commands:

    updatedb
    locate nagios.cfg
    

    If when you run updatedb you got "Command not found" error message then mlocate package is not installed and you can get the nagios.cfg location by running this command instead

    find / -xdev -type f -name "nagios.cfg"
    

    So by that you should have both "nagios binary" and "nagios.cfg file", you can then re-run the command with the right file paths

    Login or Signup to reply.
  4. Also you need to omit the first "Nagios" from the command line as it is in Capital N which sure is supposed to come back with "no such file or directory" message

    The command should only be like this:

    /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
    
    Login or Signup to reply.
  5. you will find nagios.cfg file in #/usr/local/nagios/etc
    then run that command giving this path.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search