Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ CentOS 6.7 install Nagios Tutorials     - Notebook computer forget password solution (Linux)

- Python Dir find a folder several files (Programming)

- Git uses a small mind (Linux)

- CentOS6.3 build a Python 3.3 environment to access Oracle 11gR2 (Database)

- Linux fixes fatal error: x264.h: No such file or directo (Linux)

- Manager Docker browser (Server)

- openSUSE 13.1 / 13.2 installation SoundConverter 2.1.2 (Linux)

- Linux server remote user to obtain root privileges prevention (Linux)

- Teach you how to choose to install CentOS 6.5 installation package (Linux)

- Git Experience Sharing - Using a remote repository (Linux)

- Ubuntu / Fedora / CentOS system how to install Plex Media Server 0.9.9 (Linux)

- Modify Linux terminal prompt path length (Linux)

- ORA-00824: can not set sga_target due to existing problem-solving (Database)

- MySQL query plan key_len know all (Database)

- Linux server alarms using Java (Server)

- Linux static library generated Guide (Programming)

- Linux open handle limit adjustment (Linux)

- How to handle special characters in JSON (Programming)

- CentOS / Linux install VNC Server (Linux)

- Java objects are taking up much space (Programming)

 
         
  CentOS 6.7 install Nagios Tutorials
     
  Add Date : 2018-11-21      
         
       
         
  CentOS 6.7 install Nagios Tutorials
Reference document: https: //assets.nagios.com/downloads/nagioscore/docs/nagioscore/4/en/quickstart-Fedora.html

A. Installing dependencies

[Root @ Nagios ~] # yum install -y httpd php
[Root @ Nagios ~] # yum install -y gcc glibc glibc-common
[Root @ Nagios ~] # yum install -y gd gd-devel
[Root @ Nagios ~] # yum install -y perl ntp unzip
[Root @ Nagios ~] # yum install -y openssl-devel

[Root @ Nagios ~] # /etc/init.d/ntpd start
[Root @ Nagios ~] # chkconfig ntpd on

[Root @ Nagios ~] # / usr / sbin / useradd -m nagios
[Root @ Nagios ~] # passwd nagios

[Root @ Nagios ~] # / usr / sbin / groupadd nagcmd
[Root @ Nagios ~] # / usr / sbin / usermod -a -G nagcmd nagios
[Root @ Nagios ~] # / usr / sbin / usermod -a -G nagcmd apache
[Root @ Nagios ~] # id nagios
uid = 500 (nagios) gid = 500 (nagios) groups = 500 (nagios), 501 (nagcmd)
[Root @ Nagios ~] # id apache
uid = 48 (apache) gid = 48 (apache) groups = 48 (apache), 501 (nagcmd)

Two .nagios installation

[Root @ Nagios ~] # cd / usr / local / src
[Root @ Nagios src] # wget http://nagios-plugins.org/download/nagios-plugins-2.1.1.tar.gz
[Root @ Nagios src] # wget https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.1.1.tar.gz
[Root @ Nagios src] # tar zxvf nagios-4.1.1.tar.gz
[Root @ Nagios src] # cd nagios-4.1.1
[Root @ Nagios nagios-4.1.1] # ./configure --prefix = / usr / local / nagios --with-comand-group = nagcmd
[Root @ Nagios nagios-4.1.1] # make all
[Root @ Nagios nagios-4.1.1] # make install
[Root @ Nagios nagios-4.1.1] # make install-init
[Root @ Nagios nagios-4.1.1] # make install-config
[Root @ Nagios nagios-4.1.1] # make install-commandmode
[Root @ Nagios nagios-4.1.1] # make install-webconf
[Root @ Nagios nagios-4.1.1] # cp -rf contrib / eventhandlers / usr / local / nagios / libexec /
[Root @ Nagios nagios-4.1.1] # chown -R nagios: nagios / usr / local / nagios / libexec / eventhandlers

Three .nagios plugins installed

[Root @ Nagios src] # tar xzf nagios-plugins-2.1.1.tar.gz
[Root @ Nagios src] # cd nagios-plugins-2.1.1
[Root @ Nagios nagios-plugins-2.1.1] # ./configure --prefix = / usr / local / nagios --with-nagios-user = nagios --with-nagios-group = nagios
[Root @ Nagios nagios-plugins-2.1.1] # make && make install

