HardDisk Capacity Monitoring with MRTG

At times, our lack of attention to what is the amount of disk usage is used by our server. Based on experience, a lot of admin Diskspace ignored this problem. Usually the only monitor traffic in and out that could be "captured" through the existing Ethernet. And if you note, actually we really need information about how the rest of our hard disk capacity, or how much is already in use. Monitoring capacity is necessary if we are using the machines we make, requires hard drive capacity is not to run out. For example for a proxy server, database server, and so on.
We could monitor our hard disk capacity, with the entry into our system and enter the command:
# df -k
With results like the following:

But this will be very difficult for ourselves. Well, to facilitate the monitoring of our hard disk capacity, we can use MRTG. To monitor disk capacity by using MRTG, first we must first determine which partition to be monitored. Here, I will monitor / cache and / cache1 which is a place to store the proxy data. After determining where the partitions to be monitored, we enter the parameters in our snmpd.conf. Here I use the FreeBSD OS.
# nano /usr/local/share/snmp/snmpd.conf
Then enter the parameters:
disk /cache1
Then restart the snmp, and enter the following command to see the options that can be used:
#snmpwalk -v1 -c public localhost .1.3.6.1.4.1.2021.9
The result will be like this:

There seemed the parameters that we have put in snmpd.conf (in the yellow box), the writer wants to monitor how much disk capacity that has been used. We already have the required parameters, ie Total Disk Space (red box) and the capacity used terlah (orange box). Here, the author uses 2 (two) pieces of the partition / cache and / cache1. Armed with these parameters, we can create a config file for MRTG.
# for UNIX
WorkDir: /other/www/mrtg
LoadMIBs: /usr/local/share/snmp/mibs/UCD-SNMP-MIB.txt,/usr/local/share/snmp/mibs/TCP-MIB.txt,/usr/local/share/snmp/mibs/HOST-RESOURCES-MIB.txt
AddHead[^]: <style><!-- body { text-align: left; background-color: #FFFFFF; font-size: 10pt; font-family: arial, verdana; } --></style>
EnableIPv6: no
Language: indonesia
######################################################################
# System: MustNofee
# Description: Proxy Server
# Contact: NoFee
# Location:
######################################################################
### Cache Space ###
Title[cache]: /cache Space
MaxBytes[cache]: 22296942
PNGTitle[cache]: /cache
Unscaled[cache]: ymwd
Options[cache]: growright, unknaszero, gauge, nopercent
Target[cache]: dskUsed.2&dskUsed.2:public@localhost:
PageTop[cache]: <H1><B>/Cache used on Proxy</B></H1><br>
YLegend[cache]: Megabyte
LegendI[cache]: /cache :
kmg[cache]: KB,MB,GB
LegendO[cache]:
ShortLegend[cache]:
### Cache1 Space ###
Title[cache1]: /cache1 Space
PNGTitle[cache1]: /cache1
MaxBytes[cache1]: 60931274
Unscaled[cache1]: ymwd
Options[cache1]: growright, unknaszero, gauge, nopercent
Target[cache1]: dskUsed.3&dskUsed.3:public@localhost:
PageTop[cache1]: <H1><B>/Cache1 used on Proxy</B></H1><br>
YLegend[cache1]: Megabyte
LegendI[cache1]: /cache1 :
kmg[cache1]: KB,MB,GB
LegendO[cache1]:
ShortLegend[cache1]:
### Cache Total Space ###
Title[cache2]: Total Proxy Space
PNGTitle[cache2]: Total Proxy Space
MaxBytes[cache2]: 83228216
Unscaled[cache2]: ymwd
Options[cache2]: growright, unknaszero, gauge, nopercent
Target[cache2]: dskUsed.2&dskUsed.2:public@localhost: + dskUsed.3&dskUsed.3:public@localhost:
PageTop[cache2]: <H1><B>Total Cache Space used on Proxy</B></H1><br>
YLegend[cache2]: Megabyte
LegendI[cache2]: Space :
kmg[cache2]: KB,MB,GB
LegendO[cache2]:
ShortLegend[cache2]:
Noteworthy is, this MRTG config file requires mibs files that must be included in it.
Then, we save this file to hdd.cfg, then run MRTG config file with hdd.cfg:
#mrtg hdd.cfg
We can enter into a crontab, so that the command was executed automatically.
The result can be seen as follows:
Total Cache Proxy :

Cache 1 Proxy :

Cache 2 Proxy :

By using this MRTG facility, we will not be any more trouble to monitor the use of hard drives that have been used by our system.
Hopefully useful ...
Add this page to your favorite Social Bookmarking
About You :
38.107.191.85
Browser :
Operating System :
Keep This Site Alive
Your Comment On Tutorial:
- Setting up a basic MikroTik ho...
Can you show me your network topology? More... - Setting up a basic MikroTik ho...
Open winbox, on click on files menu, there you can... More... - Setting up a basic MikroTik ho...
You can try bridging two ethernet, and set hotspot... More... - Setting up a basic MikroTik ho...
how to change the page of hotspot pls held More... - Setting up a basic MikroTik ho...
Thanks very much for this enlightened guide for ne... More...


Comments
RSS feed for comments to this post.