Rss

  • linkedin

How to install Naemon 0.8.0 on CentOS 6.5

Naemon 0.8.0This is a guide how to install Naemon 0.8.0 on CentOS 6.5 64-bit system. 32-bit packages are also available, just change download links bellow.

Download precompiled packages, you will find/verify the links from Naemon homepage: http://naemon.org

This instructions are created with CentOS minimal installation in mind, some packages may already exist if you have any other kind of installation.

Download wget

Download packages

Enable epel repository, required for both dependency (mod_fcgid), nrpe and nagios-plugins

Install mod_fcgid

Install Naemon

Disable SELinux, not supported by Thruk

Make it persistent

edit row: “SELINUX=enforcing”
replace with: “SELINUX=disabled”

Install nagios-plugins and NRPE agent, available via epel repository

Modify path to nagios plugins, edit /etc/naemon/resource.cfg

edit row: “$USER1$=/usr/lib64/naemon/plugins”
replace with: “$USER1$=/usr/lib64/nagios/plugins”

Start services (also after boot)

Installation complete, test your installation. Visit http://your-server/naemon/ and use default password admin/admin

Comments (6)

  1. C. Brandon

    I have a suggestion for the iptables
    #show all iptables with line numbers
    iptables –list –line-numbers
    #delete INPUT rule number 5
    #that’s the default block all on CentOS minimal installation
    iptables -D INPUT 5
    #add in the iptables rule to accept port 80
    iptables -A INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT
    #re-add the REJECT all rule for everything else at the end
    iptables -A INPUT -j REJECT –reject-with icmp-host-prohibited
    #save your iptables
    service iptables save
    #confirm
    iptables –list –line-numbers

  2. C. Brandon

    You can also change the lines for editing the files to make it easy to copy and paste

    vi /etc/selinux/config
    # Search and repalce row: “SELINUX=enforcing”
    # with: “SELINUX=disabled”
    :%s:SELINUX=enforcing:SELINUX=disabled
    #save your file
    :wq

    # Search and replace row: “$USER1$=/usr/lib64/naemon/plugins”
    # with: “$USER1$=/usr/lib64/nagios/plugins”
    vi /etc/naemon/resource.cfg
    :%s:/usr/lib64/nagios/plugin:/usr/lib64/naemon/plugins
    #Save your file
    :wq

    • Johan Ryberg

      Thanks, It took a while for me to see your comment. Sorry about that.

      I will look at you suggestions and incorporate them since they make sense =)

      Regards Johan

  3. C. Brandon

    Johan,

    Thanks for taking the time to read my suggestions. This is probably easier that what I suggested before.

    iptables -I INPUT 4 -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT

    -I (inputs to the) INPUT (chain at line 4) -m(match) state –state NEW -m tcp -p(port) –dport (destination port) 80 -j ACCEPT.

    They also fixed /etc/naemon/resource.cfg so you don’t have to do the find replace any more.

    I would suggest setting the iptables and killing SELinux earlier in the instructions so that Naemon doesn’t complain while installing. It’s not the end of the world but it helps.

    • Johan Ryberg

      Yes, this article was written during early days before naemon.org documentation was created and the 0.8 was still under development.

      I will update the official documentation as well.

      Thanks

  4. Robert

    Hi Johan,
    Have you manage to install Naemon on existing Nagios?
    After installation I cant login to webgui.

Leave a Reply

Your email address will not be published. Required fields are marked *