MRTG - Ram , Swap monitoring
Step 1
vi /etc/mrtg/mrtg.cfg
# Memory Monitoring (Total Versus Available Memory)
Target[server.memory]: memAvailReal.0&memTotalReal.0:public@localhost
Title[server.memory]: Free Memory
PageTop[server.memory]: <H1>Free Memory</H1>
MaxBytes[server.memory]: 100000000000
ShortLegend[server.memory]: B
YLegend[server.memory]: Bytes
LegendI[server.memory]: Free
LegendO[server.memory]: Total
Legend1[server.memory]: Free memory, not including swap, in bytes
Legend2[server.memory]: Total memory
Options[server.memory]: gauge,growright,nopercent
kMG[server.memory]: k,M,G
## swap
Target[ramswap]: memAvailSwap.0&memTotalSwap.0:public@localhost
Options[ramswap]: nopercent,growright,gauge,noinfo
Title[ramswap]: SWAP
PageTop[ramswap]: <H1>Swap</H1>
MaxBytes[ramswap]: 1000000000
kMG[ramswap]: k,M,G
Ylegend[ramswap]: Octets
ShortLegend[ramswap]: octets
LegendI[ramswap]: Avail Swap
LegendO[ramswap]: Total Swap
Legend1[ramswap]: Avail Swap
Legend2[ramswap]: Total Swap
### global options
LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt
Refresh: 300
Interval: 5
Language: utf8
Options[_]: growright
First , you need "locate UCD-SNMP-MIB.txt" and modify in global options
indexmaker /etc/mrtg/mrtg.cfg > /var/www/mrtg/index.html
env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
Generate new index page and update mrtg
Server is hosted by Alanstudio
Linux Operating System
Recommend screen resolution 1024 x 768 / IE / FireFox
Alan Studio © 2007 by Alan Cheung Hin Lun. All rights reserved.
|