Windows-MRTG-disk
From Secret Wiki
[edit]
Rought notes while playing with disk space
- Install SNMP-Informant link (http://www.snmp-informant.com/)
- install getIf link (http://www.wtcs.org/snmp4tpc/getif.htm)
- run diskperf -vf (reboot)
- add mibs to the getIf mibs folder (add .txt) including HOST-RESOURCES-
MIB
[edit]
Configuration Research
You will need to check on a partition by partition basis, what the allocation units are. Use this OID in getIf to find out
.1.3.6.1.2.1.25.2.3.1.4
Usefull Values (OID Values)
C: Drive
.1.3.6.1.2.1.25.2.3.1.5.2 = Size of disk using mib2 host in allocation units (std mib) .1.3.6.1.2.1.25.2.3.1.6.2 = Amount of disk space used using host mib2 (std mib)
D: Drive
.1.3.6.1.2.1.25.2.3.1.5.3 = Size of disk using mib2 host in allocation units (std mib) .1.3.6.1.2.1.25.2.3.1.6.3 = Amount of disk space used using host mib2 (std mib)
E: Drive
.1.3.6.1.2.1.25.2.3.1.5.4 = Size of disk using mib2 host in allocation units (std mib) .1.3.6.1.2.1.25.2.3.1.6.4 = Amount of disk space used using host mib2 (std mib)
Memory
.1.3.6.1.2.1.25.2.2.0 = Size of physical memory using mib2 host (std mib) .1.3.6.1.4.1.9600.1.1.2.2.0 = Amount of remaining physical memory (SNMP Informant Mib)
Sample Code +++++++++++++++++
###################################################################### # Multi Router Traffic Grapher -- SERVERNAME_ Configuration File ###################################################################### ###################################################################### # ABs Template File # # Use this as a template. Search and replace SERVERNAME_ with the server # name (or however you want to refer to it) # # Then search and replace the IP address (thats part of the OID lines) # # Finally check disk allocation units are correct using getIf and looking # for this OID .1.3.6.1.2.1.25.2.3.1.4 (hrStorageAllocationUnits) # ###################################################################### # Now to set some directory paths, make sure you create them before use # HtmlDir: /var/www/mrtg/company/servername_ ImageDir: /var/www/mrtg/company/servername LogDir: /var/www/mrtg/company/servername-log ThreshDir: /var/www/mrtg/company/servername-var # Set some global values (anything with [_] is global but can be overiden later) # I like large graphs :-) # XSize[_]: 600 YSize[_]: 150 # Right on with the configuration then (comment out Proc and CPU sections if you # havent installed SNMP-Informant on the target ############################################################################### # C Drive Graphs # # .1.3.6.1.2.1.25.2.3.1.5.2 = Size of disk using mib2 host in allocation units # .1.3.6.1.2.1.25.2.3.1.6.2 = Amount of disk space used using host mib2 # ################################################################################ Target[SERVERNAME__C]: .1.3.6.1.2.1.25.2.3.1.5.2&.1.3.6.1.2.1.25.2.3.1.6.2:b4it-pub@1.2.3.4 MaxBytes[SERVERNAME__C]: 100000000 Factor[SERVERNAME__C]: .000512 YTicsFactor[SERVERNAME__C]: .000512 Options[SERVERNAME__C]: pngdate, gauge, nopercent, unknaszero, kMG[SERVERNAME__C]: M,G Legend1[SERVERNAME__C]: Partition Size Legend2[SERVERNAME__C]: Partition Used Legend3[SERVERNAME__C]: Legend4[SERVERNAME__C]: LegendI[SERVERNAME__C]: Partition Size LegendO[SERVERNAME__C]: Partition Used Ylegend[SERVERNAME__C]: Disk Utilisation C: Colours[SERVERNAME__C]: ORANGE#FFCC00,RED#FF0000,GRAY#AAAAAA,VIOLET#FF00FF PNGTitle[SERVERNAME__C]: SERVERNAME_ Disk Uilisation C: Drive (OS) Title[SERVERNAME__C]: SERVERNAME_ - Drive Utilisation for Drive C: (OS) PageTop[SERVERNAME__C]: <H1>SERVERNAME_ - Drive Utilisation for Drive C: (OS)</h1> <BR></H1> <TABLE> <TR><TD>System: SERVERNAME_</TD></TR> <TR><TD>Maintainer: Company Name</TD></TR> </TABLE> ############################################################################### # D Drive Graphs # # .1.3.6.1.2.1.25.2.3.1.5.3 = Size of disk using mib2 host in allocation units # .1.3.6.1.2.1.25.2.3.1.6.3 = Amount of disk space used using host mib2 # ################################################################################ Target[SERVERNAME__D]: .1.3.6.1.2.1.25.2.3.1.5.3&.1.3.6.1.2.1.25.2.3.1.6.3:b4it-pub@1.2.3.4 MaxBytes[SERVERNAME__D]: 100000000 Factor[SERVERNAME__D]: .004096 YTicsFactor[SERVERNAME__D]: .004096 Options[SERVERNAME__D]: pngdate, gauge, nopercent, unknaszero, kMG[SERVERNAME__D]: M,G Legend1[SERVERNAME__D]: Partition Size Legend2[SERVERNAME__D]: Partition Used Legend3[SERVERNAME__D]: Legend4[SERVERNAME__D]: LegendI[SERVERNAME__D]: Partition Size LegendO[SERVERNAME__D]: Partition Used Ylegend[SERVERNAME__D]: Disk Utilisation D: Colours[SERVERNAME__D]: ORANGE#FFCC00,RED#FF0000,GRAY#AAAAAA,VIOLET#FF00FF PNGTitle[SERVERNAME__D]: SERVERNAME_ - Drive Utilisation D: Drive (LOGS) Title[SERVERNAME__D]: SERVERNAME_ - Disk Utilisation for Drive D: (LOGS) PageTop[SERVERNAME__D]: <H1>SERVERNAME_ - Disk Utilisation for Drive D: (LOGS)</h1> <BR></H1> <TABLE> <TR><TD>System: SERVERNAME_</TD></TR> <TR><TD>Maintainer: Company Name</TD></TR> </TABLE> ############################################################################### # E Drive Graphs # # .1.3.6.1.2.1.25.2.3.1.5.4 = Size of disk using mib2 host in allocation units # .1.3.6.1.2.1.25.2.3.1.6.4 = Amount of disk space used using host mib2 # ################################################################################ Target[SERVERNAME__E]: .1.3.6.1.2.1.25.2.3.1.5.4&.1.3.6.1.2.1.25.2.3.1.6.4:b4it-pub@1.2.3.4 MaxBytes[SERVERNAME__E]: 100000000 Factor[SERVERNAME__E]: .004096 YTicsFactor[SERVERNAME__E]: .004096 Options[SERVERNAME__E]: pngdate, gauge, nopercent, unknaszero, kMG[SERVERNAME__E]: M,G Legend1[SERVERNAME__E]: Partition Size Legend2[SERVERNAME__E]: Partition Used Legend3[SERVERNAME__E]: Legend4[SERVERNAME__E]: LegendI[SERVERNAME__E]: Partition Size LegendO[SERVERNAME__E]: Partition Used Ylegend[SERVERNAME__E]: Disk Utilisation E: Colours[SERVERNAME__E]: ORANGE#FFCC00,RED#FF0000,GRAY#AAAAAA,VIOLET#FF00FF PNGTitle[SERVERNAME__E]: SERVERNAME_ - Drive Utilisation Drive E: (EXCHANGE) Title[SERVERNAME__E]: SERVERNAME_ - Drive Utilisation Drive E: (EXCHANGE) PageTop[SERVERNAME__E]: <H1>SERVERNAME_ - Drive Utilisation Drive E: (EXCHANGE)</h1> <BR></H1> <TABLE> <TR><TD>System: SERVERNAME_</TD></TR> <TR><TD>Maintainer: Company Name</TD></TR> </TABLE> ############################################################################### # F Drive Graphs # # .1.3.6.1.2.1.25.2.3.1.5.5 = Size of disk using mib2 host in allocation units # .1.3.6.1.2.1.25.2.3.1.6.5 = Amount of disk space used using host mib2 # ################################################################################ Target[SERVERNAME_F]: .1.3.6.1.2.1.25.2.3.1.5.5&.1.3.6.1.2.1.25.2.3.1.6.5:b4it-pub@1.2.3.4 MaxBytes[SERVERNAME_F]: 100000000 Factor[SERVERNAME_F]: .004096 YTicsFactor[SERVERNAME_F]: .004096 Options[SERVERNAME_F]: pngdate, gauge, nopercent kMG[SERVERNAME_F]: M,G Legend1[SERVERNAME_F]: Partition Size Legend2[SERVERNAME_F]: Partition Used Legend3[SERVERNAME_F]: Legend4[SERVERNAME_F]: LegendI[SERVERNAME_F]: Partition Size LegendO[SERVERNAME_F]: Partition Used Ylegend[SERVERNAME_F]: Disk Utilisation F: Colours[SERVERNAME_F]: ORANGE#FFCC00,RED#FF0000,GRAY#AAAAAA,VIOLET#FF00FF PNGTitle[SERVERNAME_F]: servername - Drive Utilisation Drive F: (SHARED) Title[SERVERNAME_F]: servername - Drive Utilisation Drive F: (SHARED) PageTop[SERVERNAME_F]: <H1>servername - Drive Utilisation Drive F: (SHARED)</h1> <BR></H1> <TABLE> <TR><TD>System: servername</TD></TR> <TR><TD>Maintainer: Company Name</TD></TR> </TABLE> ################################################################################ # G Drive Graphs # # .1.3.6.1.2.1.25.2.3.1.5.6 = Size of disk using mib2 host in allocation units # .1.3.6.1.2.1.25.2.3.1.6.6 = Amount of disk space used using host mib2 # ################################################################################ #Target[SERVERNAME_G]: .1.3.6.1.2.1.25.2.3.1.5.6&.1.3.6.1.2.1.25.2.3.1.6.6:b4it-pub@1.2.3.4 #MaxBytes[SERVERNAME_G]: 100000000 #Factor[SERVERNAME_G]: .004096 #YTicsFactor[SERVERNAME_G]: .004096 #Options[SERVERNAME_G]: pngdate, gauge, nopercent #kMG[SERVERNAME_G]: M,G #Legend1[SERVERNAME_G]: Partition Size #Legend2[SERVERNAME_G]: Partition Used #Legend3[SERVERNAME_G]: #Legend4[SERVERNAME_G]: #LegendI[SERVERNAME_G]: Partition Size #LegendO[SERVERNAME_G]: Partition Used #Ylegend[SERVERNAME_G]: Disk Utilisation G: #Colours[SERVERNAME_G]: ORANGE#FFCC00,RED#FF0000,GRAY#AAAAAA,VIOLET#FF00FF #PNGTitle[SERVERNAME_G]: servername - Drive Utilisation Drive G: (MACDATA) #Title[SERVERNAME_G]: servername - Drive Utilisation Drive G: (MACDATA) #PageTop[SERVERNAME_G]: <H1>servername - Drive Utilisation Drive G: (MACDATA)</h1> # <BR></H1> # <TABLE> # <TR><TD>System: servername</TD></TR> # <TR><TD>Maintainer: Company Name</TD></TR> # </TABLE> ################################################################################ # H Drive Graphs # # .1.3.6.1.2.1.25.2.3.1.5.7 = Size of disk using mib2 host in allocation units # .1.3.6.1.2.1.25.2.3.1.6.7 = Amount of disk space used using host mib2 # ################################################################################ #Target[SERVERNAME_H]: .1.3.6.1.2.1.25.2.3.1.5.7&.1.3.6.1.2.1.25.2.3.1.6.7:b4it-pub@1.2.3.4 #MaxBytes[SERVERNAME_H]: 100000000 #Factor[SERVERNAME_H]: .004096 #YTicsFactor[SERVERNAME_H]: .004096 #Options[SERVERNAME_H]: pngdate, gauge, nopercent, #kMG[SERVERNAME_H]: M,G #Legend1[SERVERNAME_H]: Partition Size #Legend2[SERVERNAME_H]: Partition Used #Legend3[SERVERNAME_H]: #Legend4[SERVERNAME_H]: #LegendI[SERVERNAME_H]: Partition Size #LegendO[SERVERNAME_H]: Partition Used #Ylegend[SERVERNAME_H]: Disk Utilisation H: #Colours[SERVERNAME_H]: ORANGE#FFCC00,RED#FF0000,GRAY#AAAAAA,VIOLET#FF00FF #PNGTitle[SERVERNAME_H]: servername - Drive Utilisation Drive H: (OLDPROFILES) #Title[SERVERNAME_H]: servername - Drive Utilisation Drive H: (OLDPROFILES) #PageTop[SERVERNAME_H]: <H1>servername - Drive Utilisation Drive H: (OLDPROFILES)</h1> # <BR></H1> # <TABLE> # <TR><TD>System: servername</TD></TR> # <TR><TD>Maintainer: Company Name</TD></TR> # </TABLE> ############################################################################### # CPU Graphs (Uses SNMP-Informant) # # .1.3.6.1.4.1.9600.1.1.5.1.5.6.95.84.111.116.97.108 = SNMP-Informant CPU # ############################################################################### Target[SERVERNAME__CPU]: .1.3.6.1.4.1.9600.1.1.5.1.5.6.95.84.111.116.97.108&.1.3.6.1.4.1.9600.1.1.5.1.5.6.95.84.111.116.97.108:b4it-pub@1.2.3.4 MaxBytes[SERVERNAME__CPU]: 100 Options[SERVERNAME__CPU]: pngdate, gauge, nopercent, unknaszero, Legend1[SERVERNAME__CPU]: CPU Util Legend2[SERVERNAME__CPU]: . LegendI[SERVERNAME__CPU]: Utilisation LegendO[SERVERNAME__CPU]: Ylegend[SERVERNAME__CPU]: CPU % ShortLegend[SERVERNAME__CPU]: % Unscaled[SERVERNAME__CPU]: dwmy PNGTitle[SERVERNAME__CPU]: SERVERNAME_ CPU Util (V0) Colours[SERVERNAME__CPU]: PINK#FF9999,RED#FF0000,GRAY#AAAAAA,VIOLET#FF00FF Title[SERVERNAME__CPU]: SERVERNAME_ - CPU Utilisation % PageTop[SERVERNAME__CPU]: <H1>SERVERNAME_ - CPU Utilisation</h1> <BR></H1> <TABLE> <TR><TD>System: SERVERNAME_</TD></TR> <TR><TD>Maintainer: Company Name</TD></TR> </TABLE> ############################################################################### # Memory Graphs (Uses SNMP-Informant) # # .1.3.6.1.2.1.25.2.2.0 = Size of physical memory using mib2 host # .1.3.6.1.4.1.9600.1.1.2.2.0 = Amount of remaining physical memory using SNMP Informant Standard Version # ############################################################################### Target[SERVERNAME__MEM]: .1.3.6.1.2.1.25.2.2.0&.1.3.6.1.4.1.9600.1.1.2.2.0:b4it-pub@1.2.3.4 MaxBytes[SERVERNAME__MEM]: 1200000000 Factor[SERVERNAME__MEM]: .001 YTicsFactor[SERVERNAME__MEM]: .001 kMG[SERVERNAME__MEM]: M,G Options[SERVERNAME__MEM]: gauge, nopercent ShortLegend[SERVERNAME__MEM]: b ram YLegend[SERVERNAME__MEM]: Physical Ram Legend1[SERVERNAME__MEM]: Total Memory Legend2[SERVERNAME__MEM]: Available Memory Legend3[SERVERNAME__MEM]: . Legend4[SERVERNAME__MEM]: . LegendI[SERVERNAME__MEM]: Total Memory: LegendO[SERVERNAME__MEM]: Available Memory: Colours[SERVERNAME__MEM]: LIGHTBLUE#9999FF,BLUE#0000FF,GRAY#AAAAAA,VIOLET#FF00FF Title[SERVERNAME__MEM]: SERVERNAME_ - Physical Memory Utilization PageTop[SERVERNAME__MEM]: <H1>SERVERNAME_ - Physical Memory Utilization</h1> <BR></H1> <TABLE> <TR><TD>System: SERVERNAME_</TD></TR> <TR><TD>Maintainer: Company Name</TD></TR> </TABLE>
++++++++++++++++++++++
==========================
출처< http://www.adrianbradshaw.co.uk/secretwiki/index.php/Windows-MRTG-disk >