{"id":699,"date":"2012-10-21T12:02:37","date_gmt":"2012-10-21T10:02:37","guid":{"rendered":"http:\/\/www.shukko.com\/x3\/?p=699"},"modified":"2012-10-21T12:02:37","modified_gmt":"2012-10-21T10:02:37","slug":"monitoring-proxmox-openvz-containers-bandwidth","status":"publish","type":"post","link":"https:\/\/www.shukko.com\/x3\/2012\/10\/21\/monitoring-proxmox-openvz-containers-bandwidth\/","title":{"rendered":"Monitoring Proxmox OpenVZ container\u2019s bandwidth"},"content":{"rendered":"<h3>original post: http:\/\/www.aip.im\/2010\/08\/monitoring-proxmox-openvz-containers-bandwidth\/<\/h3>\n<h3><a href=\"http:\/\/www.aip.im\/2010\/08\/monitoring-proxmox-openvz-containers-bandwidth\/\" rel=\"bookmark\">Monitoring Proxmox OpenVZ container\u2019s bandwidth<\/a><\/h3>\n<p>Use these scripts to collect bandwidth data for each container. You can view the data on a graph and total usage by months.<\/p>\n<p>The scripts are originally received from <a href=\"http:\/\/blog.hutzoft.com\/2009\/09\/24\/monitoring-bandwidth-usage-of-individual-containers-%E2%80%93-openvz\/\">Hutzoft<\/a> but modified to work with the Proxmox directory structure.<\/p>\n<p>1. Install rrdtool and PHP support<\/p>\n<pre>apt-get install rrdtool php5<\/pre>\n<p>2. Download the bandwidth collection script and Web UI<\/p>\n<pre>wget http:\/\/www.aip.im\/downloads\/vzmonitor.tar.gz\r\nor\r\nwget http:\/\/www.shukko.com\/vzmonitor.tar.gz<\/pre>\n<p>3. Unpack and relocate<\/p>\n<pre>tar zxvf vzmonitor.tar.gz\r\nmkdir \/usr\/local\/bandwidth\r\nmv bandwidth.sh \/usr\/local\/bandwidth\/\r\nchmod +x \/usr\/local\/bandwidth\/bandwidth.sh\r\nmv vzmonitor \/var\/www\/<\/pre>\n<p>4. Create a cron job to collect the data every 5 minutes (crontab -e)<\/p>\n<pre>*\/5 * * * * cd \/usr\/local\/bandwidth;.\/bandwidth.sh &amp;&gt; \/dev\/null<\/pre>\n<p>5. Add config to Apache (pico \/etc\/apache2\/conf.d\/vzmonitor.conf)<\/p>\n<pre>Alias \/vzmonitor \/var\/www\/vzmonitor\r\n\r\n&lt;Directory \/var\/www\/vzmonitor&gt;\r\nDirectoryIndex index.php\r\n&lt;\/Directory&gt;<\/pre>\n<p>6. Restart Apache<\/p>\n<pre>\/etc\/init.d\/apache2 restart<\/pre>\n<p>7. It&#8217;s ready, wait a few minutes and enter this location to view the bandwidth usage: http:\/\/yourserver\/vzmonitor<\/p>\n","protected":false},"excerpt":{"rendered":"<p>original post: http:\/\/www.aip.im\/2010\/08\/monitoring-proxmox-openvz-containers-bandwidth\/ Monitoring Proxmox OpenVZ container\u2019s bandwidth Use these scripts to collect bandwidth data for each container. You can view the data on a graph and total usage by months. The scripts are originally received from Hutzoft but modified to work with the Proxmox directory structure. 1. Install rrdtool and PHP support apt-get install [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-699","post","type-post","status-publish","format-standard","hentry","category-kategerisiz"],"_links":{"self":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/699","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/comments?post=699"}],"version-history":[{"count":1,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/699\/revisions"}],"predecessor-version":[{"id":700,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/699\/revisions\/700"}],"wp:attachment":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/media?parent=699"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/categories?post=699"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/tags?post=699"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}