Wadah Belajar Linux, Debian, Mikrotik, Networking, Routing, dan Ilmu Pendukungnya

< Browse > Home / Linux, Networking, script / Blog article: Install Nagios di Debian

| Mobile | RSS

Install Nagios di Debian

October 16th, 2008 | No Comments | Posted in Linux, Networking, script

Paket yg dibutuhkan :
- Apache2

apt-get install apache2

- GCC Compiler dan Development libraries

apt-get install build-essential

- GD Development libraries

apt-get install libgd2-xpm-dev

Create Account :
Bikin user nagios dan kasih password :

/usr/sbin/useradd -m nagios
passwd nagios

Add nagios group

/usr/sbin/groupadd nagios
/usr/sbin/usermod -G nagios nagios

Bikin group nagcmd yg mbolehin external commmands dari web interface, tambahin user nagios dan apache ke group tersebut.

/usr/sbin/groupadd nagcmd
/usr/sbin/usermod -G nagcmd nagios
/usr/sbin/usermod -G nagcmd www-data

Download Nagios dan plugin-nya.
Buka http://www.nagios.org/download/ utk versi terbaru.

wget http://transact.dl.sourceforge.net/sourceforge/nagios/nagios-3.0.3.tar.gz
wget http://transact.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.12.tar.gz

Ekstrak Nagios

tar -xvzf nagios-3.0.3.tar.gz
cd nagios-3.0.3

Konfigur dengan group nagcmd

./configure –with-command-group=nagcmd

Compile source code Nagios

make all

Install binaries, init script, contoh config file, set permisi direktori external command, web config.

make install
make install-init
make install-config
make install-commandmode
make install-webconf

Bikin nagiosadmin account, jgn sampe lupa passwordnya.

htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

Restart apache

/etc/init.d/apache2 reload

Compile dan install plugin Nagios

cd .. (jika msh blm pindah ke direktori lain)
tar -xvzf nagios-plugins-1.4.12.tar.gz
cd nagios-plugins-1.4.12
./configure –with-nagios-user=nagios –with-nagios-group=nagios
make
make install

System startup

ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios

Verifikasi contoh config file nagios

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

Jika tidak ada error, start nagios

/etc/init.d/nagios start

Login ke Web Interface dengan user nagiosadmin

http://localhost/nagios

Jika ingin notifikasi by email maka harus install mailx

apt-get install mailx

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Blogosphere News
  • Live
  • MisterWong
  • MySpace
  • Ping.fm
  • Slashdot
  • StumbleUpon
  • Technorati
  • Print
  • email
Leave a Reply 3034 views, 1 so far today |

Related Posts

Leave a Reply



View My Stats