How do I convert megabytes to gigabytes in MRTG?
Posted: Sat Apr 05, 2014 11:47 am
Hey all, I'm just getting started with monitoring hardware resources with MRTG and I've hit a snag with disk space monitoring. I'm monitoring the hard disk space on an HP ProLiant DL360 server and I cant' find an OID for percent disk space used. I tried calculating the percentage used like this:
but that gave me an ugly looking error:
At this time I'm using the storage size OID as my MaxBytes value and using my storage used OID for my graphed value. The only problem with doing it this way is HP's OIDs for storage need to be multiplied by the 4096 value for the allocation units to be accurate. As it is now, my percentage is accurate but my storage values are off:
The C: drive on this server is actually 600 gigabytes. SO, all that to ask if there's a way to calculate a percentage using OIDs so that my displayed values will be correct?
Thanks,
Joe B
Code: Select all
[DSKDictum2]:.1.3.6.1.2.1.25.2.3.1.6.1*100/.1.3.6.1.2.1.25.2.3.1.5.1&1.3.6.1.2.1.25.2.3.1.6.1*100/.1.3.6.1.2.1.25.2.3.1.5.1:[email protected]Code: Select all
root@FreeNag:/usr/home/jobee/Config # /usr/local/bin/mrtg /usr/home/jobee/Config/mrtg_192.168.2.29.cfg
2014-04-05 08:45:50: ERROR: Target[dskdictum2][_IN_] '.1.3.6.1.2.1.25.2.3.1.6.1*100/.1.3.6.1.2.1.25.2.3.1.5.1&1.3.6.1.2.1.25.2.3.1.6.1*100/.1.3.6.1.2.1.25.2.3.1.5. $target->[2]{$mode} ' (warn): Argument "\0^A^C^F^A^B^A^Y^B^C^A^E^A" isn't numeric in division (/) at (eval 25) line 1.
2014-04-05 08:45:50: ERROR: Target[dskdictum2][_OUT_] '.1.3.6.1.2.1.25.2.3.1.6.1*100/.1.3.6.1.2.1.25.2.3.1.5.1&1.3.6.1.2.1.25.2.3.1.6.1*100/.1.3.6.1.2.1.25.2.3.1.5. $target->[2]{$mode} ' (warn): Argument "\0^A^C^F^A^B^A^Y^B^C^A^E^A" isn't numeric in division (/) at (eval 26) line 1.
Use of uninitialized value $inlast in pattern match (m//) at /usr/local/bin/mrtg line 1044.
Use of uninitialized value $outlast in pattern match (m//) at /usr/local/bin/mrtg line 1047.
root@FreeNag:/usr/home/jobee/Config #Code: Select all
Max Average Current
C Drive 146.5 MBytes (100.0%) 64.0 MBytes (43.7%) 58.1 MBytes (39.7%) Thanks,
Joe B