{"id":787,"date":"2015-05-13T00:52:42","date_gmt":"2015-05-13T09:52:42","guid":{"rendered":"http:\/\/blog.box.kr\/?p=787"},"modified":"2015-05-13T00:52:42","modified_gmt":"2015-05-13T09:52:42","slug":"scrap-install-mrtg-multi-router-traffic-grapher-to-see-network-traffic-data-on-the-web","status":"publish","type":"post","link":"https:\/\/blog.box.kr\/?p=787","title":{"rendered":"[scrap] Install MRTG (Multi Router Traffic Grapher) to see network traffic data on the web."},"content":{"rendered":"<p><a href=\"http:\/\/www.server-world.info\/en\/note?os=CentOS_6&amp;p=mrtg\">http:\/\/www.server-world.info\/en\/note?os=CentOS_6&amp;p=mrtg<\/a><\/p>\n<p>&nbsp;<\/p>\n<table class=\"base\" summary=\"1\">\n<tbody>\n<tr>\n<td class=\"num\"><\/td>\n<td>\n<div class=\"block\">Install MRTG (Multi Router Traffic Grapher) to see network traffic data on the web.\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"num\">[1]<\/td>\n<td>\n<div class=\"block\"><a href=\"http:\/\/www.server-world.info\/en\/note?os=CentOS_6&amp;p=httpd&amp;f=1\">Install Apache HTTP Server, refer to here<\/a>.\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"num\">[2]<\/td>\n<td>Install MRTG, SNMP.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table class=\"term\" summary=\"2-1\">\n<tbody>\n<tr>\n<td>[root@dlp ~]#\n<div class=\"color1\"><a href=\"http:\/\/www.server-world.info\/en\/command\/html\/yum.html\">yum<\/a> -y install net-snmp net-snmp-utils mrtg\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table class=\"base\" summary=\"3\">\n<tbody>\n<tr>\n<td class=\"num\">[3]<\/td>\n<td>Configure SNMP (Simple Network Management Protocol).<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table class=\"term\" summary=\"3-1\">\n<tbody>\n<tr>\n<td>\n<div class=\"block\">[root@dlp ~]#\n<div class=\"color1\"><a href=\"http:\/\/www.server-world.info\/en\/command\/html\/vi.html\">vi<\/a> \/etc\/snmp\/snmpd.conf\n<\/div>\n<\/div>\n<div class=\"block\">\n<div class=\"color2\"># line 41: comment out\n<\/div>\n<div class=\"color1\">#\n<\/div>\n<p>com2sec notConfigUser \u00a0 default \u00a0 \u00a0 \u00a0 public\n<\/p><\/div>\n<div class=\"block\">\n<div class=\"color2\"># line 74,75: uncomment and change\n<\/div>\n<div class=\"color2\"># change to your local network for &#8220;mynetwork&#8221; section\n<\/div>\n<div class=\"color2\"># change comunity name except public or private\n<\/div>\n<p>com2sec local<\/p>\n<div class=\"pos2\">localhost\n<\/div>\n<div class=\"pos6\">\n<div class=\"color1\">Serverworld\n<\/div>\n<\/div>\n<p>com2sec mynetwork<\/p>\n<div class=\"color1\">\n<div class=\"pos2\">10.0.0.0\/24\n<\/div>\n<div class=\"pos6\">Serverworld\n<\/div>\n<\/div>\n<\/div>\n<div class=\"color2\"># line 78,79: uncomment\n<\/div>\n<pre>group MyRWGroup  any        local\ngroup MyROGroup  any        mynetwork\n\n<\/pre>\n<div class=\"color2\"># line 85: uncomment\n<\/div>\n<pre>view all    included  .1                               80\n\n<\/pre>\n<div class=\"color2\"># line 93,94: uncomment\n<\/div>\n<pre>access MyROGroup \"\"      any       noauth    0      all    none   none\naccess MyRWGroup \"\"      any       noauth    0      all    all    all\n\n<\/pre>\n<div class=\"block\">[root@dlp ~]#\n<div class=\"color1\">\/etc\/rc.d\/init.d\/snmpd start\n<\/div>\n<p>Starting snmpd: [ OK ]<br \/>\n[root@dlp ~]#<\/p>\n<div class=\"color1\"><a href=\"http:\/\/www.server-world.info\/en\/command\/html\/chkconfig.html\">chkconfig<\/a> snmpd on\n<\/div>\n<\/div>\n<div class=\"color2\"># show status (replace the &#8220;Serverworld&#8221; to your comunity name)\n<\/div>\n<p>[root@dlp ~]#<\/p>\n<div class=\"color1\">snmpwalk -v2c -c Serverworld localhost system\n<\/div>\n<pre>SNMPv2-MIB::sysDescr.0 = STRING: Linux dlp.server.world 2.6.32-504.3.3.el6.x86_64 #1 SMP\nWed Dec 17 01:55:02 UTC 2014 x86_64\nSNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10\nDISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (168142) 0:28:01.42\n...\n...\nSNMPv2-MIB::sysORUpTime.7 = Timeticks: (4) 0:00:00.04\nSNMPv2-MIB::sysORUpTime.8 = Timeticks: (4) 0:00:00.04\n<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table class=\"base\" summary=\"4\">\n<tbody>\n<tr>\n<td class=\"num\">[4]<\/td>\n<td>Configure MRTG.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table class=\"term\" summary=\"4-1\">\n<tbody>\n<tr>\n<td>[root@dlp ~]#\n<div class=\"color1\">cfgmaker &#8211;ifref=descr &#8211;ifdesc=descr Serverworld@10.0.0.30 &gt; \/etc\/mrtg\/mrtg.cfg\n<\/div>\n<div class=\"block\">[root@dlp ~]#\n<div class=\"color1\"><a href=\"http:\/\/www.server-world.info\/en\/command\/html\/vi.html\">vi<\/a> \/etc\/mrtg\/mrtg.cfg\n<\/div>\n<\/div>\n<div class=\"block\">\n<div class=\"color1\">\n<div class=\"color2\"># line 9: add\n<\/div>\n<p>WorkDir: \/var\/www\/mrtg\n<\/p><\/div>\n<\/div>\n<div class=\"block\">\n<div class=\"color2\"># line 16: uncomment\n<\/div>\n<p>Options[_]: growright, bits\n<\/p><\/div>\n<div class=\"block\">\n<div class=\"color2\"># near line 73: make sure lines like follows are uncommented\n<\/div>\n<p>Target[10.0.0.30_eth0]: eth0:Serverworld@10.0.0.30:<br \/>\nSetEnv[10.0.0.30_eth0]: MRTG_INT_IP=&#8221;10.0.0.30&#8243; MRTG_INT_DESCR=&#8221;eth0&#8243;<br \/>\nMaxBytes[10.0.0.30_eth0]: 125000000<br \/>\nTitle[10.0.0.30_eth0]: eth0 &#8212; dlp.server.world<br \/>\nPageTop[10.0.0.30_eth0]: &lt;h1&gt;eth0 &#8212; dlp.server.world&lt;\/h1&gt;\n<\/div>\n<div class=\"block\">\n<div class=\"color2\"># execute mrtg 3 times (display warnings until 3 times)\n<\/div>\n<p>[root@dlp ~]#<\/p>\n<div class=\"color1\">for (( i=1 ; i &lt;= 3 ; i++ )); do env LANG=C mrtg \/etc\/mrtg\/mrtg.cfg; done\n<\/div>\n<p>2015-01-25 21:33:23, Rateup WARNING: \/usr\/bin\/rateup could not read the primary log file for 10.0.0.30_eth0<br \/>\n2015-01-25 21:33:23, Rateup WARNING: \/usr\/bin\/rateup The backup log file for 10.0.0.30_eth0 was invalid as well<br \/>\n2015-01-25 21:33:23, Rateup WARNING: \/usr\/bin\/rateup Can&#8217;t remove 10.0.0.30_eth0.old updating log file<br \/>\n2015-01-25 21:33:23, Rateup WARNING: \/usr\/bin\/rateup Can&#8217;t rename 10.0.0.30_eth0.log to 10.0.0.30_eth0.old updating log file<br \/>\n2015-01-25 21:33:23, Rateup WARNING: \/usr\/bin\/rateup Can&#8217;t remove 10.0.0.30_eth0.old updating log file\n<\/div>\n<div class=\"block\">\n<div class=\"color2\"># generate index file\n<\/div>\n<p>[root@dlp ~]#<\/p>\n<div class=\"color1\">indexmaker &#8211;columns=1 \/etc\/mrtg\/mrtg.cfg &gt; \/var\/www\/mrtg\/index.html\n<\/div>\n<\/div>\n<div class=\"color2\"># updating is done automatically by cron\n<\/div>\n<p>[root@dlp ~]#<\/p>\n<div class=\"color1\"><a href=\"http:\/\/www.server-world.info\/en\/command\/html\/cat.html\">cat<\/a> \/etc\/cron.d\/mrtg\n<\/div>\n<p>*\/5 * * * * root LANG=C LC_ALL=C \/usr\/bin\/mrtg \/etc\/mrtg\/mrtg.cfg &#8211;lock-file \/var\/lock\/mrtg\/mrtg_l &#8211;confcache-file \/var\/lib\/mrtg\/mrtg.ok<\/p><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table class=\"base\" summary=\"5\">\n<tbody>\n<tr>\n<td class=\"num\">[5]<\/td>\n<td>Configure httpd to access MRTG.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table class=\"term\" summary=\"5-1\">\n<tbody>\n<tr>\n<td>\n<div class=\"block\">[root@dlp ~]#\n<div class=\"color1\"><a href=\"http:\/\/www.server-world.info\/en\/command\/html\/vi.html\">vi<\/a> \/etc\/httpd\/conf.d\/mrtg.conf\n<\/div>\n<\/div>\n<div class=\"block\">\n<div class=\"color2\"># line 11: add IP address you allow to access\n<\/div>\n<p>Allow from 127.0.0.1<\/p>\n<div class=\"color1\">10.0.0.0\/24\n<\/div>\n<\/div>\n<p>[root@dlp ~]#<\/p>\n<div class=\"color1\">\/etc\/rc.d\/init.d\/httpd restart\n<\/div>\n<pre>Stopping httpd: [  OK  ]\nStarting httpd: [  OK  ]\n<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table class=\"base\" summary=\"6\">\n<tbody>\n<tr>\n<td class=\"num\">[6]<\/td>\n<td>Access to the &#8220;http:\/\/(MRTG hostname or IP address)\/mrtg\/&#8221; from a client with HTTP, then it&#8217;s possible to see MRTG site.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table class=\"base_win\" summary=\"6-1\">\n<tbody>\n<tr>\n<td><img decoding=\"async\" loading=\"lazy\" class=\"img\" src=\"https:\/\/i0.wp.com\/www.server-world.info\/en\/CentOS_6\/mrtg\/img\/1.png?resize=623%2C307\" alt=\"\" width=\"623\" height=\"307\" data-recalc-dims=\"1\" \/><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>http:\/\/www.server-world.info\/en\/note?os=CentOS_6&amp;p=mrtg &nbsp; Install MRTG (Multi Router Traffic Grapher) to see network traffic data on the web. [1] Install Apache HTTP Server, refer to here. [2] Install MRTG, SNMP. [root@dlp ~]# yum -y install net-snmp net-snmp-utils mrtg [3] Configure SNMP (Simple Network Management Protocol). [root@dlp ~]# vi \/etc\/snmp\/snmpd.conf # line 41: comment out # com2sec notConfigUser \u00a0 default \u00a0 \u00a0 \u00a0 public # line 74,75: uncomment and change # change to your local network for &#8220;mynetwork&#8221; section # change comunity name except public or private com2sec local localhost Serverworld com2sec mynetwork 10.0.0.0\/24 Serverworld # line 78,79: uncomment group MyRWGroup any local group MyROGroup any mynetwork # line 85: uncomment view all included .1 80 # line 93,94: uncomment access MyROGroup &#8220;&#8221; any noauth 0 all none none access MyRWGroup &#8220;&#8221; any noauth 0 all all all [root@dlp ~]# \/etc\/rc.d\/init.d\/snmpd start Starting snmpd: [ OK ] [root@dlp ~]# chkconfig snmpd on # show status (replace the &#8220;Serverworld&#8221; to your comunity name) [root@dlp ~]# snmpwalk -v2c -c Serverworld localhost system SNMPv2-MIB::sysDescr.0 = STRING: Linux dlp.server.world 2.6.32-504.3.3.el6.x86_64 #1 SMP Wed Dec 17 01:55:02 UTC 2014 x86_64 SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10 DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (168142) 0:28:01.42 &#8230; &#8230; SNMPv2-MIB::sysORUpTime.7 = Timeticks: (4) 0:00:00.04 SNMPv2-MIB::sysORUpTime.8 = [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"ngg_post_thumbnail":0,"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[4,5],"tags":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5q9Zn-cH","jetpack-related-posts":[{"id":785,"url":"https:\/\/blog.box.kr\/?p=785","url_meta":{"origin":787,"position":0},"title":"[scrap] \ud154\ub808\uadf8\ub7a8(Telegram) \uc73c\ub85c \uc11c\ubc84 \ubaa8\ub2c8\ud130\ub9c1 \ud558\uae30","date":"2015-05-13","format":false,"excerpt":"http:\/\/idchowto.com\/?p=4027 \uc9c0\ub09c \uc2dc\uac04\uc5d0 \uc774\uc5b4 \uc774\ubc88 \uc2dc\uac04\uc5d0\ub294 Telegram \uc73c\ub85c \uc11c\ubc84 \ubaa8\ub2c8\ud130\ub9c1 \ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc0b4\ud3b4\ubcf4\ub3c4\ub85d \ud558\uaca0\uc2b5\ub2c8\ub2e4. \uba3c\uc800 \uac16\ucdb0\uc838\uc57c\ud560 \ud658\uacbd\uc870\uac74\uc740 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4. \u00a0 < \u00a0\ud658\uacbd\uc870\uac74 > - \uc11c\ubc84\uce21 1. Telegram-cli \uc124\uce58 2. lua \uc2a4\ud06c\ub9bd\ud2b8\uac00 \uac00\ub3d9\ub418\uc5b4 \uc788\uc5b4\uc57c \ud568 - \ud074\ub77c\uc774\uc5b8\ud2b8\uce21 1. \uc778\uc99d\ub41c Telegram \uc571\uc774 \uc124\uce58\ub41c \uc2a4\ub9c8\ud2b8\ud3f0 \u00a0 1. hello.lua \uc2a4\ud06c\ub9bd\ud2b8 \ubb38 function on_msg_receive\u2026","rel":"","context":"In &quot;\uae30\uc220&quot;","img":{"alt_text":"idchowto_cover8","src":"https:\/\/i0.wp.com\/idchowto.com\/wp-content\/uploads\/2014\/10\/idchowto_cover81.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":783,"url":"https:\/\/blog.box.kr\/?p=783","url_meta":{"origin":787,"position":1},"title":"[scrap] \ud154\ub808\uadf8\ub7a8(Telegram)\uc73c\ub85c \uc11c\ubc84 \ubaa8\ub2c8\ud130\ub9c1\ud558\uae30","date":"2015-05-13","format":false,"excerpt":"http:\/\/truefeel.tistory.com\/224 \u00a0 \uba54\uc2e0\uc800 \uac80\uc5f4\ub85c '\ud154\ub808\uadf8\ub7a8(Telegram)' \uad11\ud48d\uc774 \ubd88\uace0 \uc788\ub2e4. \uac1c\uc778\uc801\uc73c\ub85c \uce74\ud1a1\uc744 \uc790\uc8fc \uc0ac\uc6a9\ud558\uc9c0 \uc54a\uc544, \ud154\ub808\uadf8\ub7a8\uc774 \uc808\uc2e4(?)\ud558\uac8c \ud544\uc694\ud558\uc9c0 \uc54a\ub2e4. \ud558\uc9c0\ub9cc \ud154\ub808\uadf8\ub7a8\uc744 \uc0ac\uc6a9\ud574\uc57c\ud560 \uc774\uc720\uac00 \uc0dd\uacbc\ub2e4. \ud154\ub808\uadf8\ub7a8\uc774 \uc11c\ubc84\uc5d0\uc11c \uc0ac\uc6a9\ud560 \uc218 \uc788\ub294 CLI\ub97c \uc81c\uacf5\ud558\uace0 \uc788\uace0, lua\ub098 python\uc73c\ub85c \uc190\uc27d\uac8c \uba54\uc2e0\uc800\uc640 \uc5f0\ub3d9\ud560 \uc218 \uc788\ub2e4. \uadf8\ub798\uc11c \ud154\ub808\uadf8\ub7a8\uc6a9 lua\uc2a4\ud06c\ub9bd\ud2b8\ub97c \ub9cc\ub4e4\uc5b4\uc11c \uc11c\ubc84 \uc0c1\ud0dc\ub97c \ud3f0\uc5d0\uc11c \ubc1b\uc544\ubcfc \uc218 \uc788\ub2e4. \uc608\ub97c \ub4e4\uc5b4 \ud2b9\uc815\u2026","rel":"","context":"In &quot;\uae30\uc220&quot;","img":{"alt_text":"telegram-cli \u00ec\u008b\u00a4\u00ed\u0096\u0089\u00ed\u0099\u0094\u00eb\u00a9\u00b4","src":"http:\/\/cfile27.uf.tistory.com\/image\/261CC43B543DF3EA2ED4D5","width":350,"height":200},"classes":[]},{"id":828,"url":"https:\/\/blog.box.kr\/?p=828","url_meta":{"origin":787,"position":2},"title":"[scrap]Top 25 Best Linux Performance Monitoring and Debugging Tools","date":"2015-05-20","format":false,"excerpt":"http:\/\/www.thegeekstuff.com\/2011\/12\/linux-performance-monitoring-tools\/ I\u2019ve compiled 25 performance monitoring and debugging tools that will be helpful when you are working on Linux environment. This list is not comprehensive or authoritative by any means. However this list has enough tools for you to play around and pick the one that is suitable your specific\u2026","rel":"","context":"In &quot;\uae30\uc220&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":762,"url":"https:\/\/blog.box.kr\/?p=762","url_meta":{"origin":787,"position":3},"title":"Install and configure Nginx, MariaDB &amp; PHP-FPM in CentOS 7 (RHEL7)","date":"2015-05-08","format":false,"excerpt":"https:\/\/stavrovski.net\/blog\/install-and-configure-nginx-mariadb-php-fpm-in-centos-7-rhel7 \u00a0 The following is a quick-N-dirty write-up on\u00a0how to install and configure the LEMP stack (Nginx, MariaDB and PHP-FPM) in\u00a0CentOS 7. I use this as a reference\/guide whenever I need to deploy the\u00a0LEMP stack\u00a0on RHEL based machines. TABLE OF CONTENTS Enable EPEL Repository Update CentOS 7 Install and configure\u2026","rel":"","context":"In &quot;Linux&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":711,"url":"https:\/\/blog.box.kr\/?p=711","url_meta":{"origin":787,"position":4},"title":"HOW TO INSTALL SENSU ON CENTOS7","date":"2015-04-15","format":false,"excerpt":"https:\/\/garage.godaddy.com\/tech\/config\/install-sensu-centos7\/ Sensu is a monitoring router for Linux operating systems such as CentOS 7. It monitors \u201ccheck\u201d scripts and passes their results to the corresponding handler scripts when the specified conditions are met. Checking the status of a service such as Apache is one of the most common uses of\u2026","rel":"","context":"In &quot;\uae30\uc220\uc790\ub8cc&quot;","img":{"alt_text":"Uchiwa","src":"https:\/\/i0.wp.com\/garage.godaddy.com\/wp-content\/uploads\/2015\/01\/Uchiwa.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":826,"url":"https:\/\/blog.box.kr\/?p=826","url_meta":{"origin":787,"position":5},"title":"[scrap]50 UNIX \/ Linux Sysadmin Tutorials","date":"2015-05-20","format":false,"excerpt":"http:\/\/www.thegeekstuff.com\/2010\/12\/50-unix-linux-sysadmin-tutorials\/ \u00a0 Merry Christmas and Happy Holidays to all TGS Readers. To wrap this year, I\u2019ve collected 50 UNIX \/ Linux sysadmin related tutorials that we\u2019ve posted so far. This is lot of reading. Bookmark this article for your future reference and read it whenever you get free time. Disk\u2026","rel":"","context":"In &quot;\uae30\uc220&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/posts\/787"}],"collection":[{"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.box.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=787"}],"version-history":[{"count":0,"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/posts\/787\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.box.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=787"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.box.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=787"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.box.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=787"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}