Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

MRTG and a custom MIB

  • 19-12-2006 12:38am
    #1
    Technology & Internet Moderators Posts: 28,822 Mod ✭✭✭✭


    I'm trying to use MRTG to graph the input voltage to my UPS, using a MIB I downloaded from the APC FTP site. Trawling through the MIB I've determined that the OID I need is 1.3.6.1.4.1.318.1.1.1.3.2.1, but I can't get MRTG to use it. It responds with:
    SNMP Error:
    Received SNMP response with error code
      error status: noSuchName
    
    I'm guessing this is related to the fact that when I use snmpget to try to retrieve the same value, I get:
    # snmpget -v1 -cpublic 10.30.1.250 .1.3.6.1.4.1.318.1.1.1.3.2.1
    Error in packet
    Reason: (noSuchName) There is no such variable name in this MIB.
    Failed object: iso.3.6.1.4.1.318.1.1.1.3.2.1
    
    snmpwalk, on the other hand, works:
    # snmpwalk -v1 -cpublic 10.30.1.250 .1.3.6.1.4.1.318.1.1.1.3.2.1
    iso.3.6.1.4.1.318.1.1.1.3.2.1.0 = Gauge32: 217
    
    I've tried placing the .mib file with the others in /usr/share/snmp/mibs, I've tried various -m and -M parameters to snmpget - any pointers?


Comments

  • Registered Users, Registered Users 2 Posts: 1,064 ✭✭✭Snowbat


    For snmpget and MRTG, you usually need to add an instance number to the end of the OID. This is not required for snmpwalk. For MRTG you'll also need to strip the leading dot.

    Example from http://lists.ee.ethz.ch/mrtg/msg03165.html
    snmpwalk:     .1.3.6.1.2.1.2.2.1.10
    snmpget:      .1.3.6.1.2.1.2.2.1.10.1
    mrtg:         1.3.6.1.2.1.2.2.1.10.1
    
    Try appending .0 or .1 to the OID you used in snmpwalk and see if snmpget picks up anything there.

    (edit: In fact if you look at your snmpwalk return, you'll see a .0 added)


  • Technology & Internet Moderators Posts: 28,822 Mod ✭✭✭✭oscarBravo


    Excellent, that worked - thanks!

    Next question: MRTG is now happily graphing, but it's scaling from 0-216V, which makes fluctuations pretty much invisible at the top of the graph. Can I persuade MRTG to graph from (say) 200-240V?


  • Registered Users, Registered Users 2 Posts: 1,064 ✭✭✭Snowbat


    Good to hear :)

    From what I've googled, a non zero based Y axis is not possible in MRTG. The usual suggested solution for this is RRDtool which can be integrated into MRTG.

    Someone on the MRTG mailing list asked for the very same reason:
    http://lists.ee.ethz.ch/mrtg/msg27919.html


  • Registered Users, Registered Users 2 Posts: 354 ✭✭AndrewMc


    oscarBravo wrote:
    Next question: MRTG is now happily graphing, but it's scaling from 0-216V, which makes fluctuations pretty much invisible at the top of the graph. Can I persuade MRTG to graph from (say) 200-240V?

    Perhaps the "expscale" option would work (from mrtg-reference)
    The expscale option causes rateup to display the data with the Y axis scaled exponentially. Doing so emphasizes small changes at the top of the scale; this can be useful when graphing values that fluctuate by a small amount near the top of the scale, such as line voltage.


  • Technology & Internet Moderators Posts: 28,822 Mod ✭✭✭✭oscarBravo


    Tried expscale, didn't work - could be a version issue? MRTG is 2.9.17 here, can't easily upgrade. It's not the end of the world.


  • Advertisement
Advertisement