[mrtg] Monitoring Windows disk free space and named OID's
Stuart Kendrick
skendric at fhcrc.org
Tue Mar 20 15:22:03 CET 2007
hi amos,
you have some other sort of syntax error in your config file ... i
predict that even if you replace hrStorage.1 with the OID, you would see
a similar error message. if you would like further assistance, i
propose that you post some portion of your config file
here's a snippet from my config file, monitoring hrStorage on a box
###### Global Defaults ######
Refresh: 600
IconDir: /mrtg/icons
RunAsDaemon: Yes
Interval: 5
Kilo[_]: 1024
kMG[_]: ,,
Options[_]: growright, nopercent, unknaszero
LogFormat: rrdtool
LibAdd: /opt/local/rrdtool/lib/perl
PathAdd: /opt/local/bin
WithPeak[_]: dwmy
WorkDir: /home/netops/var/mrtg/hosts
#### Disk Utilization ####
#Target[desslok_hrStorageDisk.3]:hrStorageUsed.3&ifIndex.1:public at desslok
Target[desslok_hrStorageDisk.3]:.1.3.6.1.2.1.25.2.3.1.6.3&.1.3.6.1.2.1.2.2.1.1.1
:public at desslok / 1073741824
MaxBytes[desslok_hrStorageDisk.3]:63
Options[desslok_hrStorageDisk.3]:gauge
Title[desslok_hrStorageDisk.3]:desslok Gigabytes Used on /
PageTop[desslok_hrStorageDisk.3]:<H1>desslok Gigabytes Used on /<H1>
YLegend[desslok_hrStorageDisk.3]:Gigabytes
ShortLegend[desslok_hrStorageDisk.3]:
Unscaled[desslok_hrStorageDisk.3]:n
Legend1[desslok_hrStorageDisk.3]:GB Used
Legend2[desslok_hrStorageDisk.3]:
Legend3[desslok_hrStorageDisk.3]:Peak GB Used
Legend4[desslok_hrStorageDisk.3]:
LegendI[desslok_hrStorageDisk.3]:Avail
LegendO[desslok_hrStorageDisk.3]:
Colours[desslok_hrStorageDisk.3]:GREEN#00eb0c,BLUE#0000ff,GRAY#AAAAAA,VIOLET#ff00ff
that being said, i've had trouble persuading MRTG to use Object Values
(i.e. hrStorage) as opposed to OIDs (the string of numbers). one has to
list all the MIB files, with their dependencies, on the LoadMIBs: line,
and figuring all that out has defeated me on several occasions
so my approach is to include a commented out Target line showing the
Object Values ... and then the real Target line employing OIDs
here's how i translate Object Values into OIDs:
desslok% snmptranslate -On -IR hrStorage.3
desslok% .1.3.6.1.2.1.25.2.3.1.6.3
hth,
--sk
stuart kendrick
fhcrc
Amos Shapira wrote:
> Hello,
>
> I'm trying to monitor free disk space on Windows partitions using MRTG
> 2.14.7 on Debian Etch (using the Debian package) and so far failed to
> make MRTG recognize the named OID.
>
> I configured the target as:
>
> hrStorageSize.1:community at IP - hrStorageUsed.1:community at IP
>
> And added the MIB to the "search path" using:
>
> LoadMIBs: /usr/share/snmp/mibs/HOST-RESOURCES-MIB.txt
>
> but get the following error:
>
> 2007-03-20 18:17:16: ERROR: Target[IP_drivec][_OUT_] 'hrStorageSize.
> $target->[8]{$mode} - hrStorageUsed. $target->[8]{$mode} ' (eval):
> Bareword "hrStorageSize" not allowed while "strict subs" in use at (eval
> 33) line 1.
> Bareword "hrStorageUsed" not allowed while "strict subs" in use at (eval
> 33) line 1.
>
> From digging the net it looks like there are many questions about this
> from others in similar situation - i.e. followed the fine documentation
> but still don't get the named OID's to work, and there are no working
> replies to be found anywere on the net.
>
> So - is this possible or do I HAVE to give up on named OID's and try to
> find the numerical ones?
>
> Thanks,
>
> --Amos
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> mrtg mailing list
> mrtg at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/mrtg
More information about the mrtg
mailing list