[SERVER-12212] Smpwalk does not get all data when the mongod is an SNMP master in a replica set with snmp-subagents Created: 29/Dec/13  Updated: 13/Jan/17  Resolved: 13/Jan/17

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

Type: Bug Priority: Major - P3
Reporter: Jonathan Abrahams Assignee: DO NOT USE - Backlog - Platform Team
Resolution: Won't Fix Votes: 0
Labels: 26qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Discovered in RHEL 6, but seems to be reproducible in other environments.


Issue Links:
Related
Operating System: ALL
Participants:

 Description   

I found problems with running smpwalk when the mongod is an SNMP master in a replica set with 2 other mongod snamp-subagents. It only retrieves part of the MIB per call:

[root@ip-10-235-22-194 ~]# ps -elf | grep mongod
1 R root 25561 1 0 80 0 - 245094 - 14:46 ? 00:00:10 mongod --snmp-master --port 27017 --fork --dbpath /root/mongodb/data/rs-0/ --logpath /root/mongodb/logs/rs-0/mongod.log --smallfiles --nohttpinterface --replSet rs --oplogSize=50 --nojournal
1 S root 25611 1 0 80 0 - 282945 poll_s 14:46 ? 00:00:12 mongod --snmp-subagent --port 27018 --fork --dbpath /root/mongodb/data/rs-1/ --logpath /root/mongodb/logs/rs-1/mongod.log --smallfiles --nohttpinterface --replSet rs --oplogSize=50
1 S root 25659 1 0 80 0 - 236597 poll_s 14:47 ? 00:00:08 mongod --snmp-subagent --port 27019 --fork --dbpath /root/mongodb/data/rs-2/ --logpath /root/mongodb/logs/rs-2/mongod.log --smallfiles --nohttpinterface --replSet rs --oplogSize=50 --nojournal
0 S root 27178 1426 0 80 0 - 25811 pipe_w 15:39 pts/0 00:00:00 grep mongod

[root@ip-10-235-22-194 ~]# snmpwalk -m MONGO-MIB -v 2c -c mongodb localhost:1161 1.3.6.1.4.1.34601
MONGO-MIB::serverName."27017" = STRING: "ip-10-235-22-194:27017"
MONGO-MIB::sysUpTime."27017" = Timeticks: (308167) 0:51:21.67
MONGO-MIB::globalOpInsert."27017" = Counter32: 201
MONGO-MIB::globalOpQuery."27017" = Counter32: 501
MONGO-MIB::globalOpUpdate."27017" = Counter32: 110
MONGO-MIB::globalOpDelete."27017" = Counter32: 100
MONGO-MIB::globalOpGetMore."27017" = Counter32: 1427
MONGO-MIB::globalOpCommand."27017" = Counter32: 3435
MONGO-MIB::replOpInsert."27017" = Counter32: 0
MONGO-MIB::replOpQuery."27017" = Counter32: 0
MONGO-MIB::replOpUpdate."27017" = Counter32: 0
MONGO-MIB::replOpDelete."27017" = Counter32: 0
MONGO-MIB::replOpGetMore."27017" = Counter32: 0
MONGO-MIB::replOpCommand."27017" = Counter32: 0
MONGO-MIB::memoryResident."27017" = INTEGER: 52 MB
MONGO-MIB::memoryVirtual."27017" = INTEGER: 957 MB
...
MONGO-MIB::replSetName."27017" = STRING: "rs"
MONGO-MIB::replSetVersion."27017" = INTEGER: 4
MONGO-MIB::replIsMaster."27017" = INTEGER: 1
MONGO-MIB::replIsSecondary."27017" = INTEGER: 0
MONGO-MIB::replPrimary."27017" = STRING: "ip-10-235-22-194:27017"
MONGO-MIB::replMe."27017" = STRING: "ip-10-235-22-194:27017"
MONGO-MIB::replMe."27017" = No more variables left in this MIB View (It is past the end of the MIB tree)

[root@ip-10-235-22-194 ~]# snmpwalk -m MONGO-MIB -v 2c -c mongodb localhost:1161 1.3.6.1.4.1.34601
MONGO-MIB::serverName."27017" = STRING: "ip-10-235-22-194:27017"
MONGO-MIB::serverName."27018" = STRING: "ip-10-235-22-194:27018"
MONGO-MIB::serverName."27019" = STRING: "ip-10-235-22-194:27019"
MONGO-MIB::sysUpTime."27017" = Timeticks: (313212) 0:52:12.12
MONGO-MIB::sysUpTime."27018" = Timeticks: (309181) 0:51:31.81
MONGO-MIB::sysUpTime."27019" = Timeticks: (307827) 0:51:18.27
MONGO-MIB::globalOpInsert."27017" = Counter32: 201
MONGO-MIB::globalOpInsert."27018" = Counter32: 1
MONGO-MIB::globalOpInsert."27019" = Counter32: 1
...
MONGO-MIB::globalOpCommand."27019" = Counter32: 3199
MONGO-MIB::replOpInsert."27017" = Counter32: 0
MONGO-MIB::replOpInsert."27018" = Counter32: 200
Error in packet.
Reason: (genError) A general failure occured
Failed object: MONGO-MIB::replOpInsert."27018"

[root@ip-10-235-22-194 ~]# snmpwalk -m MONGO-MIB -v 2c -c mongodb localhost:1161 1.3.6.1.4.1.34601
MONGO-MIB::serverName."27017" = STRING: "ip-10-235-22-194:27017"
MONGO-MIB::serverName."27018" = STRING: "ip-10-235-22-194:27018"
MONGO-MIB::serverName."27019" = STRING: "ip-10-235-22-194:27019"
MONGO-MIB::sysUpTime."27017" = Timeticks: (315942) 0:52:39.42
MONGO-MIB::sysUpTime."27018" = Timeticks: (311911) 0:51:59.11
MONGO-MIB::sysUpTime."27019" = Timeticks: (310557) 0:51:45.57
MONGO-MIB::globalOpInsert."27017" = Counter32: 201
...
MONGO-MIB::flushLastMs."27017" = INTEGER: 0
MONGO-MIB::flushLastMs."27018" = INTEGER: 0
MONGO-MIB::flushLastMs."27019" = INTEGER: 0
MONGO-MIB::flushLastDateTime."27017" = STRING: "2013-12-27,20:38:11.0,+0:0"
MONGO-MIB::flushLastDateTime."27018" = STRING: "2013-12-27,20:37:51.0,+0:0"
MONGO-MIB::flushLastDateTime."27019" = STRING: "2013-12-27,20:38:05.0,+0:0"
MONGO-MIB::cursorTotalOpen."27017" = INTEGER: 2
Error in packet.
Reason: (genError) A general failure occured
Failed object: MONGO-MIB::cursorTotalOpen."27017"



 Comments   
Comment by Jonathan Abrahams [ 30/Dec/13 ]

All is fine when the replica set are subagents and using snmpd as master.

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