Skip to content

Commit

Permalink
Merge pull request #31 from signalfx/SWAT-1352
Browse files Browse the repository at this point in the history
check if memory key value is not none; mapped key is no longer the default
  • Loading branch information
tedoc2000 authored Apr 8, 2020
2 parents 5ebd340 + 92fd99c commit bb647bb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mongodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ def do_server_status(self):
# memory
if 'mem' in server_status:
for t in ['resident', 'virtual', 'mapped']:
self.submit('gauge', 'mem.' + t, server_status['mem'][t])
mem_metric = server_status['mem'].get(t)
if mem_metric:
self.submit('gauge', 'mem.' + t, mem_metric)

# network
if 'network' in server_status:
Expand Down

0 comments on commit bb647bb

Please sign in to comment.