Hey guys and welcome back. So now what I want to briefly talk to you about is the concept
of being able to predict future resource needs. Now to begin, one of the first tools
I want to talk to you about is something called collectD. Now what this is, is ultimately
a daemon. And this daemon has the purpose of collecting system statistics. Now the way
collectD actually does this is that it uses something called plugins. And these plugins
actually determine what collectD will actually collect. Now one thing to note about the collectD
is that there are some limitations here. This is not an all purpose tool. For example, the purpose
is really limited to collecting. And I would tell if I could spell that correctly. Collecting data.
That means that it's not going to display the data for you any nice graphical form or anything
like that or analyze the data. Instead collectD is just going to like I say collect that data and
you can then feed that data if you so wish into another program. Now collectD typically is not
installed by default on most Linux systems. So we do actually have to run through the installation.
So what I will say here on my Zubuntu machine, I can just use the app package manager and install
collectD. Just type in my passwords and hit Y and enter. Okay, perfect. So now that we have collectD
installed, let me just clear the screen. One of the things that we want to be aware of for the
purposes of the examination is where we can actually configure the collectD daemon. Now we
are going to be able to do this by modifying a file in a particular location. So let me show you what
this location is. As if I go into the etsy directory and then go into collectD. If I do an ls, we should
now see this collectD.conf file. Okay, so try to remember that path etsy collectD collectD.conf.
If I go in and modify this, let's say nano for example and hit enter. This is the main configuration
file. Now within here, we can do many cool things. We can actually determine how often we should be
able to collect particular data. Say for example here, we can see we have this value here interval
10. This means that every 10 seconds, we will have a new query collecting more data. Now this is the
default value. If we want to happen to change this, we would uncomment this configuration by removing
the what is now called the hashtag and we can see the color changed. If we could change this
interval to maybe say every five seconds or every 15 seconds, however you choose. But for now, I'm
actually not too bothered with this. So I'll just comment this out. So it's inactive and we'll still
have the default of 10. Now if we scroll on down, another really important thing to notice is this
plugin section right here. This is going to allow us to specify which features we actually want to
collect information on. Now if you happen to scroll down, you'll notice that most of these plugins
are commented out. The ones which are actually on by default are the battery, the CPU, the disk,
entropy, interfaces, memory so on so forth. But the vast majority like I say are commented out. But
if we wanted to decide that hey, we actually want to collect information on our network, we could go
to the plugin network and we could just remove the hashtag to uncomment out this configuration.
And this would allow us to activate this configuration. Say for example, I could just save this up and
notice I should have pointed this out. This is a global configuration file within the Etsy directory.
Therefore, I'm going to have to use super user privileges. So I would say sudo nano collectd.conf
and scroll on down. Now I could remove and save the changes. And in order for these changes to
take effect, we would actually have to reload the service. I could say sudo system ctl restart
collectd.service. If I hit enter, that should now reload the service and the new configurations,
i.e. the changes we have just made will take effect. We can actually use collectd to monitor our
network statistics. So really for the purposes of the examination, understand what collectd does
and what it does not do and really try to remember the location of the configuration file and understand
that we have these concepts of plugins. And if we want to activate a particular plugin so that we
can measure a particular resource such as a CPU or what is going on in our network, we can just
simply uncomment that plugin so that it will be active after we reload the configuration file.
Now another thing I want to just briefly touch upon is the subject of monitoring solutions.
There are some solutions we have to have an awareness of, at least at a high level,
for the purposes of the examination. But like I say, this is just a high level topic,
meaning that you don't have to really concern yourself with how to configure these tools
specifically, just more have an awareness of what they actually do. So the first monitoring solution
I want to point out is one called Nagios or Nagios. I've heard it said both ways, I'm not quite sure
the correct way. Now Nagios is ultimately a family of projects. So we could have a Nagios log server
or a Nagios network analyzer or a Nagios incident manager, so on and so forth. Now the cool thing
about Nagios is that it can provide a plugin to interact with collectd. We can actually use
collectd-nagios and that can actually be used to query the collectd
daemon for information. So the information that is collected by collectd, we can feed it into
Nagios and use the Nagios network analyzer to analyze the network traffic or network statistics,
should I say, that we have gathered using collectd. Now another solution we have is one called MRTG.
This is the multi-router traffic grapher and this is really used to monitor network traffic loads.
It basically reads information from your router and your logs and you can actually take this
information and graph it. This can provide a nice visual interpretation of that information
to make it much more digestible for you as a system administrator. Now another one we want to be
aware of is one called cacti. This too, like MRTG, also focuses on network monitoring. Now this tool
is basically a front-end interface for something called RRD tool. Now this stands for the round
robin database tool. So simply put, information collected by the round robin database tool
can be ingested by cacti and cacti will provide to you a nice easy interface so that you can
display information or graph particular data received via this tool. Now the key thing to note
about all of these types of tools is that we can take this information, monitor our data and we can
use that information to observe and use for capacity planning. Say for example you happen to note
on your graph you're having a very large and prolonged spike and maybe say network traffic.
You might think hey but actually getting much more network use maybe it's now time to increase our
bandwidth because if we keep following this trajectory of network use just getting higher and
higher and higher suddenly we're going to get a bottleneck and the users are going to suffer
and we definitely do not want that. So having this type of monitoring information allows us to plan
ahead and we can see trends on the horizon as they're approaching. So really these tools all
together is going to help you identify resource exhaustion and allow you to predict growth and
even diagnose particular problems. If you happen to see a spike in some particular resource, CPU,
maybe it is network traffic, you can then use that information to potentially identify a
particular problem on your network. So the ability to collect data to be able to feed that data into
a tool which can graph that data or analyze that data, this is obviously very valuable for anyone
administering and managing the systems on our network. Now one thing to say about these tools
just as a disclaimer is that there is no way you can get 100 accuracy with these tools. You might
be able to graph a particular trend but there is no way for you to know that that trend is going to
continue. Say for example you've got a nice graph which is showing a very steady rate of growth
over a particular period of time. There is no way for you to know that suddenly you're going to
encounter an abnormal spike. Okay so just be aware that these tools definitely have a use,
they definitely provide valuable information but there are limitations to their abilities.
Okay dogs, I hope this has been informative for you and I'd like to thank you for viewing.