LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-09-2011, 02:47 PM   #1
mrm5102
Member
 
Registered: Apr 2011
Location: Philadelphia
Posts: 165

Rep: Reputation: 3
Why OID for SNMP works from CMD Line and NOT From cfg?


Hey All,

I am using MRTG to monitor some 4500 series routers for Traffic, CPU Load, Errors, etc...
Now I am trying to monitor Memory Utilization and am experiencing some problems.

If I run the following snmpget commands from the command line I get back the correct data.
Code:
#The folloing 2 commands returns used memory on the router. First is for processor and Second for I/O.

> snmpget -v1 -c commName 192.168.1.1 1.3.6.1.4.1.9.9.48.1.1.1.5.1
SNMPv2-SMI::enterprises.9.9.48.1.1.1.5.1 = Gauge32: 151235224

> snmpget -v1 -c commName 192.168.1.1 1.3.6.1.4.1.9.9.48.1.1.1.6.1
SNMPv2-SMI::enterprises.9.9.48.1.1.1.6.1 = Gauge32: 344027012
The above is all well and good but the following cfg file for MRTG is NOT working and it's driving me nuts because it's not returning any data to RRD??

cfg File:
Code:
Target[Memory-use]: 1.3.6.1.4.1.9.9.48.1.1.1.5.1&1.3.6.1.4.1.9.9.48.1.1.1.5.1:commName@192.168.1.1
Title[Memory-use]: Memory-Usage USED on 192.168.1.1
LegendI[Memory-use]: Used
Legend1[Memory-use]: Total-RAM
MaxBytes[Memory-use]: 536870912
UnScaled[Memory-use]: ymwd
YLegend[Memory-use]: Total Ram
ShortLegend[Memory-use]: bytes
routers.cgi*Options[Memory-use]: gauge, growright, nototal, noo
routers.cgi*GraphStyle[Memory-use]: stack
PageTop[Memory-use]: <h1>192.168.1.1 Memory-Usage TOTAL</h1>
If anyone can see why this isn't working please let me know... Any suggestion would be great!

Thanks in Advance,
Matt
 
Old 11-11-2011, 06:51 AM   #2
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
I can't read the code in the second code window. Most important, the error message is missing. Can you check and repost?

jlinkels
 
Old 11-11-2011, 08:15 AM   #3
mrm5102
Member
 
Registered: Apr 2011
Location: Philadelphia
Posts: 165

Original Poster
Rep: Reputation: 3
jlinkels, thanks for the reply.

That's weird I can see it, hummm.....

Ok here's the cfg file that was in that second "code" window:
_________________________________________________________________________________________________
Target[Memory-use]: 1.3.6.1.4.1.9.9.48.1.1.1.5.1&1.3.6.1.4.1.9.9.48.1.1.1.5.1:commName@192.168.1.1
Title[Memory-use]: Memory-Usage USED on 192.168.1.1
LegendI[Memory-use]: Used
Legend1[Memory-use]: Total-RAM
MaxBytes[Memory-use]: 536870912
UnScaled[Memory-use]: ymwd
YLegend[Memory-use]: Total Ram
ShortLegend[Memory-use]: bytes
routers.cgi*Options[Memory-use]: gauge, growright, nototal, noo
routers.cgi*GraphStyle[Memory-use]: stack
PageTop[Memory-use]: <h1>192.168.1.1 Memory-Usage TOTAL</h1>
_________________________________________________________________________________________________

Not sure what error message you mean. But as far as I know I don't get any errors. If I run "mrtg check" I get back "Configs OK. No Errors Found..."


Thanks,
Matt
 
Old 11-11-2011, 08:45 AM   #4
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
I expected to see some SNMP related error message.

I am familiar with SNMP, not so much with MRTG. But I see you ask for the same OID twice:
1.3.6.1.4.1.9.9.48.1.1.1.5.1&1.3.6.1.4.1.9.9.48.1.1.1.5.1 while I somehow expect that you ask for both used and total memory, like in your snmp example. 1.3.6.1.4.1.9.9.48.1.1.1.6.1

Maybe MRTG keeps on waiting indefinitely on one of those values?

If not, sorry I am out.

jlinkels
 
Old 11-11-2011, 03:29 PM   #5
mrm5102
Member
 
Registered: Apr 2011
Location: Philadelphia
Posts: 165

Original Poster
Rep: Reputation: 3
Sorry it's there twice because MRTG has to take a minimum of 2 OIDs, basically one for IN and one for OUT (doesn't have to be exactly In/Out). So when you want just one value you enter it twice then suppress the output of the Out variable.

But don't worry about this I'll figure it out eventually.

Thanks for your replies.


Thanks,
Matt
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to associate SNMP OID with specific parameter under SNMP agent? m4rtin Linux - Server 1 09-16-2011 09:04 AM
snmp RAID OID hostatonce Linux - Software 0 10-28-2007 10:53 AM
How to override one OID in SNMP? clacour Linux - General 1 07-28-2007 02:22 PM
SNMP OID for slackware linux coolrock Slackware 2 09-27-2006 03:23 AM
snmp set my oid alaios Linux - Networking 2 06-02-2005 10:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration