2

I have been working on trying to get a value with a custom MIB through SNMP

This is my custom MIB:

MY-MIB DEFINITIONS ::= BEGIN

IMPORTS
    MODULE-IDENTITY, OBJECT-TYPE, Integer32, enterprises
        FROM SNMPv2-SMI
;

psutest MODULE-IDENTITY
    LAST-UPDATED    "201411250000Z"
    ORGANIZATION    "UW - System"
    CONTACT-INFO    "Bob"
    DESCRIPTION     "MIB for project"

    ::={ enterprises 214}

currentScalar       OBJECT IDENTIFIER ::= { psutest 2}
voltageScalar       OBJECT IDENTIFIER ::= { psutest 3}

currentScalar OBJECT-TYPE
    SYNTAX  Integer32
    MAX-ACCESS  read-only
    STATUS  current
    DESCRIPTION  "A simple object that holds the current current as a simple integer"

    ::= { psutest 2}

voltageScalar OBJECT-TYPE
    SYNTAX  Integer32
    MAX-ACCESS  read-only
    STATUS  current
    DESCRIPTION  "A simple object that holds the current voltage reading as a single integer"

    ::= { psutest 3}

END

Now when I do snmpget -v2c -c public localhost currentScalar.0 it returns MY-MIB::currentScalar.0 = No Such Object available on this agetn at this OID. I've already loaded the MIB by going through the tutorial here on the Net-snmp webiste Looking through this example MIB from microsoft, I feel like I might be doing somethign wrong with the lines:

currentScalar       OBJECT IDENTIFIER ::= { psutest 2}
voltageScalar       OBJECT IDENTIFIER ::= { psutest 3}

My snmpd.conf file is pretty basic:

agentAddress udp:161

view systemonly included .1.3.6.1.2.1.1
view systemonly included .1.3.6.1.2.1.25.1

rocommunity public efault .1.3.6.1
...
some system information stuff and active monitoring I haven't touched 
...

extend .1.3.6.1.4.1.214.2 /home/pi/networking/supply.sh

master agentx

Am I missing an entire object definition or something?

Funkyguy
  • 161

0 Answers0