Hello,

I have installed MRTG with SNMP on Trustix Linux to monitor Memory usage, LAN stastics and other. It is working well.

But, I don't know how to create script to monitor HDD usage. Can anyone help me?

Below is sample code from /etc/mrtg/mrtg.conf.

# Example config for running mrtg to keep host-only stats

RunAsDaemon: yes
Interval: 5
HtmlDir: /home/httpd/sites/mrtg/
ImageDir: /home/httpd/sites/mrtg/images/
LogDir: /var/log/mrtg/
XSize[_]: 350
YSize[_]: 80

##############################################

#--------Bandwidth usage----------------------
Title[eth0]: Bandwidth usage on server.example.com
PageTop[eth0]: <H1>Traffic</H1>
Target[eth0]: `ifconfig eth0 | /usr/bin/awk '/bytes/{ gsub(/:/, " "); print $3 "\n" $8}'`
MaxBytes[eth0]: 15000000
Options[eth0]: noinfo, growright, bits
WithPeak[eth0]: wmy

#--------Memory-------------------------------
Title[mem]: Memory stats on server.example.com
PageTop[mem]: <H1>Memory (512MB)</H1>
Target[mem]: `free|awk 'BEGIN {OFS="\n"} /+/{ print $3*1000,$4*1000 }'`
MaxBytes[mem]: 524288000
Options[mem]: noinfo, gauge, growright, integer, absolute
Kilo[mem]: 1024
YLegend[mem]: RAM
ShortLegend[mem]: B
Legend1[mem]: Memory used
Legend2[mem]: Buffers/cache
Legend3[mem]: Memory used max
Legend4[mem]: Buffers/cache max
LegendI[mem]: Memory used
LegendO[mem]: Buffers/cache
WithPeak[mem]: wmy
+++++++++++++++++++++++++++++++++++++==
Jon