Attention: All pages of this wiki depend on the pages that come before it, in order as they are listed on the Main Page. Please check for Dependencies.
Please also look at What You Need to Know Before Using This Wiki
Install Nagios: Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
|||
Line 49: | Line 49: | ||
*<b>Find latest downloads here: </b>http://exchange.nagios.org/directory/Addons/Monitoring-Agents/NRPE--2D-Nagios-Remote-Plugin-Executor/details | *<b>Find latest downloads here: </b>http://exchange.nagios.org/directory/Addons/Monitoring-Agents/NRPE--2D-Nagios-Remote-Plugin-Executor/details | ||
*<b>Note:</b> use --with-ssl-lib=/usr/lib/x86_64-linux-gnu/ to configure on 64-bit machines | *<b>Note:</b> use --with-ssl-lib=/usr/lib/x86_64-linux-gnu/ to configure on 64-bit machines | ||
*<b>Note:</b> Nagios plugins are now hosted here:http://nagios-plugins.org/download/nagios-plugins-2.0.2.tar.gz | |||
<h4>On Houselian</h4> | <h4>On Houselian</h4> |
Latest revision as of 17:24, 15 June 2014
Obtain and Install Nagios
- Find latest downloads here: http://www.nagios.org/download
- cd /usr/src/
- tar zxf nagios-3.5.0.tar.gz
- cd nagios/
- ./configure --with-nagios-user=nagios --with-nagios-group=nagios --with-command-user=nagios --with-command-group=nagios --with-init-dir="" --with-httpd-conf=""
- make all
- make install
- cd ..
- tar zxf nagios-plugins-1.4.16.tar.gz
- cd nagios-plugins-1.4.16/
- ./configure --with-nagios-user=nagios --with-nagios-group=nagios --with-trusted-path=$PATH
- vi /usr/src/nagios-plugins-1.4.16/stdio.in.h.patch
- patch gl/stdio.in.h < stdio.in.h.patch
- make && make install
Configure Nagios
- mkdir -p /usr/local/nagios/etc/objects
- vi /usr/local/nagios/etc/cgi.cfg
- vi /usr/local/nagios/etc/nagios.cfg
- vi /usr/local/nagios/etc/commands.cfg
- vi /usr/local/nagios/etc/contacts.cfg
- vi /usr/local/nagios/etc/timeperiods.cfg
- vi /usr/local/nagios/etc/templates.cfg
- vi /usr/local/nagios/etc/resource.cfg
- vi /usr/local/nagios/etc/objects/computerisms.lan.cfg
- vi /usr/local/nagios/libexec/check_mem_usage
- chmod 755 /usr/local/nagios/libexec/check_mem_usage
- chown -R nagios:nagios /usr/local/nagios/
Configure Apache
- vi /etc/apache2/sites-available/nagios.computerisms.com.conf
- mkdir /var/log/apache2/nagios.computerisms.com
- chown root:adm /var/log/apache2/nagios.computerisms.com/
- a2ensite nagios.computerisms.com.conf
- /etc/init.d/apache2 restart
- samba-tool dns add houselian computerisms.com nagios A 192.168.26.10
Start Nagios
- mkdir -p -m 1755 /var/service/nagios
- mkdir -p -m 0755 /var/service/nagios/log
- vi /var/service/nagios/run
- ln -s /var/service/multilog.run /var/service/nagios/log/run
- chmod 0755 /var/service/nagios/run /var/service/nagios/log/run
- ln -s /var/service/nagios/ /service/nagios
- sv <= Make sure Nagios is running
Install NRPE
- Find latest downloads here: http://exchange.nagios.org/directory/Addons/Monitoring-Agents/NRPE--2D-Nagios-Remote-Plugin-Executor/details
- Note: use --with-ssl-lib=/usr/lib/x86_64-linux-gnu/ to configure on 64-bit machines
- Note: Nagios plugins are now hosted here:http://nagios-plugins.org/download/nagios-plugins-2.0.2.tar.gz
On Houselian
- cd /usr/src
- wget http://downloads.sourceforge.net/project/nagios/nrpe-2.x/nrpe-2.14/nrpe-2.14.tar.gz
- tar zxf nrpe-2.14.tar.gz
- cd nrpe-2.14/
- ./configure --with-nrpe-user=nagios --with-nrpe-group=nagios --with-nagios-user=nagios --with-nagios-group=nagios --with-ssl-lib=/usr/lib/i386-linux-gnu/
- make all
- cp src/check_nrpe /usr/local/nagios/libexec/
On Porchlian
- ssh root@192.168.26.1
- apt-get install build-essential gcc openssl libssl-dev make
- groupadd -g 538 nagios
- useradd -u 538 -g nagios -r nagios -d /usr/local/nagios
- cd /usr/src
- wget http://downloads.sourceforge.net/project/nagios/nrpe-2.x/nrpe-2.14/nrpe-2.14.tar.gz
- wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.16.tar.gz
- tar zxf nrpe-2.14.tar.gz
- cd nrpe-2.14/
- ./configure --with-nrpe-user=nagios --with-nrpe-group=nagios --with-nagios-user=nagios --with-nagios-group=nagios --with-ssl-lib=/usr/lib/i386-linux-gnu/
- make all
- cp src/nrpe /bin/
- vi /etc/nrpe.cfg
- cd ..
- tar zxf nagios-plugins-1.4.16.tar.gz
- cd nagios-plugins-1.4.16
- ./configure --with-nagios-user=nagios --with-nagios-group=nagios
- vi /usr/src/nagios-plugins-1.4.16/stdio.in.h.patch
- patch gl/stdio.in.h < stdio.in.h.patch
- make && make install
- vi /usr/local/nagios/libexec/check_mem_usage
- chown nagios:nagios /usr/local/nagios/libexec/check_mem_usage
- chmod 755 /usr/local/nagios/libexec/check_mem_usage
- vi /etc/init.d/nrpe
- chmod 755 /etc/init.d/nrpe
- insserv -d nrpe
- /etc/init.d/nrpe start
- exit
On Shedlian
- ssh root@192.168.26.11
- apt-get install build-essential gcc openssl libssl-dev make
- groupadd -g 538 nagios
- useradd -u 538 -g nagios -r nagios -d /usr/local/nagios
- cd /usr/src
- wget http://downloads.sourceforge.net/project/nagios/nrpe-2.x/nrpe-2.14/nrpe-2.14.tar.gz
- wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.16.tar.gz
- tar zxf nrpe-2.14.tar.gz
- cd nrpe-2.14/
- ./configure --with-nrpe-user=nagios --with-nrpe-group=nagios --with-nagios-user=nagios --with-nagios-group=nagios --with-ssl-lib=/usr/lib/i386-linux-gnu/
- make all
- cp src/nrpe /bin/
- vi /etc/nrpe.cfg
- cd ..
- tar zxf nagios-plugins-1.4.16.tar.gz
- cd nagios-plugins-1.4.16
- ./configure --with-nagios-user=nagios --with-nagios-group=nagios
- vi /usr/src/nagios-plugins-1.4.16/stdio.in.h.patch
- patch gl/stdio.in.h < stdio.in.h.patch
- make && make install
- vi /usr/local/nagios/libexec/check_mem_usage
- chown nagios:nagios /usr/local/nagios/libexec/check_mem_usage
- chmod 755 /usr/local/nagios/libexec/check_mem_usage
- vi /etc/init.d/nrpe
- chmod 755 /etc/init.d/nrpe
- insserv -d nrpe
- /etc/init.d/nrpe start
- exit