Find the answer to your Linux question:
Results 1 to 3 of 3
I attempted to get help on this from the Net-SNMP users email list, but received no response. Also, I'm sorry in advance if this should have been posted in a ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2012
    Posts
    3

    Problems with Net-SNMP Passing hrStorageSize


    I attempted to get help on this from the Net-SNMP users email list, but received no response. Also, I'm sorry in advance if this should have been posted in a different section of the forum.

    In order to workaround the issue of Net-SNMP volume data not taking reserved space into account I'm attempting to use a pass in snmpd.conf which will replace hrStorageSize with a calculated number that does take reserved space into account.

    The problem I'm running into is that I get a seg fault upon restarting snmpd when I attempt to setup the pass at hrStorageSize:

    pass .1.3.6.1.2.1.25.2.3.1.5 /root/snmptest.pl

    If I try setting the pass for the entire hrStorage table or specifically for hrStorageSize.index, I am able to successfully start snmpd and also receive proper data when polling.

    pass .1.3.6.1.2.1.25.2.3.1 /root/snmptest.pl
    pass .1.3.6.1.2.1.25.2.3.1.5.32 /root/snmptest.pl

    Unfortunately, this means that I either have to reinvent the wheel and completely rewrite the entire hrStorage table or include every possible index to be passed. I've tried using wildcards as well as the OID Name "HOST-RESOURCES-MIB::hrStorageSize" without success.

    Anyone know as to why this would be failing to pass on hrStorageSize but not the others?

    Thanks in advance,
    Bob

  2. #2
    Linux Engineer
    Join Date
    Apr 2012
    Location
    Virginia, USA
    Posts
    890
    I'm not sure if this is relevant to your problem, as I'm not an expert on SNMP.
    Probing a device: SNMP WALKs

    See the next to last part. Basically, snmp only retrieves what you tell it. By default, there is a MIB that includes certain OIDs. Likely, the value you are looking for isn't included in those default OIDs. try setting -m ALL (I believe, google may correct me) when you run snmpwalk or snmpget.

  3. #3
    Just Joined!
    Join Date
    Jul 2012
    Posts
    3
    Thanks for the post mizzle. Unfortunately, the link you provided really didn't help (mostly stuff I already knew about). On the other hand, you inadvertently helped me solve my problem.

    try setting -m ALL
    Ended up doing a little investigation on snmpd command line options (silly for not checking these before I know)...

    I checked out the log and there was a conflict between registration of the OID in the MIB and in snmpd.conf:

    snmpd -Lo
    duplicate registration: MIB modules host/hr_storage and pass (oid .1.3.6.1.2.1.25.2.3.1.5).

    This gave me something new to google-fu and I discovered what the priority option in the pass is used for. By changing the priority of the pass I am now able to pass on hrStorageSize and successfully test.:

    pass -p 50 .1.3.6.1.2.1.25.2.3.1.5 /root/snmptest.pl

    Now its just a matter of finding the best method to reference the volume name based on the index. I would prefer to not run an snmpget because of added overhead as well as needing to dynamically determine the community string (this will be deployed on a few hundred servers with varying SNMP strings).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •