The config files for snmp support on windows need a fair bit of setup compared to linux. And while it's possible to get everything working on windows, the workaround make it obvious how non-idiomatically we've built the support. Do we want to update the existing docs, or try a little harder in the installer to make support more out of the box?
Steps needed to get snmp up for windows:
- copy mongod.conf.master/subagent to c:\snmp\etc\config. (not clear to me why this is the recommended path. We neither create it in the installer or provide any special lookup for it there)
- add an environment variable SNMPCONFPATH=c:\snmp\etc\config
- for the subagent, comment the use of a unix domain socket for subagent reporting and uncomment a tcp socket line.
By default, mongod looks for mongod.conf in a handful of paths, none of which exists: c:/snmp/etc/snmp;c:/snmp/share/snmp (note the reversed slashes). It seems like we could look for a config in our own install path "c:\Program Files\MongoDB Enterprise 2.6.0", or provide a command line switch to point to a file. We could also ship with a subagent config that works out of the box.
Either way, setting an environment variable for a library that we're completely wrapping to locate a config which doesn't immediately work seems impolite when we could technically just fix our installer.
- is related to
-
SERVER-10932 In enterprise edition need an option to specify location/config file for SNMP
- Closed
-
SERVER-11944 Set SNMPCONFPATH to install directory when installing using MSI
- Closed