How to Meter and Track Hyper- V Networking Performance with MRTG 1. Jul 2. 01. 5 by Eric Siron 5 Hyper- V Articles. Metering is one of those unpleasant yet essential parts of systems administration. If you don’t know anything about your systems’ resource utilization, you can’t properly design their replacements.
Install And Configure Mrtg On Debian 8
If you haven’t been keeping track, you won’t be able to answer the question, “What happened” when things go awry. If you aren’t keeping a close eye, you won’t have any advance warning before something collapses in the middle of a major production cycle.
When we set up MRTG to monitor router interfaces, it is basically reading two SNMP MIB OIDs (Object IDentifiers). One object is traffic In and the other object is. Debian provides MySQL server 5.5 with both wheezy and jessie but the latest GA (Generally Available) releases are 5.6 and 5.7 with some enhancements and added.
Install MRTG (Multi Router Traffic Grapher) to see network traffic data on the web. Step by step tutorials showing you how to install and configure various applications and services on Debian based Linux distros. Proyecto: Monitorizaci. Nagios is one of the most powerful network monitoring systems, which is widely used in the industry. It can actively monitor any network, and generate audio/email.
When it comes to networking, you’re probably not going to believe how easy it is to get MRTG up and running. My impetus for writing this particular article is twofold. The first, and most important reason, is that you need to be aware of your systems’ activities. It’s really just that simple. The second reason is that I see entirely too many articles insisting that you absolutely must upgrade all of your systems to a minimum of 1. Gb. E immediately or you’ll be personally responsible for the collapse of civilization. For 9. 0%+ of you, that’s complete hogwash and I’m going to help you prove not only that it’s false, but that it’s ridiculously false.
For the < 1. 0% of you for whom it’s true, I can help you prove that as well so you can finally demonstrate that you really do need that hardware. Everyone wins (except the people whose income relies on over- selling networking hardware). You can install MRTG on Windows but I don’t know how and I’m not particularly interested in trying. Installation on Linux, at least Debian- based distributions, is incredibly simple. In the writing of this post, I used a virtual machine that I created just for MRTG by following the instructions in my earlier Getting Started with Ubuntu Linux Server on Hyper- V post.
Install And Configure Mrtg On Debian Linux
For my lab environment that monitors all my systems, it hovers at just under 8. MB of memory demand, to help you size it. What is MRTG? MRTG stands for “Multi Router Traffic Grapher”. It does two things: Periodically reads traffic information from network devices using SNMPConverts gathered data into html pages with png images. Here’s a quick sampler of what you get: MRTG Sample. This is a graph for a single switch port.
The blue line represents outgoing traffic on that port (to the connected computer adapter). The green portion shows traffic inbound to the switch port from the computer system. If you’re green- blue colorblind, the squiggly line that hovers around 1. The green portion is not a line, but like a bar graph without any spaces between the data points. In the above image, that green portion is hovering below 5.
Not being green- blue colorblind myself, I don’t know how tough it is to make the distinction in other cases, but I’m assuming that the blue line always appears darker than the green portion and the green portion always appears darker than the white background. I’ll tell you right now that I am not an expert on MRTG. There are a great many things it can do that I have not yet explored and probably a great many others that I don’t even know about. I’m just going to talk about network device traffic monitoring in the initial version of this post. I’ll likely continue to explore its powers on my own and will return here if I have any further ideas worth sharing. For now, we’re going to go the easy route because I want you to see just how easy this is. Metering versus Monitoring.
I’m being very careful here with my terminology. In the wild, I don’t think people make that much of a distinction between metering and monitoring, but here it’s important. A real monitoring system would not only pay attention to what the systems are doing, but would also have some sort of notification mechanism at a minimum and possibly a remediation system. If there’s an outage, MRTG just keeps reporting its last good data pull (this can be changed, but the reasoning behind it is solid; read the documentation for more information). I do intend to write another post that helps you set up a monitoring system on Linux, but those are a lot harder to work with than MRTG and I think this is something you’d probably like to have up and running quickly. Install MRTG on Ubuntu Server. Assuming you’ve got your Ubuntu Server running as indicated in the previously linked post, there’s very little to do to get MRTG running.
If you read the information on the site that I linked, it talks all about acquiring and compiling and all sorts of other things. That’s unnecessary on our systems. I do agree with the general consensus of the Linux community that you shouldn’t be afraid of learning how to compile software from source code, but that sort of thing is really not appropriate for even a small data center. I don’t mind doing it once in a while, as in, for my own personal Linux station. There’s just no way that I’m going to get into that maintenance nightmare for all my servers. So, if you share my opinion, don’t worry. That’s not necessary for MRTG in Ubuntu.
First, we need a web server (you could do this afterward if you rather, but I like having MRTG’s environment ready to go). To the best of my knowledge, the Apache web server is still the go- to web solution for Linux systems. It’s changed quite a bit through the years, but is still more than simple enough for what we need to do. Note: almost everything we’re doing requires SUDO, so I’m assuming you entered sudo- s. If not, you’ll have to prepend sudo to all these commands. Install Apache: This will create the necessary folder structure for the web server. We’ll have MRTG place its generated files in a location that is easy for Apache to serve.
Create that directory: Apache doesn’t need a whole lot of configuration, but we do need to make sure that we can force documents to expire as we need or your updated graphs won’t automatically be shown. The first part of that is to install the necessary Apache module: You’ll be told you need to restart Apache, and you do, but let’s configure the refresh items first.
Use anything you want to edit the following file: /etc/apache. I use nano. nano /etc/apache.
The server I’m building will do nothing except operate MRTG. There are, of course, other options. You could have MRTG run in a webpage alongside others. You could have a central Apache server (or IIS, or anything) that MRTG copies its files to. If that’s your goal, you’ll need to do some independent research to figure out how to set it all up. I’m just going to show you how to have Apache running locally and serving the MRTG folder as its default site.
It should be a good starting point for you if you do want to get fancy. Edit the file this way (5. Virtual. Host *: 8. The Server. Name directive sets the request scheme, hostname and port t$. This is used when creating. URLs. In the context of virtual hosts, the Server.
Name. # specifies what hostname must appear in the request's Host: header to. For the default virtual host (this file) this. For example the. # following line enables the CGI configuration for this host only. This is used when creating # redirection URLs. In the context of virtual hosts, the Server. Name # specifies what hostname must appear in the request's Host: header to # match this virtual host. For the default virtual host (this file) this # value is not decisive as it is used as a last resort host regardless.
For example the # following line enables the CGI configuration for this host only # after it has been globally disabled with . This way, accessing the system on port 8. MRTG front- end. If you want to use a particular host header, you need different < Virtual.
Host> entries. Add the expiration configuration information for the files within this particular virtual host. These were taken directly from the MRTG documentation.
You can start the Apache. Since I’m going to have you do many other things, let’s do it now so that we don’t forget later: Installing MRTG is as simple as installing Apache: You’ll be asked about securing the MRTG configuration file. I’ll leave this up to you. I don’t have any other accounts on my Linux system so its not a big problem for me either way. Also, the configuration file is simple enough to edit that I don’t mind using Nano locally. There are some more involved configuration files that I’m going to show you how to create, but I’m also going to use NPP remotely to do it and security won’t be as important.
So, I say Yes here, but no criticism if you go a different way. If you want to reduce the security problem, only use MRTG with read- only communities: MRTG Config Question. That’s the only question that there is. After answering it, the package will be installed and configured.
Enabling a System to be Metered. I’m started my metering with my lab’s core switch because it’s really easy to configure. It has a web- based configuration tool with an SNMP tab. All I had to do was designate a community string, the access level, and set it to enabled. While every device and operating system is different, this is the general process you’ll find on all systems. Community: The community name, or “community string”, serves two purposes.
It is what the local SNMP “listens” for SNMP requests on and it serves as its own password. The defaults for SNMP communities are often “public” and “private”, with “public” being read- only and “private” being read- write. If a community is set with the string “private” and in read- write mode, any remote system connecting over SNMP that uses this community will be able to read anything exposed by SNMP and change any writable options. That’s potentially dangerous, and SNMP security isn’t especially robust. MRTG doesn’t need access to a read- write community. The best thing to do is create a read- only community that you will only use for MRTG. For the purposes of this post, I am creating one simply named “mrtg” and using that on all systems.
Access level (or “Rights”): As discussed under the Community section, you can choose between Read- Only or Read/Write.