[mrtg] Problem with mrtg.cfg
Ronald Price
rprice at cs.utah.edu
Tue Mar 12 21:03:25 MET 2002
Hello,
I'm trying to monitor free memory on an alpha runing RedHat 7.1 and I have
installed the basic SNMP package.
The script I wrote doesnt run it gives me this error:
____________________________________________________________________
[root at bovupunda bin]# ./mrtg ../mrtg.cfg
ERROR: Target[mem_free] eval warning: Bareword "ucdavis" not allowed while
"strict subs" in use at (eval 6) line 1.
Bareword "memory" not allowed while "strict subs" in use at (eval 6) line
1.
Bareword "memTotalFree" not allowed while "strict subs" in use at (eval
6) line 1.
Bareword "ucdavis" not allowed while "strict subs" in use at (eval 6) line
1.
Bareword "memory" not allowed while "strict subs" in use at (eval 6) line
1.
Bareword "memTotalFree" not allowed while "strict subs" in use at (eval
6) line 1.
-----------------------------------------------------------------------
My .cfg:
__________________________________________________________________________________________________
Target[mem_free]: 1.3.6.1.4.1.ucdavis.memory.memTotalFree.0&1.3.6.1.4.1.ucdavis.memory.memTotalFree.0:public at 155.103.16.152
RouterUptime[mem_free]: public at 155.103.16.152
MaxBytes[mem_free]: 100
Title[mem_free]: MEM FREE (swap+real)
PageTop[mem_free]: <H1>TOTAL MEMORY FREE </H1>
Unscaled[mem_free]: ymwd
ShortLegend[mem_free]: %
YLegend[mem_free]: Memory In KB
Legend1[mem_free]: ???
Legend2[mem_free]: TIME
Legend3[mem_free]:
Legend4[mem_free]:
LegendI[mem_free]:
LegendO[mem_free]:
Options[mem_free]: growright,nopercent
---------------------------------------------------------------------------------------------
I was unable to use snmptranslate to give me the number form of the oid.
Here is my try at that:
___________________________________________________________________________________
[rprice at bovupunda ~]$ snmptranslate -On .1.3.6.1.4.1.ucdavis.memory.memTotalFree.0
enterprises.ucdavis.memory.memTotalFree.0
[rprice at bovupunda ~]$ snmpget bovupunda public .1.3.6.1.4.1.ucdavis.memory.memTotalFree.0
enterprises.ucdavis.memory.memTotalFree.0 = 489392
___________________________________________________________________________
So I know I have the right OID I just cant get the number form of it.
I think that is what is giving me all the errors.
Any Ideas?
Thanks,
Ron Price
--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive http://www.ee.ethz.ch/~slist/mrtg
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the mrtg
mailing list