Menu

#1144 Setting SNMPCONFPATH breaks persistent file

windows
closed
agent (1105)
5
2012-11-08
2004-07-26
vector
No

Relating to 996834, but another similar problem. Net-
SNMP version 5.1.1.

Under Win32 and Cygwin, setting the SNMPCONFPATH
environmental variable causes snmpd to ignore the
contents of the existing persistent storage file
(snmpd.conf) on startup and overwrite it with the
default settings.

This occurs whether using the default persistent storage
parameters or specifying them. It also occurs even
when the persistent directory is in SNMPCONFPATH.

Discussion

  • Wes Hardaker

    Wes Hardaker - 2004-07-27

    Logged In: YES
    user_id=76242

    Set SNMPCONFPATH to include the path to the persistent file, and it will
    work.

    It's not a bug, it's a, um, feature!

    The persitsent file is just another configuration file.

     
  • vector

    vector - 2004-07-27

    Logged In: YES
    user_id=1090113

    um, I tried that (adding persistent dir to SNMPCONFPATH), it
    still doesn't work under Win32 and Cygwin... It fails to read
    the persistent snmpd.conf and stomps over the top of it
    when the agent starts.

     
  • Dave Shield

    Dave Shield - 2004-07-27

    Logged In: YES
    user_id=88893

    How did you specify the SNMPCONFPATH?
    What was the exact setting you used,
    and where was the persistent config file?

     
  • vector

    vector - 2004-07-28

    Logged In: YES
    user_id=1090113

    Under windows:
    set SNMPCONFPATH=c:\usr\share\snmp;c:\usr\snmp\persist

    Under Cygwin:
    export SNMPCONFPATH=/usr/local/share/snmp:/var/net-snmp

    In both cases, the persistent file is in the default
    location and it gets stomped when the agent starts...
    c:\usr\snmp\persist\snmpd.conf
    /var/net-snmp/snmpd.conf

     
  • Dave Shield

    Dave Shield - 2004-08-03

    Logged In: YES
    user_id=88893

    My immediate reaction is to wonder whether the agent
    is interpreting this path correctly.

    Can you try running
    snmpd -Dread-config ....

    and look at what config files it attempts to read.

     
  • Alex Burger

    Alex Burger - 2004-08-16

    Logged In: YES
    user_id=85836

    Under Windows you should be using forward slashes in all
    configuration files and environment variables. Try:

    set SNMPCONFPATH=c:/usr/share/snmp;c:/usr/snmp/persist

     
  • vector

    vector - 2004-08-20

    Logged In: YES
    user_id=1090113

    I appreciate the suggestions. I had finished the evaluation
    step of the project and am convinced we want to use Net-
    SNMP. I'm on another project at the moment. I'll have to
    give these a try. Have any of you had a chance to verify
    that it works correctly under Win32 and Cygwin using the
    suggested solutions?

    Thanks again

     

Log in to post a comment.

MongoDB Logo MongoDB