[SERVER-6324] ServerName incorrect when walking the MIB on Enterprise Build Created: 06/Jul/12  Updated: 11/Jul/16  Resolved: 11/Jul/12

Status: Closed
Project: Core Server
Component/s: Networking
Affects Version/s: 2.0.6
Fix Version/s: 2.2.0-rc0

Type: Bug Priority: Major - P3
Reporter: Mark porter Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu, CentOS, AMI - running MongoDB 2.06 enterprise (reproducible via both simply extracting the binaries not the packaged install).


Participants:

 Description   

Testing with snmpwalk -
-----------------------

$snmpwalk -m MONGO-MIB -v 2c -c mongodb 127.0.0.1:1161 1.3.6.1.4.1.37601
MONGO-MIB::serverName."3001" = STRING: "3001"
MONGO-MIB::sysUpTime."3001" = Timeticks: (931) 0:00:09.31
MONGO-MIB::globalOpInsert."3001".0 = Counter32: 0
MONGO-MIB::globalOpQuery."3001".0 = Counter32: 1
MONGO-MIB::globalOpUpdate."3001".0 = Counter32: 0
MONGO-MIB::globalOpDelete."3001".0 = Counter32: 0
MONGO-MIB::globalOpGetMore."3001".0 = Counter32: 0
MONGO-MIB::memoryResident."3001" = INTEGER: 15 MB
MONGO-MIB::memoryVirtual."3001" = INTEGER: 661 MB
MONGO-MIB::memoryMapped."3001" = INTEGER: 0 MB
MONGO-MIB::memoryMapped."3001" = No more variables left in this MIB View (It is past the end of the MIB tree)
 
 
sysadmin@ubuntu:/data/db/master$ mongo-e --port 3001
MongoDB shell version: 2.0.6
connecting to: 127.0.0.1:3001/test
> db.serverStatus()
{
	"host" : "ubuntu:3001",
 

and using Ubuntu with /etc/mongodb.conf and starting via upstart -

hillickm@dub-10gen-linux-1:/usr/share/snmp/mibs$ snmpwalk -m /usr/share/snmp/mibs/MONGO-MIB.txt -v 2c -c mongodb 127.0.0.1:1161 1.3.6.1.4.1.37601
MONGO-MIB::serverName."27017" = STRING: "27017"
MONGO-MIB::sysUpTime."27017" = Timeticks: (70639) 0:11:46.39
MONGO-MIB::globalOpInsert."27017".0 = Counter32: 0
MONGO-MIB::globalOpQuery."27017".0 = Counter32: 1
MONGO-MIB::globalOpUpdate."27017".0 = Counter32: 0
MONGO-MIB::globalOpDelete."27017".0 = Counter32: 0
MONGO-MIB::globalOpGetMore."27017".0 = Counter32: 0
MONGO-MIB::memoryResident."27017" = INTEGER: 18 MB
MONGO-MIB::memoryVirtual."27017" = INTEGER: 722 MB
MONGO-MIB::memoryMapped."27017" = INTEGER: 0 MB
hillickm@dub-10gen-linux-1:/usr/share/snmp/mibs$ mongoe
MongoDB shell version: 2.0.6
connecting to: test
> db.serverStatus()
{
	"host" : "dub-10gen-linux-1",
	"version" : "2.0.6",
	"process" : "mongod",
 

The serverName value is returning the wrong value (in both instances the port number is returned).


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