Difference between revisions of "Instalasi MRTG"
Onnowpurbo (talk | contribs) |
Onnowpurbo (talk | contribs) |
||
Line 3: | Line 3: | ||
− | MRTG | + | MRTG juga dikenal sebagai "Multi Router Traffic Grapher" adalah tool yang free dan open source untuk memantau beban lalu lintas pada jaringan. Kita dapat memonitor lalu lintas jaringan harian, mingguan, bulanan, dan tahunan menggunakan MRTG. MRTG mendukung sistem operasi Windows dan Linux. MRTG menyediakan antarmuka web sederhana untuk menampilkan data lalu lintas jaringan dalam bentuk grafis. |
− | + | ==Kebutuhan== | |
− | |||
− | + | * Server Ubuntu 20.04 | |
− | + | * non-root user dengan sudo privilige | |
− | |||
− | + | ==Instalasi tool pendukung== | |
− | + | Instalasi paket | |
− | + | sudo apt -y install apache2 snmp snmpd | |
+ | |||
+ | Restart apache & snmp | ||
sudo systemctl start apache2 | sudo systemctl start apache2 | ||
Line 24: | Line 24: | ||
sudo systemctl enable snmpd | sudo systemctl enable snmpd | ||
− | + | ==Instalasi & konfigurasi MRTG== | |
− | |||
− | |||
− | |||
− | |||
− | + | Instalasi MRTG | |
− | sudo | + | sudo apt -y install mrtg |
− | + | Buat directory & set permission di web | |
− | sudo chown -R www-data:www-data /var/www/mrtg | + | sudo mkdir /var/www/html/mrtg |
+ | sudo chown -R www-data:www-data /var/www/html/mrtg | ||
− | + | Buat konfigurasi MRTG | |
sudo cfgmaker public@localhost > /etc/mrtg.cfg | sudo cfgmaker public@localhost > /etc/mrtg.cfg | ||
Line 44: | Line 41: | ||
You should see the following output: | You should see the following output: | ||
− | cfgmaker public@localhost > /etc/mrtg.cfg | + | cfgmaker public@localhost > /etc/mrtg.cfg |
− | --base: Get Device Info on public@localhost: | + | --base: Get Device Info on public@localhost: |
− | --base: Vendor Id: Unknown Vendor - 1.3.6.1.4.1.8072.3.2.10 | + | --base: Vendor Id: Unknown Vendor - 1.3.6.1.4.1.8072.3.2.10 |
− | --base: Populating confcache | + | --base: Populating confcache |
− | --base: Get Interface Info | + | --base: Get Interface Info |
− | --base: Walking ifIndex | + | --base: Walking ifIndex |
− | --base: Walking ifType | + | --base: Walking ifType |
− | --base: Walking ifAdminStatus | + | --base: Walking ifAdminStatus |
− | --base: Walking ifOperStatus | + | --base: Walking ifOperStatus |
− | --base: Walking ifMtu | + | --base: Walking ifMtu |
− | --base: Walking ifSpeed | + | --base: Walking ifSpeed |
− | |||
− | |||
− | + | Buat index.html | |
− | + | sudo indexmaker /etc/mrtg.cfg > /var/www/html/mrtg/index.html | |
− | + | Konfigurasi Apache Web untuk MRTG | |
− | sudo | + | sudo vi /etc/apache2/sites-available/mrtg.conf |
− | + | Tambahkan, | |
<VirtualHost *:80> | <VirtualHost *:80> | ||
ServerAdmin admin@yourdomain.com | ServerAdmin admin@yourdomain.com | ||
− | DocumentRoot "/var/www/mrtg" | + | DocumentRoot "/var/www/html/mrtg" |
ServerName yourdomain.com | ServerName yourdomain.com | ||
− | <Directory "/var/www/mrtg/"> | + | <Directory "/var/www/html/mrtg/"> |
Options None | Options None | ||
AllowOverride None | AllowOverride None | ||
Line 83: | Line 78: | ||
</VirtualHost> | </VirtualHost> | ||
− | + | Enable site dan restart, | |
sudo a2ensite mrtg | sudo a2ensite mrtg | ||
sudo systemctl restart apache2 | sudo systemctl restart apache2 | ||
− | + | MRTG bisa dilihat di URL http://yourdomain.com | |
Revision as of 08:43, 14 May 2020
Sumber: https://www.howtoforge.com/tutorial/how-to-install-and-configure-mrtg-on-ubuntu-1804/
MRTG juga dikenal sebagai "Multi Router Traffic Grapher" adalah tool yang free dan open source untuk memantau beban lalu lintas pada jaringan. Kita dapat memonitor lalu lintas jaringan harian, mingguan, bulanan, dan tahunan menggunakan MRTG. MRTG mendukung sistem operasi Windows dan Linux. MRTG menyediakan antarmuka web sederhana untuk menampilkan data lalu lintas jaringan dalam bentuk grafis.
Kebutuhan
- Server Ubuntu 20.04
- non-root user dengan sudo privilige
Instalasi tool pendukung
Instalasi paket
sudo apt -y install apache2 snmp snmpd
Restart apache & snmp
sudo systemctl start apache2 sudo systemctl enable apache2 sudo systemctl start snmpd sudo systemctl enable snmpd
Instalasi & konfigurasi MRTG
Instalasi MRTG
sudo apt -y install mrtg
Buat directory & set permission di web
sudo mkdir /var/www/html/mrtg sudo chown -R www-data:www-data /var/www/html/mrtg
Buat konfigurasi MRTG
sudo cfgmaker public@localhost > /etc/mrtg.cfg
You should see the following output:
cfgmaker public@localhost > /etc/mrtg.cfg --base: Get Device Info on public@localhost: --base: Vendor Id: Unknown Vendor - 1.3.6.1.4.1.8072.3.2.10 --base: Populating confcache --base: Get Interface Info --base: Walking ifIndex --base: Walking ifType --base: Walking ifAdminStatus --base: Walking ifOperStatus --base: Walking ifMtu --base: Walking ifSpeed
Buat index.html
sudo indexmaker /etc/mrtg.cfg > /var/www/html/mrtg/index.html
Konfigurasi Apache Web untuk MRTG
sudo vi /etc/apache2/sites-available/mrtg.conf
Tambahkan,
<VirtualHost *:80> ServerAdmin admin@yourdomain.com DocumentRoot "/var/www/html/mrtg" ServerName yourdomain.com <Directory "/var/www/html/mrtg/"> Options None AllowOverride None Order allow,deny Allow from all Require all granted </Directory> TransferLog /var/log/apache2/mrtg_access.log ErrorLog /var/log/apache2/mrtg_error.log </VirtualHost>
Enable site dan restart,
sudo a2ensite mrtg sudo systemctl restart apache2
MRTG bisa dilihat di URL http://yourdomain.com