Saturday, December 11, 2010

How To Install Nagios on Ubuntu 10.04


References:
  • http://library.linode.com/server-monitoring/nagios/ubuntu-10.04-lucid
  • http://www.ubuntugeek.com/nagios-network-monitoring-system-setup-in-ubuntu.html
  • https://help.ubuntu.com/10.04/serverguide/C/nagios.html

How To Monitor Network with Ntop on Ubuntu 10.04 and Mikrotik


Install Ntop

$sudo apt-get install ntop

Next, Configure Ntop

Set Admin Password

$sudo ntop --set-admin-password

Restart Ntop Service

$sudo /etc/init.d/ntop restart

Then check if your ntop already running by visiting

http://[your_ntop_server_ip]:3000 (without [ ])

Next, we configure ntop to receive Mikrotik's traffic flow

Select Menu: Plugin -> NetFlow -> Activate
Select Menu: Plugin -> NetFlow -> Configure
Edit the Netflow Name = Mikrotik (activate)
Edit Local Collector UDP Port = 2055
Edit Virtual NetFlow Interface Network Address = [your_mikrotik_ip_in_cidr_format]
Select Admin -> Switch Interface -> Select Mikrotik
If your ntop service is up and running, next step is to configure mikrotik.

Enable traffic-flow on mikrotik by following these steps below:

[admin@Mikrotik] > /ip traffic-flow
[admin@Mikrotik] /ip traffic-flow> set enabled=yes
[admin@Mikrotik] /ip traffic-flow> print
enabled: yes
interfaces: all
cache-entries: 4k
active-flow-timeout: 30m
inactive-flow-timeout: 15s
[admin@Mikrotik] /ip traffic-flow> target
[admin@Mikrotik] /ip traffic-flow target> add address=[your_cacti_server_ip]:2055 \
\... version=9
[admini@Mikrotik] /ip traffic-flow target> print
Flags: X - disabled
# ADDRESS VERSION
0 [your_cacti_server_ip]:2055 9
[admin@Mikrotik] /ip traffic-flow target> print
Flags: X - disabled
# ADDRESS VERSION
0 [your_cacti_server_ip]:2055 9

After a while your ntop will began collecting data from Mikrotik traffic Flow. Done!

*Update:

It seems that the current version of libpcap in Ubuntu 10.04 has bug in it. So I need to manually upgrade to the new version (libpcap-dev_1.1.1-2_all.deb)

References:
  • http://fisikaunud.wordpress.com/2008/10/08/network-monitor-ntop-di-windows-dengan-mikrotik/
  • http://www.mikrotik.com/testdocs/ros/2.9/ip/traffic-flow.php
  • https://help.ubuntu.com/community/Ntop

Friday, December 10, 2010

Mengganti timezone Ubuntu Server Menjadi Waktu Indonesia (Asia/Jakarta)


Ganti isi file di bawah ini menjadi Asia/Jakarta

user@ubuntu1004:~$ sudo vim /etc/timezone

Kemudian konfigurasi ulang dengan perintah di bawah

user@ubuntu1004:~$ sudo dpkg-reconfigure --frontend noninteractive tzdata

Current default time zone: 'Asia/Jakarta'
Local time is now: Fri Dec 8 18:12:31 WIT 2010.
Universal Time is now: Fri Dec 8 11:12:31 UTC 2010.

How to Enable SNMP Monitoring on Mikrotik

Open New Winbox Terminal or SSH shell

Enable SNMP
[user@Mikrotik] > /snmp
[user@Mikrotik] /snmp > set enabled=yes contact=[your_name] location=[your_location]

Next, set disable community public read access
[user@Mikrotik] /snmp> community
[user@Mikrotik] /snmp community> print
# NAME ADDRESS SECURITY READ-ACCESS
0 public 0.0.0.0/0 none yes
[user@Mikrotik] /snmp community> set public read-access=no

Then add your community name and specify access ip address
[user@Mikrotik] /snmp community> add name=network address=192.168.1.1/24
[user@Mikrotik] /snmp community> print
# NAME ADDRESS SECURITY READ-ACCESS
0 public 0.0.0.0/0 none no
1 network 10.1.1.0/24 none no
[user@Mikrotik] /snmp community> set network read-access=yes

That's it! Then prepare your SNMP monitoring software!

Good Luck!

How to Install Cacti in Ubuntu 10.04 for Mikrotik monitoring

Update Ubuntu package list

apt-get update
apt-get upgrade

Install prerequired packages

apt-get install snmpd snmp mysql-server apache2 libapache2-mod-php5 \
php5-mysql php5-cli php5-snmp

Install cacti

apt-get install cacti

- Configuring php-adodb -> Select OK
- Configuring cacti (select webserver) -> Select Apache2
- Configuring cati (dbconfig-common) -> Select Yes
- Insert your MySQL password
- Insert your MySQL Cacti Administration password

Open your cacti control panel in http://localhost/cacti

Then configure your cacti using tutorial below:
  • http://www.nixnux.or.id/2008/11/15/graphing-mikrotik-queue-simple-and-queue-tree-with-cacti/