Creating a MIB variable - SNMP

This is a discussion on Creating a MIB variable - SNMP ; Hi all, I'm a new member of this group and I'm pretty new to the MIB world too. I'm learning, but I need to add a variable to an already existent MIB to create a threshold for a trap I ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Creating a MIB variable

  1. Creating a MIB variable

    Hi all,
    I'm a new member of this group and I'm pretty new to the MIB world too.
    I'm learning, but I need to add a variable to an already existent MIB
    to create a threshold for a trap I wrote but I'm obviously doing
    something wrong...

    This is what I did:

    I added to the MIB file the following lines:

    testVar OBJECT-TYPE
    SYNTAX INTEGER (0..30000)
    MAX-ACCESS read-create
    STATUS current
    DESCRIPTION "the description."
    ::= { }

    I need to actually write in this var to set the threshold.

    I tried also MAX-ACCESS read-write and STATUS mandatory but I still
    can't write in it.

    The error I get from the mib browser of the Network Management software
    I use is: Set Failed value = No such error = No such

    I already checked the community string and it has the read-create
    permission and the user that is running (on my machine and on the
    remote machine) is an administrator.

    What am I doing wrong? Am I missing a step?

    Thank you in advance for any help.
    Bye.
    --
    [ITA]mich.


  2. Re: Creating a MIB variable

    [ITA]mich wrote:

    > I added to the MIB file the following lines:
    >
    > testVar OBJECT-TYPE
    > SYNTAX INTEGER (0..30000)
    > MAX-ACCESS read-create
    > STATUS current
    > DESCRIPTION "the description."
    > ::= { }
    >
    > I need to actually write in this var to set the threshold.
    >
    > I tried also MAX-ACCESS read-write and STATUS mandatory but I still
    > can't write in it.
    >
    > The error I get from the mib browser of the Network Management software
    > I use is: Set Failed value = No such error = No such


    The MIB file only contains the specification of the variable, not the
    implementation. So this is just the beginning of the journey. Once you
    have specified the variable, you have to write code to actually implement
    it in an agent. Many toolkits have some sort of a MIB compiler that
    helps to automate some of this, i.e. they create a skeleton for your
    implementation. You have to fill in the missing pieces and add the
    semantics.

    /js

    --
    Juergen Schoenwaelder International University Bremen
    P.O. Box 750 561, 28725 Bremen, Germany

  3. Re: Creating a MIB variable

    Juergen Schoenwaelder wrote:

    > The MIB file only contains the specification of the variable, not the
    > implementation.


    Thank you very much!!!

    I thought something like that... can someone please tell me what to do,
    send me some sort of documentation or at least direct me to a website
    where I can find some instructions?

    Sorry for the insistence but this is really urgent.

    Thank you in advance!!!

    > /js
    > Juergen Schoenwaelder International University Bremen


    Bye.
    --
    [ITA]mich.


  4. Re: Creating a MIB variable

    Well, now that I think about it, the network managing program I'm using
    it HAS a MIB compiler. In fact, in order to import the MIB, it parses
    and compiles the MIB. After that, when I browse the "extended" MIB tree
    I could see the branch and the leaf/leaves I created.
    Actually I try to perform a set from the before-mentioned mib browser.

    Sorry for the double reply, but when I wrote the second message I was
    at home and I couldn't check the program.

    Thans in advance for any help.
    Bye.
    --
    [ITA]mich.


  5. Re: Creating a MIB variable

    [ITA]mich wrote:
    > Well, now that I think about it, the network managing program I'm using
    > it HAS a MIB compiler.


    But you still need to use that MIB compiler to generate a suitable
    skeleton, flesh out this bare template with code to actually do
    the work, and include this code within the agent.

    > In fact, in order to import the MIB, it parses
    > and compiles the MIB. After that, when I browse the "extended" MIB tree
    > I could see the branch and the leaf/leaves I created.


    That's a somewhat different use of a MIB compiler. It sounds as
    if your MIB browser needs to "compile" the MIB file into some internal
    form before working with it - presumably for efficiency (rather than
    parsing the basic MIB file every time).

    That's completely separate from *implementing* this MIB.
    Juergen's quite correct - as far as the agent is concerned,
    the MIB file is more of a design specification for the agent
    implementation. You've still got to actually write the code.


    > ..... can someone please tell me what to do,
    > send me some sort of documentation or at least direct me
    > to a website where I can find some instructions?


    Well, it would be useful if you said what agent you were talking
    to. The procedure for adding new code will be different for
    each vendor's agent.
    If this supports AgentX, then that would give you a bit more
    flexibility - otherwise you really need to talk to the support
    team for whoever's agent you're using.

    Dave

+ Reply to Thread