Activity Stream
48,167 MEMBERS
6895 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 3 of 3
  1.     
    #1
    Member
    Website's:
    host4offshore.com

    Default Installation & Configuration of Nagios & Nagios Client (NRPE) on CentOS 5

    Installation

    Add RPMForge Yum Repository

    It is recommended that you configure yum-priorities prior to following this tutorial to avoid having base CentOS packages being overwritten by the RPMForge repository. Instructions to do so can be found on the CentOS Wiki.



    Install & Configure Prerequisites


    • Install Apache
      • yum install httpd php gcc glibc glibc-common gd gd-devel



    • Configure Apache to start on boot
      • chkconfig httpd on



    • Configure iptables to allow Apache traffic
      • /sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT
      • /etc/init.d/iptables save
      • /etc/init.d/iptables restart


    Install Nagios & Nrpe


    • Install Nagios (Server Side)

      [mylogin@hostname nagios]# yum install nagios nagios-plugins nagios-plugins-nrpe nagios-devel
    • Install Nagios (Client Side)

    [mylogin@hostname nagios]# yum install nagios nagios-plugins nagios-plugins-nrpe nagios-devel nagios-nrpe

    • Create the default Nagios web access user & set a password
      • htpasswd -c /etc/nagios/htpasswd.users nagiosadmin



    • Verify default config files
      • nagios -v /etc/nagios/nagios.cfg



    • Start Nagios
      • /etc/init.d/nagios start



    • Start Apache
      • /etc/init.d/httpd start


    Verify Install


    • Try logging into your new Nagios installation by going to http://YourIpAddress/nagios/ and logging in with nagiosadmin and the password you set.

    Nagios Server Configuration

    Before starting any configuration make it a habit to backup all configuration files. This will save us a lot of time in troubleshooting. Having a backup will also allow us to restore the most recent configuration to the system. We can also make the backup configuration as a future reference in case we need something :
    [mylogin@hostname nagios]# cd /etc
    [mylogin@hostname nagios]# cp -frp nagios nagios.backup-<date>
    [mylogin@hostname nagios]# cp -rf /etc/nagios/objects/localhost.cfg /etc/nagios/objects/server1.cfg
    [mylogin@hostname nagios]# chown -R nagios:nagios server1.cfg
    [mylogin@hostname nagios]# nano /etc/nagios/objects/server1.cfg
    Code: 
    define host{
    use                     linux-server            ; Name of host template to use
    ; This host definition will inherit all variables that are defined
    ; in (or inherited by) the linux-server host template definition.
    host_name               server1
    alias                   server1
    address                 your client server ip
    }
    define hostgroup{
    hostgroup_name  server1-servers ; The name of the hostgroup
    alias           server1 Servers ; Long name of the group
    members         server1     ; Comma separated list of hosts that belong to this group
    }
    define service{
    use                             local-service         ; Name of service template to use
    host_name                       server1
    service_description             PING
    check_command            check_ping!100.0,20%!500.0,60%
    }
     define service{
    use                             local-service         ; Name of service template to use
    host_name                       server1
    service_description             Root Partition
    check_command            check_local_disk!20%!10%!/
    }
     define service{
    use                             local-service         ; Name of service template to use
    host_name                       server1
    service_description             Current Users
    check_command            check_local_users!20!50
    }
     define service{
    use                             local-service         ; Name of service template to use
    host_name                       server1
    service_description             Total Processes
    check_command            check_local_procs!250!400!RSZDT
    }
     # Define a service to check the load on the local machine.
     define service{
    use                             local-service         ; Name of service template to use
    host_name                       server1
    service_description             Current Load
    check_command            check_local_load!5.0,4.0,3.0!10.0,6.0,4.0
    }
     define service{
    use                             local-service         ; Name of service template to use
    host_name                       server1
    service_description             Swap Usage
    check_command            check_local_swap!20!10
    }
     define service{
    use                             local-service         ; Name of service template to use
    host_name                       server1
    service_description             SSH
    check_command            check_ssh
    notifications_enabled        0
    }
     define service{
    use                             local-service         ; Name of service template to use
    host_name                       server1
    service_description             HTTP
    check_command            check_http
    notifications_enabled        0
    }
    Your Configuration will be like this . Now save that config.
    [mylogin@hostname nagios]#service nagios restart
    [mylogin@hostname nagios]# chkconfig nagios on
    [mylogin@hostname nagios]# service nrpe restart
    [mylogin@hostname nagios]# chkconfig nrpe on
    [mylogin@hostname nagios]# nagios -v /etc/nagios/nagios.cfg
    Nagios Client Configuration

    [mylogin@hostname nagios]# nano /etc/nagios/nrpe.cfg
    change server_address=127.0.0.1 to your nagios server ip
    [mylogin@hostname nagios]# service nagios restart
    [mylogin@hostname nagios]# chkconfig nagios on
    [mylogin@hostname nagios]# service nrpe restart
    [mylogin@hostname nagios]# chkconfig nrpe on
    onel0ve Reviewed by onel0ve on . Install Nagios & Nagios Client (NRPE) on CentOS 5 Installation Add RPMForge Yum Repository It is recommended that you configure yum-priorities prior to following this tutorial to avoid having base CentOS packages being overwritten by the RPMForge repository. Instructions to do so can be found on the CentOS Wiki. For x86 (32-bit) systems rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.i386.rpm Rating: 5
    || Host4Offshore :: Reliable, Quality, Fast Offshore Hosting Solution (USA/Netherlands/Sweden/Russia/Romania)
    || Shared , Reseller Hosting Sales Thread
    || Rapidleech Hosting Sales Thread
    || Current Promotion

  2.   Sponsored Links

  3.     
    #2
    ψ(`∇?)ψ


  4.     
    #3
    Member
    Website's:
    host4offshore.com
    read my whole post i explain how to config it properly . Its not copy of that post .
    || Host4Offshore :: Reliable, Quality, Fast Offshore Hosting Solution (USA/Netherlands/Sweden/Russia/Romania)
    || Shared , Reseller Hosting Sales Thread
    || Rapidleech Hosting Sales Thread
    || Current Promotion

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to install Qbittorrent in centOS??
    By gfxguru in forum Technical Help Desk Support
    Replies: 1
    Last Post: 28th Jun 2011, 01:31 PM
  2. how to install ftp on centos
    By -={MINDFREAK}=- in forum Technical Help Desk Support
    Replies: 3
    Last Post: 12th Jun 2011, 04:50 PM
  3. How to install Email Client for my website
    By Jason_weds_Freddy in forum Technical Help Desk Support
    Replies: 4
    Last Post: 23rd Apr 2011, 05:53 PM
  4. How To UnInstall No Maching Client from CentOs
    By dxgamers in forum Server Management
    Replies: 0
    Last Post: 29th Aug 2010, 11:59 AM

Tags for this Thread

BE SOCIAL