Four .nrpe plug-in installation

[Root @ Nagios src] # wget http://nchc.dl.sourceforge.net/project/nagios/nrpe-2.x/nrpe-2.15/nrpe-2.15.tar.gz
[Root @ Nagios src] # tar zxf nrpe-2.15.tar.gz
[Root @ Nagios src] # cd nrpe-2.15
[Root @ Nagios nrpe-2.15] # ./configure --prefix = / usr / local / nagios
[Root @ Nagios nrpe-2.15] # make all
[Root @ Nagios nrpe-2.15] # make install-plugin
[Root @ Nagios nrpe-2.15] # make install-daemon
[Root @ Nagios nrpe-2.15] # make install-daemon-config


# Test start
# / Usr / local / nagios / bin / nrpe -c /usr/local/nagios/etc/nrpe.cfg -d

# Comes with a startup script
[Root @ Nagios nrpe-2.15] # cp -rf init-script.in /etc/init.d/nrpe
[Root @ Nagios nrpe-2.15] # chmod a + x /etc/init.d/nrpe
[Root @ Nagios ~] # /etc/init.d/nrpe start

Note: In fact, access to information are relying on nagios / usr / local / nagios / libexec / check_nrpe script initiative to obtain information on the service side nrpe

V. configure and start the service

[Root @ Nagios ~] # vi /usr/local/nagios/etc/objects/contacts.cfg
define contact {
        contact_name nagiosadmin
        use generic-contact
        alias Nagios Admin
        email ca0gu0@126.com
        }

[Root @ Nagios ~] # vi /usr/local/nagios/etc/objects/commands.cfg
define command {
        command_name check_nrpe
        command_line $ USER1 $ / check_nrpe -H "$ HOSTADDRESS $" -c "$ ARG1 $"
}
        
[Root @ Nagios ~] # htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

# Check the configuration file is correct
[Root @ Nagios ~] # / usr / local / nagios / bin / nagios -v /usr/local/nagios/etc/nagios.cfg

[Root @ Nagios ~] # chkconfig nagios on
[Root @ Nagios ~] # service nagios start

[Root @ Nagios ~] # chkconfig nrpe on
[Root @ Nagios ~] # /etc/init.d/nrpe start

[Root @ Nagios ~] # chkconfig httpd on
[Root @ Nagios ~] # service httpd start
[Root @ Nagios ~] # touch /var/www/html/index.html

VI. Configuring Mail send

[Root @ Nagios ~] # yum -y install mailx
[Root @ Nagios ~] # echo "mail test" | mail -s test ca0gu0@126.com

# If not specified, the default will send mail mail.rc local postfix
#email send tools
#nano /etc/mail.rc
#set from=s0lence@126.com smtp = smtp.126.com
#set smtp-auth-user = xx @ oo smtp-auth-password = xxoo
#set smtp-auth = login
     
         
       
         
  More:      
 
- shell script: a key optimization CentOS system (Linux)
- Shell Programming points to note about the function (Programming)
- Oracle users to automatically increase the partition table (Database)
- xCAT line installation on CentOS 6.X (Linux)
- C ++: Postmodern systems programming language (Programming)
- Increase ssh security service under Linux (Linux)
- Awk include binding capacity larger than the specified size of all files directory (Linux)
- Why did not Oracle privileges can also log in with sysdba (Database)
- JDK installation under CentOS (Linux)
- GRUB2 boot Ubuntu Manual (Linux)
- The default permissions for files and directories under Linux computing (Linux)
- Will Laravel become the most successful PHP framework? (Programming)
- Linux tool curl and wget advanced use (Linux)
- Use smartmontools view the health status of hard disk (Linux)
- Some common Linux commands Study Notes (Linux)
- About Linux iptables firewall interview questions and answers (Linux)
- Make Windows boot disk to install USB in Ubuntu Linux (Linux)
- Process monitoring tools Supervisor start MongoDB (Database)
- RPM package management under Linux (Linux)
- How to install and use the Snort in Ubuntu 15.04 (Linux)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.