[SERVER-10932] In enterprise edition need an option to specify location/config file for SNMP Created: 26/Sep/13  Updated: 18/Mar/16  Resolved: 18/Mar/16

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 2.5.3
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Sridhar Nanjundeswaran Assignee: Andrew Morrow (Inactive)
Resolution: Done Votes: 0
Labels: 26qa, snmp
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

mongod enterprise edition on Windows 7 x64


Issue Links:
Related
related to SERVER-10934 Need to change default search path fo... Closed
related to SERVER-13004 Enterprise SNMP config file setup on ... Backlog
Sprint: Platforms 12 (04/01/16)
Participants:

 Description   

Currently when --snmp-master is specified mongod looks for the config in %HOMEPATH%\.snmp. We should allow the user to specify a path to the config file.
When mongod is installed as a service you are usually running it as Network Service. In that case the %HOMEPATH%\.snmp is not pointing to what was installed by the user. It would be easier to specify this as part of the command line



 Comments   
Comment by James Wahlin [ 18/Mar/16 ]

I believe this ticket can be closed. %HOMEPATH%/.snmp is one of the places Net-SNMP will look for a configuration file, but it is not first in the search path. Additionally, the search path can be overridden with an environment variable.

As per the Net-SNMP config docs :

By default, the applications look for configuration files in the following 4 directories, in order: /usr/local/etc/snmp, /usr/local/share/snmp, /usr/local/lib/snmp, and $HOME/.snmp. In each of these directories, it looks for files with the extension of both conf and local.conf (reading the second ones last). In this manner, there are 8 default places a configuration file can exist for any given configuration file type.

Additionally, the above default search path can be overridden by setting the environment variable SNMPCONFPATH to a colon-separated list of directories to search for. The path for the persistent data should be included when running applications that use persistent storage, such as snmpd.

For Windows, the above should all apply, with the drive defaulting to current drive. The Net-SNMP Windows readme states that setting of the SNMPCONFPATH is the preferred means for setting path to the config, when running as a Windows service.

Comment by Eliot Horowitz (Inactive) [ 27/Sep/13 ]

Running as a master is generally not a good production config

Generated at Thu Feb 08 03:24:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.