[SERVER-48567] Warnings while processing snmpwalk Created: 03/Jun/20  Updated: 29/Oct/23  Resolved: 13/Nov/20

Status: Closed
Project: Core Server
Component/s: Admin, Diagnostics
Affects Version/s: None
Fix Version/s: 4.9.0, 4.2.15, 4.4.7

Type: Bug Priority: Major - P3
Reporter: Spencer Jackson Assignee: Mark Benvenuto
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4, v4.2
Sprint: Security 2020-06-29, Security 2020-09-07, Security 2020-11-16
Participants:
Case:

 Description   

When running the server in SNMP master mode, I performed an SNMP walk with the following command:

snmpwalk -m docs/MONGODBINC-MIB.txt -v 2c -c mongodb 127.0.0.1:1161 1.3.6.1.4.1.34601

This produced the following set of warnings in the server logs which included the following:

{"t":{"$date":"2020-06-03T11:01:39.471-04:00"},"s":"W",  "c":"NETWORK",  "id":24005,   "ctx":"SnmpAgent","m
sg":"exception on retrieval of {oidManager_var_name}: {e_what}","attr":{"oidManager_var_name":".1.3.6.1.4.1.34601.1.1.1.2.1.3.1.1.5.50.55.48.49.55","e_what":"wrong type for field (insert) long != int"}}            
{"t":{"$date":"2020-06-03T11:01:39.475-04:00"},"s":"W",  "c":"NETWORK",  "id":24005,   "ctx":"SnmpAgent","msg":"exception on retrieval of {oidManager_var_name}: {e_what}","attr":{"oidManager_var_name":".1.3.6.1.4.1
.34601.1.1.1.2.1.3.1.2.5.50.55.48.49.55","e_what":"wrong type for field (query) long != int"}}             {"t":{"$date":"2020-06-03T11:01:39.478-04:00"},"s":"W",  "c":"NETWORK",  "id":24005,   "ctx":"SnmpAgent","m
sg":"exception on retrieval of {oidManager_var_name}: {e_what}","attr":{"oidManager_var_name":".1.3.6.1.4.1.34601.1.1.1.2.1.3.1.3.5.50.55.48.49.55","e_what":"wrong type for field (update) long != int"}}
{"t":{"$date":"2020-06-03T11:01:39.482-04:00"},"s":"W",  "c":"NETWORK",  "id":24005,   "ctx":"SnmpAgent","msg":"exception on retrieval of {oidManager_var_name}: {e_what}","attr":{"oidManager_var_name":".1.3.6.1.4.1
.34601.1.1.1.2.1.3.1.4.5.50.55.48.49.55","e_what":"wrong type for field (delete) long != int"}}            
{"t":{"$date":"2020-06-03T11:01:39.486-04:00"},"s":"W",  "c":"NETWORK",  "id":24005,   "ctx":"SnmpAgent","m
sg":"exception on retrieval of {oidManager_var_name}: {e_what}","attr":{"oidManager_var_name":".1.3.6.1.4.1
.34601.1.1.1.2.1.3.1.5.5.50.55.48.49.55","e_what":"wrong type for field (getmore) long != int"}}
{"t":{"$date":"2020-06-03T11:01:39.489-04:00"},"s":"W",  "c":"NETWORK",  "id":24005,   "ctx":"SnmpAgent","m
sg":"exception on retrieval of {oidManager_var_name}: {e_what}","attr":{"oidManager_var_name":".1.3.6.1.4.1
.34601.1.1.1.2.1.3.1.6.5.50.55.48.49.55","e_what":"wrong type for field (command) long != int"}}
{"t":{"$date":"2020-06-03T11:01:39.493-04:00"},"s":"W",  "c":"NETWORK",  "id":24005,   "ctx":"SnmpAgent","m
sg":"exception on retrieval of {oidManager_var_name}: {e_what}","attr":{"oidManager_var_name":".1.3.6.1.4.1
.34601.1.1.1.2.1.3.2.1.5.50.55.48.49.55","e_what":"wrong type for field (insert) long != int"}}
{"t":{"$date":"2020-06-03T11:01:39.497-04:00"},"s":"W",  "c":"NETWORK",  "id":24005,   "ctx":"SnmpAgent","m
sg":"exception on retrieval of {oidManager_var_name}: {e_what}","attr":{"oidManager_var_name":".1.3.6.1.4.1
.34601.1.1.1.2.1.3.2.2.5.50.55.48.49.55","e_what":"wrong type for field (query) long != int"}}
{"t":{"$date":"2020-06-03T11:01:39.501-04:00"},"s":"W",  "c":"NETWORK",  "id":24005,   "ctx":"SnmpAgent","m
sg":"exception on retrieval of {oidManager_var_name}: {e_what}","attr":{"oidManager_var_name":".1.3.6.1.4.1
.34601.1.1.1.2.1.3.2.3.5.50.55.48.49.55","e_what":"wrong type for field (update) long != int"}}
{"t":{"$date":"2020-06-03T11:01:39.504-04:00"},"s":"W",  "c":"NETWORK",  "id":24005,   "ctx":"SnmpAgent","m
sg":"exception on retrieval of {oidManager_var_name}: {e_what}","attr":{"oidManager_var_name":".1.3.6.1.4.1
.34601.1.1.1.2.1.3.2.4.5.50.55.48.49.55","e_what":"wrong type for field (delete) long != int"}}



 Comments   
Comment by Githook User [ 21/Jun/21 ]

Author:

{'name': 'Mark Benvenuto', 'email': 'mark.benvenuto@mongodb.com', 'username': 'markbenvenuto'}

Message: SERVER-48567 Fix warnings in snmpwalk

(cherry picked from commit 5369acbf46accd6e460097ba9d43ee052d52c03f)
Branch: v4.2
https://github.com/10gen/mongo-enterprise-modules/commit/84b309a91945087894982c50a507c35d5cad8afe

Comment by Githook User [ 14/Jun/21 ]

Author:

{'name': 'Mark Benvenuto', 'email': 'mark.benvenuto@mongodb.com', 'username': 'markbenvenuto'}

Message: SERVER-48567 Fix warnings in snmpwalk

(cherry picked from commit 5369acbf46accd6e460097ba9d43ee052d52c03f)
Branch: v4.4
https://github.com/10gen/mongo-enterprise-modules/commit/3f06cc969330d21b698d3dce919f770951bda536

Comment by Githook User [ 13/Nov/20 ]

Author:

{'name': 'Mark Benvenuto', 'email': 'mark.benvenuto@mongodb.com', 'username': 'markbenvenuto'}

Message: SERVER-48567 Fix warnings in snmpwalk
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/5369acbf46accd6e460097ba9d43ee052d52c03f

Comment by Mark Benvenuto [ 09/Nov/20 ]

Yeah, option 1 would be less disruptive. You transition plan is correct but very expensive in terms of time. I add a separate ticket to make the a decision about the transitioning to 64-bit counters. The transition will likely be deferred until suitable customer demand.

Comment by James Wahlin [ 09/Nov/20 ]

I guess option 1 above would be less disruptive to users?

If we wanted to move towards matching types we could:
1) Deprecate the old counters
2) Introduce new ones and populate both for a release (truncating the deprecated counters)
3) Remove support for the old counters in a subsequent release

I am not sure if this would be worth the effort however either for us our our users

Comment by Mark Benvenuto [ 09/Nov/20 ]

In SERVER-14364, the OpCounters class counters were changed from 32-bit to 64-bit integers. The SNMP MIB defines these counters as 32-bit and produces a warning as a result of calling BSONElement::Int.

We have two possible fixes:
1. Change the code to truncate these values as 32-bit integers
2. Update the MIB and code to read them as 64-bit integers. Changing the MIB is incompatible change.

james.wahlin, do you have an suggestions?

Generated at Thu Feb 08 05:17:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.