INSTALASI + KONFIGURASI NAGIOS - UBUNTU SERVER

Diskusi tentang Ubuntu Server baik webserver, database server, samba server dan service lainnya serta jaringan menggunakan Sistem Operasi Ubuntu.
User avatar
cashper
Posts: 3
Joined: 15 Nov 2013, 15:34

INSTALASI + KONFIGURASI NAGIOS - UBUNTU SERVER

Postby cashper » 15 Nov 2013, 15:50

hai bro, ni saya punya tips menarik tentang nagios (aplikasi monitoring untuk jaringan) dimana lu bisa mantau jaringan lu, seperti: server, kmputer, PC, dll yang lu pantau,.
coba saja menggunakan nagios, kalau mau lebih lengkapnya nagios itu apa bisa klik ke situs ini: [color:#FF0000]http://en.wikipedia.org/wiki/Nagios[/color]

dan setelah sudah paham, saya akan memberi klue atau catatan untuk mengintal nagios di ubuntu secara langsung,. langsung saja cekidot:

[color:#FF0000]What You�ll End Up With[/color]

If you follow these instructions, here�s what you�ll end up with:

Nagios and the plugins will be installed underneath /usr/local/nagios
Nagios will be configured to monitor a few aspects of your local system (CPU load, disk usage, etc.)
The Nagios web interface will be accessible at http://localhost/nagios/

[color:#FF0000]Required Packages[/color]

Make sure you�ve installed the following packages on your Ubuntu installation before continuing.

[color:#FF0000] Apache 2
PHP
GCC compiler and development libraries
GD development libraries [/color]


You can use apt-get to install these packages by running the following commands:
[color:#FF0000]
sudo apt-get install apache2

sudo apt-get install libapache2-mod-php5

sudo apt-get install build-essential [/color]

With Ubuntu 6.10, install the gd2 library with this command:

[color:#FF6666]sudo apt-get install libgd2-dev[/color]

With Ubuntu 7.10, the gd2 library name has changed, so you�ll need to use the following:

[color:#FF0000]sudo apt-get install libgd2-xpm-dev [/color]

[color:#33FF33]Create Account Information[/color]
Become the root user.
[color:#FF0000]
sudo -s[/color]


Create a new nagios user account and give it a password.

[color:#FF0000]/usr/sbin/useradd -m -s /bin/bash nagios

passwd nagios
[/color]

On older Ubuntu server editions (6.01 and earlier), you will need to also add a nagios group (it�s not created by default). You should be able to skip this step on desktop, or newer server editions of Ubuntu.

[color:#FF0000]/usr/sbin/groupadd nagios

/usr/sbin/usermod -G nagios nagios
[/color]

Create a new nagcmd group for allowing external commands to be submitted through the web interface. Add both the nagios user and the apache user to the group.

[color:#FF0000]/usr/sbin/groupadd nagcmd

/usr/sbin/usermod -a -G nagcmd nagios

/usr/sbin/usermod -a -G nagcmd www-data [/color]

[color:#33FF33] Download Nagios and the Plugins[/color]
Create a directory for storing the downloads.

[color:#FF0000]mkdir ~/downloads

cd ~/downloads
[/color]

Download the source code tarballs of both Nagios and the Nagios plugins (visit http://www.nagios.org/download/ for links to the latest versions). These directions were tested with Nagios 3.1.1 and Nagios Plugins 1.4.11.

[color:#FF0000]wget http://prdownloads.sourceforge.net/sour ... 2.3.tar.gz

wget http://prdownloads.sourceforge.net/sour ... .11.tar.gz[/color]

[color:#33FF33]Compile and Install Nagios[/color]
Extract the Nagios source code tarball.

[color:#FF0000]cd ~/downloads

tar xzf nagios-3.2.3.tar.gz

cd nagios-3.2.3[/color]

Run the Nagios configure script, passing the name of the group you created earlier like so:

[color:#FF0000]./configure --with-command-group=nagcmd[/color]

Compile the Nagios source code.

[color:#FF0000]make all[/color]



Install binaries, init script, sample config files and set permissions

on the external command directory.

[color:#FF0000]make install

make install-init

make install-config

make install-commandmode[/color]

[color:#33FF33] Customize Configuration [/color]
Sample configuration files have now been installed in the /usr/local/nagios/etc directory. These sample files should work fine for getting started with Nagios. You�ll need to make just one change before you proceed�
Edit the /usr/local/nagios/etc/objects/contacts.cfg config file with your favorite editor and change the email address associated with the nagiosadmin contact definition to the address you�d like to use for receiving alerts.

[color:#FF6666]vi /usr/local/nagios/etc/objects/contacts.cfg[/color]


[color:#33FF33] Configure the Web Interface[/color]
Install the Nagios web config file in the Apache conf.d directory.

[color:#FF0000]make install-webconf[/color]

Create a nagiosadmin account for logging into the Nagios web interface.

Remember the password you assign to this account � you�ll need it later.
[color:#FF0000]
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin[/color]

Restart Apache to make the new settings take effect.

[color:#FF0000]/etc/init.d/apache2 reload [/color]

Note:Consider implementing the ehanced CGI security measures described

here to ensure that your web authentication credentials are not compromised.

[color:#FF0000]Compile and Install the Nagios Plugins [/color]
[color:#FF0000]
cd ~/downloads

tar xzf nagios-plugins-1.4.11.tar.gz

cd nagios-plugins-1.4.11[/color]

Compile and install the plugins.

[color:#FF0000]./configure --with-nagios-user=nagios --with-nagios-group=nagios

make

make install [/color]

[color:#33FF33]Start Nagios[/color]

Configure Nagios to automatically start when the system boots.

[color:#FF0000]ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios [/color]

Verify the sample Nagios configuration files.

[color:#FF0000]/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg [/color]

If there are no errors, start Nagios.

[color:#FF0000]/etc/init.d/nagios start[/color]



[color:#FF0000]
Login to the Web Interface [/color]

You should now be able to access the Nagios web interface at the URL below.

You�ll be prompted for the username (nagiosadmin) and password you specified

earlier.

[color:#FF0000]http://localhost/nagios/ or http://yourIP/nagios/ [/color]







CONFIGURENYA BISA DILIAT DISINI Configure Nagios
User avatar
cashper
Posts: 3
Joined: 15 Nov 2013, 15:34

CONFIGURE NAGIOS UNTUK MELIHAT KONDISI JARINGAN

Postby cashper » 15 Nov 2013, 15:56

[img:center]http://3.bp.blogspot.com/-jAwkmiN384k/Uge83HCZc6I/AAAAAAAAAB4/GizcIdRkkaY/s320/untitled.JPG[/img]

Pada gambar tersebut dapat kita lihat beberapa jaringan lokal dan luar yang dimonitoring , Contoh :

1. Accest Point Office
2. Conection Office
3. Linux Office
4. Adplus_Server
5. Linux Server
6. PC_Accurate

Sekedar contoh , disini kita akan mencoba memonitoring salah satu dari accest point (Bright-2) yang
mempunyai IP 192.168.1.14 :

[img:center]http://2.bp.blogspot.com/-QjqPO7Npl30/Uge_RvMCeqI/AAAAAAAAACI/yZam12jLN9Q/s1600/untitled.JPG[/img]

1. Sebelum itu biar mudah siapkan Putty atau bisa didownload disini Putty
2. Masuk Nagios melalui Putty ( kgk usah diblg lg lahh cara masuknya, udh pd tau kok ..haha )
3. Setelah masuk , ketikkan perintah ini : sudo vi /usr/local/nagios/etc/objects/
4. Cari file switch.cfg ( kalo gw sdh gw ubah nama filenya "ap.cfg" (ap = akses point ..hehehe..)
ntr tampilannya seperti ini :

[img:center]http://3.bp.blogspot.com/--6vZq3Pl36k/UgfCaob-LdI/AAAAAAAAACY/7lS2xi5VQMs/s320/untitled.JPG[/img]

5. Edit ip nya, sesuaikan dengan ip kalian. edit jg namanya (Terseraahh daahh ,,,)
6. kalau lebih dari satu , sesuaikan jg nama grupsnya sobb ....

[img:center]http://1.bp.blogspot.com/-eCopoCqN39o/UgfDOxSRngI/AAAAAAAAACg/fN8YhqJU1Ac/s320/untitled.JPG[/img]

7. Lalu masuk ke servicenya , dan sesuaikan namanya ( disini ane gan cm buat service PING doank
untuk si AP , klo ente mau Lebih ,, ya googling aje yee.. :D )
8. kalau sudah tinggal di save ( gak harus ane blg lg kan cara save nya , , jiakkaakaka .. :D )
9. Balik ke putty ketikkan perintah ini : sudo vi /usr/local/nagios/etc/nagios.cfg
10. cari file #cfg_file=/usr/local/nagios/etc/objects/ap.cfg (susaikan dgn nama file ente)
hilangkan tanda # .
11. Lalu Restart Nagios ( Service nagios restart )
12 . SELESAI, silahkan lihat dibrowser anda ( http://ip ente lahhh.. /nagios ) Status nya pasti UP.

Untuk memonitoring yg lainnya silahkan anda kreasi sendiri, contohnya sama seperti diatas .. SALAM OLAH RAGA .. azzzzz
User avatar
abu_unaisah
Posts: 1621
Joined: 24 Nov 2011, 14:07

Re: CONFIGURE NAGIOS UNTUK MELIHAT KONDISI JARINGAN

Postby abu_unaisah » 15 Nov 2013, 16:03

topiknya dijadiin satu aja om
User avatar
bang_andi
Posts: 398
Joined: 03 Sep 2010, 09:07
Location: Di sekitar sungai musi...
Contact:

Re: CONFIGURE NAGIOS UNTUK MELIHAT KONDISI JARINGAN

Postby bang_andi » 16 Nov 2013, 20:25

lbih bgs lg klo theme-nya diganti, coba dg arana theme.

trus tmbahin plugin nagvis om...biar kelihatan pro..

Return to “Ubuntu Server”

Who is online

Users browsing this forum: No registered users and 2 guests