diff --git a/CHANGELOG.md b/CHANGELOG.md index 05fa008..04c62e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ This CHANGELOG follows the format located [here](https://github.com/sensu-plugin ## [Unreleased] +## [2.0.3] - 2018-09-14 +### New Feature +- Adds WiredTiger Matrics (@parin921996) + ## [2.0.2] - 2018-03-17 ### Fixed - renamed library file `metics` to `metrics` and updated all refrences in code to it (@majormoses) diff --git a/lib/sensu-plugins-mongodb/metrics.rb b/lib/sensu-plugins-mongodb/metrics.rb index 813a705..743e312 100644 --- a/lib/sensu-plugins-mongodb/metrics.rb +++ b/lib/sensu-plugins-mongodb/metrics.rb @@ -102,6 +102,39 @@ def replicaset_status end end + def foo(key,json) + json.each do |key1, value1| + if value1.is_a? Hash + Temp_hash = {} + Temp_hash = foo(key1,value1) + return_json.merge(Temp_hash) + else + return key.gsub(/(,|\s|-|\()+/, '_').tr(')', '') + key1.gsub(/(,|\s|-|\()+/, '_').tr(')', '') => value1 + end + end + + + def wiretiger_metrics(wiredtiger, server_metrics) + TEMP_VALUE = foo('wiretiger',wiredtiger) + puts TEMP_VALUE + server_metrics.merge() + # wiredtiger.each do |key1, value1| + # next unless value1.is_a? Hash + # wiredtiger[key1].each do |key2, value2| + # if value2.is_a? Hash + # wiredtiger[key1][key2].each do |key3, value3| + # server_metrics['wiredTiger.' + key1.gsub(/(,|\s|-|\()+/, '_').tr(')', '') + '.' + + # key2.gsub(/(,|\s|-|\()+/, '_').tr(')', '') + '.' + key3.gsub(/(,|\s|-|\()+/, '_').tr(')', '')] = value3 + # end + # else + # server_metrics['wiredTiger.' + key1.gsub(/(,|\s|-|\()+/, '_').tr(')', '') + + # '.' + key2.gsub(/(,|\s|-|\()+/, '_').tr(')', '')] = value2 + # end + # end + # end + server_metrics + end + # Fetches metrics for the server we are connected to. # # @return [Mash] the metrics for the server. @@ -200,9 +233,8 @@ def server_metrics # Extra info extra_info = server_status['extra_info'] - server_metrics['mem.heap_usage_bytes'] = extra_info['heap_usage_bytes'] server_metrics['mem.pageFaults'] = extra_info['page_faults'] - + server_metrics['mem.heap_size_bytes'] = extra_info['heap_size'] # Global Lock global_lock = server_status['globalLock'] server_metrics['lock.totalTime'] = global_lock['totalTime'] @@ -217,7 +249,6 @@ def server_metrics if Gem::Version.new(mongo_version) < Gem::Version.new('3.0.0') index_counters = server_status['indexCounters'] index_counters = server_status['indexCounters']['btree'] unless server_status['indexCounters']['btree'].nil? - server_metrics['indexes.missRatio'] = sprintf('%.5f', index_counters['missRatio']).to_s server_metrics['indexes.hits'] = index_counters['hits'] server_metrics['indexes.misses'] = index_counters['misses'] @@ -255,23 +286,28 @@ def server_metrics server_metrics['network.bytesOut'] = network['bytesOut'] server_metrics['network.numRequests'] = network['numRequests'] + # OpLatencies + if server_status.key?('opLatencies') + oplatencies = server_status['opLatencies'] + server_metrics['oplatencies.read.latency'] = oplatencies['reads']['latency'] + server_metrics['oplatencies.read.operations'] = oplatencies['reads']['ops'] + server_metrics['oplatencies.write.latency'] = oplatencies['writes']['latency'] + server_metrics['oplatencies.write.operations'] = oplatencies['writes']['ops'] + server_metrics['oplatencies.command.latency'] = oplatencies['commands']['latency'] + server_metrics['oplatencies.command.operations'] = oplatencies['commands']['ops'] + end + # Opcounters opcounters = server_status['opcounters'] - server_metrics['opcounters.insert'] = opcounters['insert'] - server_metrics['opcounters.query'] = opcounters['query'] - server_metrics['opcounters.update'] = opcounters['update'] - server_metrics['opcounters.delete'] = opcounters['delete'] - server_metrics['opcounters.getmore'] = opcounters['getmore'] - server_metrics['opcounters.command'] = opcounters['command'] + opcounters.each do |key, value| + server_metrics['opcounters.' + key] = value + end # Opcounters Replication opcounters_repl = server_status['opcountersRepl'] - server_metrics['opcountersRepl.insert'] = opcounters_repl['insert'] - server_metrics['opcountersRepl.query'] = opcounters_repl['query'] - server_metrics['opcountersRepl.update'] = opcounters_repl['update'] - server_metrics['opcountersRepl.delete'] = opcounters_repl['delete'] - server_metrics['opcountersRepl.getmore'] = opcounters_repl['getmore'] - server_metrics['opcountersRepl.command'] = opcounters_repl['command'] + opcounters_repl.each do |key, value| + server_metrics['opcountersRepl.' + key] = value + end # Memory mem = server_status['mem'] @@ -280,6 +316,18 @@ def server_metrics server_metrics['mem.mapped'] = mem['mapped'] server_metrics['mem.mappedWithJournal'] = mem['mappedWithJournal'] + # Malloc + if server_status.key?('wiredTiger') + malloc = server_status['tcmalloc'] + server_metrics['mem.heap_size_bytes'] = malloc['generic']['heap_size'] + server_metrics['mem.current_allocated_bytes'] = malloc['generic']['current_allocated_bytes'] + end + # WiredTiger specific Metrics + if server_status.key?('wiredTiger') + wiredtiger = server_status['wiredTiger'] + server_metrics = wiretiger_metrics(wiredtiger, server_metrics) + end + # Metrics (documents) document = server_status['metrics']['document'] server_metrics['metrics.document.deleted'] = document['deleted'] diff --git a/lib/sensu-plugins-mongodb/version.rb b/lib/sensu-plugins-mongodb/version.rb index 8b9145b..72efd0e 100644 --- a/lib/sensu-plugins-mongodb/version.rb +++ b/lib/sensu-plugins-mongodb/version.rb @@ -2,7 +2,7 @@ module SensuPluginsMongoDB module Version MAJOR = 2 MINOR = 0 - PATCH = 2 + PATCH = 3 VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.') end diff --git a/test/fixtures/status_3.2.9.json b/test/fixtures/status_3.2.9.json index 78a4262..d6cc9c8 100644 --- a/test/fixtures/status_3.2.9.json +++ b/test/fixtures/status_3.2.9.json @@ -1,17 +1,13 @@ { - "host": "f1dbca7d352e", + "host": "716e282c90c1", "advisoryHostFQDNs": [], "version": "3.2.9", "process": "mongod", - "pid": { - "floatApprox": 1 - }, - "uptime": 4262, - "uptimeMillis": { - "floatApprox": 4261830 - }, - "uptimeEstimate": 4229, - "localTime": "2016-09-22T12:16:14.342Z", + "pid": 37, + "uptime": 1112.0, + "uptimeMillis": 1112003, + "uptimeEstimate": 985.0, + "localTime": "2018-09-13 18:27:12 UTC", "asserts": { "regular": 0, "warning": 0, @@ -20,28 +16,24 @@ "rollovers": 0 }, "connections": { - "current": 1, - "available": 52427, - "totalCreated": { - "floatApprox": 76 - } + "current": 2, + "available": 838858, + "totalCreated": 30 }, "extra_info": { "note": "fields vary by platform", - "heap_usage_bytes": 60214264, - "page_faults": 256 + "heap_usage_bytes": 60182392, + "page_faults": 0 }, "globalLock": { - "totalTime": { - "floatApprox": 4261830000 - }, + "totalTime": 1112002000, "currentQueue": { "total": 0, "readers": 0, "writers": 0 }, "activeClients": { - "total": 8, + "total": 9, "readers": 0, "writers": 0 } @@ -49,52 +41,33 @@ "locks": { "Global": { "acquireCount": { - "r": { - "floatApprox": 2290 - }, - "w": { - "floatApprox": 2 - }, - "W": { - "floatApprox": 4 - } + "r": 653, + "w": 3, + "W": 4 } }, "Database": { "acquireCount": { - "r": { - "floatApprox": 1142 - }, - "W": { - "floatApprox": 2 - } + "r": 313, + "R": 10, + "W": 3 } }, "Collection": { "acquireCount": { - "r": { - "floatApprox": 1142 - } + "r": 304 } }, "Metadata": { "acquireCount": { - "w": { - "floatApprox": 1 - } + "w": 1 } } }, "network": { - "bytesIn": { - "floatApprox": 4567 - }, - "bytesOut": { - "floatApprox": 489982 - }, - "numRequests": { - "floatApprox": 77 - } + "bytesIn": 7932, + "bytesOut": 182742, + "numRequests": 66 }, "opcounters": { "insert": 0, @@ -102,7 +75,7 @@ "update": 0, "delete": 0, "getmore": 0, - "command": 78 + "command": 67 }, "opcountersRepl": { "insert": 0, @@ -119,22 +92,20 @@ }, "tcmalloc": { "generic": { - "current_allocated_bytes": 60215800, - "heap_size": 64512000 + "current_allocated_bytes": 60183928, + "heap_size": 64520192 }, "tcmalloc": { - "pageheap_free_bytes": 1630208, + "pageheap_free_bytes": 2621440, "pageheap_unmapped_bytes": 0, - "max_total_thread_cache_bytes": { - "floatApprox": 1073741824 - }, - "current_total_thread_cache_bytes": 2009392, - "total_free_bytes": 2665992, - "central_cache_free_bytes": 656600, + "max_total_thread_cache_bytes": 1073741824, + "current_total_thread_cache_bytes": 1122224, + "total_free_bytes": 1714824, + "central_cache_free_bytes": 592600, "transfer_cache_free_bytes": 0, - "thread_cache_free_bytes": 2009392, + "thread_cache_free_bytes": 1122224, "aggressive_memory_decommit": 0, - "formattedString": "------------------------------------------------\nMALLOC: 60215800 ( 57.4 MiB) Bytes in use by application\nMALLOC: + 1630208 ( 1.6 MiB) Bytes in page heap freelist\nMALLOC: + 656600 ( 0.6 MiB) Bytes in central cache freelist\nMALLOC: + 0 ( 0.0 MiB) Bytes in transfer cache freelist\nMALLOC: + 2009392 ( 1.9 MiB) Bytes in thread cache freelists\nMALLOC: + 1208480 ( 1.2 MiB) Bytes in malloc metadata\nMALLOC: ------------\nMALLOC: = 65720480 ( 62.7 MiB) Actual memory used (physical + swap)\nMALLOC: + 0 ( 0.0 MiB) Bytes released to OS (aka unmapped)\nMALLOC: ------------\nMALLOC: = 65720480 ( 62.7 MiB) Virtual address space used\nMALLOC:\nMALLOC: 330 Spans in use\nMALLOC: 12 Thread heaps in use\nMALLOC: 8192 Tcmalloc page size\n------------------------------------------------\nCall ReleaseFreeMemory() to release freelist memory to the OS (via madvise()).\nBytes released to the OS take up virtual address space but no physical memory.\n" + "formattedString": "------------------------------------------------\nMALLOC: 60183928 ( 57.4 MiB) Bytes in use by application\nMALLOC: + 2621440 ( 2.5 MiB) Bytes in page heap freelist\nMALLOC: + 592600 ( 0.6 MiB) Bytes in central cache freelist\nMALLOC: + 0 ( 0.0 MiB) Bytes in transfer cache freelist\nMALLOC: + 1122224 ( 1.1 MiB) Bytes in thread cache freelists\nMALLOC: + 1208480 ( 1.2 MiB) Bytes in malloc metadata\nMALLOC: ------------\nMALLOC: = 65728672 ( 62.7 MiB) Actual memory used (physical + swap)\nMALLOC: + 0 ( 0.0 MiB) Bytes released to OS (aka unmapped)\nMALLOC: ------------\nMALLOC: = 65728672 ( 62.7 MiB) Virtual address space used\nMALLOC:\nMALLOC: 320 Spans in use\nMALLOC: 13 Thread heaps in use\nMALLOC: 8192 Tcmalloc page size\n------------------------------------------------\nCall ReleaseFreeMemory() to release freelist memory to the OS (via madvise()).\nBytes released to the OS take up virtual address space but no physical memory.\n" } }, "wiredTiger": { @@ -167,18 +138,18 @@ "total update calls": 0 }, "block-manager": { - "blocks pre-loaded": 0, - "blocks read": 1, - "blocks written": 19, - "bytes read": 4096, - "bytes written": 86016, + "blocks pre-loaded": 5, + "blocks read": 16, + "blocks written": 24, + "bytes read": 69632, + "bytes written": 110592, "mapped blocks read": 0, "mapped bytes read": 0 }, "cache": { - "bytes currently in the cache": 15825, - "bytes read into cache": 0, - "bytes written from cache": 12762, + "bytes currently in the cache": 44843, + "bytes read into cache": 7541, + "bytes written from cache": 19144, "checkpoint blocked page eviction": 0, "eviction calls to get a page": 0, "eviction calls to get a page found queue empty": 0, @@ -206,7 +177,7 @@ "leaf pages split during eviction": 0, "lookaside table insert calls": 0, "lookaside table remove calls": 0, - "maximum bytes configured": 8589934592, + "maximum bytes configured": 1073741824.0, "maximum page size at eviction": 0, "modified pages evicted": 0, "modified pages evicted by application threads": 0, @@ -218,95 +189,95 @@ "pages evicted by application threads": 0, "pages queued for eviction": 0, "pages queued for urgent eviction": 0, - "pages read into cache": 0, + "pages read into cache": 10, "pages read into cache requiring lookaside entries": 0, - "pages requested from the cache": 545, + "pages requested from the cache": 244, "pages seen by eviction walk": 0, "pages selected for eviction unable to be evicted": 0, "pages walked for eviction": 0, "pages written from cache": 12, "pages written requiring in-memory restoration": 0, "percentage overhead": 8, - "tracked bytes belonging to internal pages in the cache": 1390, - "tracked bytes belonging to leaf pages in the cache": 14435, + "tracked bytes belonging to internal pages in the cache": 13631, + "tracked bytes belonging to leaf pages in the cache": 31212, "tracked bytes belonging to overflow pages in the cache": 0, "tracked dirty bytes in the cache": 0, "tracked dirty pages in the cache": 0, "unmodified pages evicted": 0 }, "connection": { - "auto adjusting condition resets": 8, - "auto adjusting condition wait calls": 12822, + "auto adjusting condition resets": 9, + "auto adjusting condition wait calls": 3372, "files currently open": 9, - "memory allocations": 66582, - "memory frees": 65965, - "memory re-allocations": 17263, - "pthread mutex condition wait calls": 55977, - "pthread mutex shared lock read-lock calls": 9777, - "pthread mutex shared lock write-lock calls": 4962, - "total fsync I/Os": 673, - "total read I/Os": 86, - "total write I/Os": 42 + "memory allocations": 19700, + "memory frees": 19113, + "memory re-allocations": 4577, + "pthread mutex condition wait calls": 14531, + "pthread mutex shared lock read-lock calls": 2574, + "pthread mutex shared lock write-lock calls": 1296, + "total fsync I/Os": 190, + "total read I/Os": 876, + "total write I/Os": 38 }, "cursor": { - "cursor create calls": 31, - "cursor insert calls": 25, - "cursor next calls": 13, + "cursor create calls": 29, + "cursor insert calls": 12, + "cursor next calls": 28, "cursor prev calls": 3, - "cursor remove calls": 0, - "cursor reset calls": 523, + "cursor remove calls": 1, + "cursor reset calls": 220, "cursor restarted searches": 0, - "cursor search calls": 501, + "cursor search calls": 209, "cursor search near calls": 1, "cursor update calls": 0, "truncate calls": 0 }, "data-handle": { - "connection data handles currently active": 10, + "connection data handles currently active": 6, "connection sweep candidate became referenced": 0, "connection sweep dhandles closed": 0, - "connection sweep dhandles removed from hash list": 276, - "connection sweep time-of-death sets": 276, - "connection sweeps": 426, + "connection sweep dhandles removed from hash list": 72, + "connection sweep time-of-death sets": 72, + "connection sweeps": 111, "session dhandles swept": 0, - "session sweep attempts": 88 + "session sweep attempts": 33 }, "log": { "busy returns attempting to switch slots": 0, - "consolidated slot closures": 11, + "consolidated slot closures": 7, "consolidated slot join races": 0, - "consolidated slot join transitions": 11, - "consolidated slot joins": 25, + "consolidated slot join transitions": 7, + "consolidated slot joins": 11, "consolidated slot unbuffered writes": 0, - "log bytes of payload data": 7383, - "log bytes written": 9728, + "log bytes of payload data": 3497, + "log bytes written": 4736, "log files manually zero-filled": 0, - "log flush operations": 42581, - "log force write operations": 46928, - "log force write operations skipped": 46925, - "log records compressed": 8, - "log records not compressed": 7, - "log records too small to compress": 10, - "log release advances write LSN": 8, - "log scan operations": 0, - "log scan records requiring two reads": 0, - "log server thread advances write LSN": 3, - "log server thread write LSN walk skipped": 5238, - "log sync operations": 11, - "log sync time duration (usecs)": 38842, + "log flush operations": 11023, + "log force write operations": 12168, + "log force write operations skipped": 12166, + "log records compressed": 4, + "log records not compressed": 1, + "log records too small to compress": 6, + "log release advances write LSN": 5, + "log scan operations": 3, + "log scan records requiring two reads": 4, + "log server thread advances write LSN": 2, + "log server thread write LSN walk skipped": 2078, + "log sync operations": 7, + "log sync time duration (usecs)": 14238, "log sync_dir operations": 1, - "log sync_dir time duration (usecs)": 5102, - "log write operations": 25, - "logging bytes consolidated": 9344, + "log sync_dir time duration (usecs)": 16, + "log write operations": 11, + "logging bytes consolidated": 4352, "maximum log file size": 104857600, "number of pre-allocated log files to create": 2, "pre-allocated log files not ready and missed": 1, "pre-allocated log files prepared": 2, "pre-allocated log files used": 0, - "records processed by log scan": 0, - "total in-memory size of compressed records": 9993, + "records processed by log scan": 10, + "total in-memory size of compressed records": 4749, "total log buffer size": 33554432, - "total size of compressed records": 5745, + "total size of compressed records": 3183, "written slots coalesced": 0, "yields waiting for previous log file close": 0 }, @@ -337,25 +308,25 @@ "transaction": { "number of named snapshots created": 0, "number of named snapshots dropped": 0, - "transaction begins": 75, + "transaction begins": 41, "transaction checkpoint currently running": 0, - "transaction checkpoint generation": 71, - "transaction checkpoint max time (msecs)": 32, - "transaction checkpoint min time (msecs)": 0, - "transaction checkpoint most recent time (msecs)": 0, - "transaction checkpoint total time (msecs)": 54, - "transaction checkpoints": 71, + "transaction checkpoint generation": 19, + "transaction checkpoint max time (msecs)": 8, + "transaction checkpoint min time (msecs)": 6, + "transaction checkpoint most recent time (msecs)": 6, + "transaction checkpoint total time (msecs)": 28, + "transaction checkpoints": 19, "transaction failures due to cache overflow": 0, - "transaction fsync calls for checkpoint after allocating the transaction ID": 71, - "transaction fsync calls for checkpoint before allocating the transaction ID": 71, - "transaction fsync duration for checkpoint after allocating the transaction ID (usecs)": 29730, - "transaction fsync duration for checkpoint before allocating the transaction ID (usecs)": 217635, + "transaction fsync calls for checkpoint after allocating the transaction ID": 19, + "transaction fsync calls for checkpoint before allocating the transaction ID": 19, + "transaction fsync duration for checkpoint after allocating the transaction ID (usecs)": 21003, + "transaction fsync duration for checkpoint before allocating the transaction ID (usecs)": 64772, "transaction range of IDs currently pinned": 0, "transaction range of IDs currently pinned by a checkpoint": 0, "transaction range of IDs currently pinned by named snapshots": 0, "transaction sync calls": 0, - "transactions committed": 3, - "transactions rolled back": 72 + "transactions committed": 4, + "transactions rolled back": 37 }, "concurrentTransactions": { "write": { @@ -373,104 +344,639 @@ "writeBacksQueued": false, "mem": { "bits": 64, - "resident": 49, - "virtual": 245, + "resident": 50, + "virtual": 244, "supported": true, "mapped": 0, "mappedWithJournal": 0 }, "metrics": { "commands": { + "": 0, + "_getUserCacheGeneration": { + "failed": 0, + "total": 0 + }, + "_isSelf": { + "failed": 0, + "total": 0 + }, + "_mergeAuthzCollections": { + "failed": 0, + "total": 0 + }, + "_migrateClone": { + "failed": 0, + "total": 0 + }, + "_recvChunkAbort": { + "failed": 0, + "total": 0 + }, + "_recvChunkCommit": { + "failed": 0, + "total": 0 + }, + "_recvChunkStart": { + "failed": 0, + "total": 0 + }, + "_recvChunkStatus": { + "failed": 0, + "total": 0 + }, + "_transferMods": { + "failed": 0, + "total": 0 + }, + "aggregate": { + "failed": 0, + "total": 0 + }, + "appendOplogNote": { + "failed": 0, + "total": 0 + }, + "applyOps": { + "failed": 0, + "total": 0 + }, + "authSchemaUpgrade": { + "failed": 0, + "total": 0 + }, + "authenticate": { + "failed": 0, + "total": 0 + }, + "availableQueryOptions": { + "failed": 0, + "total": 0 + }, + "buildInfo": { + "failed": 0, + "total": 0 + }, + "checkShardingIndex": { + "failed": 0, + "total": 0 + }, + "cleanupOrphaned": { + "failed": 0, + "total": 0 + }, + "clone": { + "failed": 0, + "total": 0 + }, + "cloneCollection": { + "failed": 0, + "total": 0 + }, + "cloneCollectionAsCapped": { + "failed": 0, + "total": 0 + }, + "collMod": { + "failed": 0, + "total": 0 + }, + "collStats": { + "failed": 0, + "total": 0 + }, + "compact": { + "failed": 0, + "total": 0 + }, + "connPoolStats": { + "failed": 0, + "total": 0 + }, + "connPoolSync": { + "failed": 0, + "total": 0 + }, + "connectionStatus": { + "failed": 0, + "total": 0 + }, + "convertToCapped": { + "failed": 0, + "total": 0 + }, + "copydb": { + "failed": 0, + "total": 0 + }, + "copydbgetnonce": { + "failed": 0, + "total": 0 + }, + "copydbsaslstart": { + "failed": 0, + "total": 0 + }, + "count": { + "failed": 0, + "total": 0 + }, + "create": { + "failed": 0, + "total": 0 + }, + "createIndexes": { + "failed": 0, + "total": 0 + }, + "createRole": { + "failed": 0, + "total": 0 + }, + "createUser": { + "failed": 0, + "total": 0 + }, + "currentOp": { + "failed": 0, + "total": 0 + }, + "currentOpCtx": { + "failed": 0, + "total": 0 + }, + "dataSize": { + "failed": 0, + "total": 0 + }, + "dbHash": { + "failed": 0, + "total": 0 + }, + "dbStats": { + "failed": 0, + "total": 9 + }, + "delete": { + "failed": 0, + "total": 0 + }, + "diagLogging": { + "failed": 0, + "total": 0 + }, + "distinct": { + "failed": 0, + "total": 0 + }, + "driverOIDTest": { + "failed": 0, + "total": 0 + }, + "drop": { + "failed": 0, + "total": 0 + }, + "dropAllRolesFromDatabase": { + "failed": 0, + "total": 0 + }, + "dropAllUsersFromDatabase": { + "failed": 0, + "total": 0 + }, + "dropDatabase": { + "failed": 0, + "total": 0 + }, + "dropIndexes": { + "failed": 0, + "total": 0 + }, + "dropRole": { + "failed": 0, + "total": 0 + }, + "dropUser": { + "failed": 0, + "total": 0 + }, + "eval": { + "failed": 0, + "total": 0 + }, + "explain": { + "failed": 0, + "total": 0 + }, + "features": { + "failed": 0, + "total": 0 + }, + "filemd5": { + "failed": 0, + "total": 0 + }, + "find": { + "failed": 0, + "total": 0 + }, + "findAndModify": { + "failed": 0, + "total": 0 + }, + "forceerror": { + "failed": 0, + "total": 0 + }, + "fsync": { + "failed": 0, + "total": 0 + }, + "fsyncUnlock": { + "failed": 0, + "total": 0 + }, + "geoNear": { + "failed": 0, + "total": 0 + }, + "geoSearch": { + "failed": 0, + "total": 0 + }, + "getCmdLineOpts": { + "failed": 0, + "total": 0 + }, + "getLastError": { + "failed": 0, + "total": 0 + }, + "getLog": { + "failed": 0, + "total": 0 + }, + "getMore": { + "failed": 0, + "total": 0 + }, + "getParameter": { + "failed": 0, + "total": 0 + }, + "getPrevError": { + "failed": 0, + "total": 0 + }, + "getShardMap": { + "failed": 0, + "total": 0 + }, + "getShardVersion": { + "failed": 0, + "total": 0 + }, + "getnonce": { + "failed": 0, + "total": 0 + }, + "grantPrivilegesToRole": { + "failed": 0, + "total": 0 + }, + "grantRolesToRole": { + "failed": 0, + "total": 0 + }, + "grantRolesToUser": { + "failed": 0, + "total": 0 + }, + "group": { + "failed": 0, + "total": 0 + }, + "handshake": { + "failed": 0, + "total": 0 + }, + "hostInfo": { + "failed": 0, + "total": 0 + }, + "insert": { + "failed": 0, + "total": 0 + }, + "invalidateUserCache": { + "failed": 0, + "total": 0 + }, "isMaster": { - "failed": { - "floatApprox": 0 - }, - "total": { - "floatApprox": 51 + "failed": 0, + "total": 30 + }, + "killCursors": { + "failed": 0, + "total": 0 + }, + "killOp": { + "failed": 0, + "total": 0 + }, + "listCollections": { + "failed": 0, + "total": 0 + }, + "listCommands": { + "failed": 0, + "total": 0 + }, + "listDatabases": { + "failed": 0, + "total": 9 + }, + "listIndexes": { + "failed": 0, + "total": 0 + }, + "logRotate": { + "failed": 0, + "total": 0 + }, + "logout": { + "failed": 0, + "total": 0 + }, + "mapReduce": { + "failed": 0, + "total": 0 + }, + "mapreduce": { + "shardedfinish": { + "failed": 0, + "total": 0 } }, + "mergeChunks": { + "failed": 0, + "total": 0 + }, + "moveChunk": { + "failed": 0, + "total": 0 + }, + "parallelCollectionScan": { + "failed": 0, + "total": 0 + }, + "ping": { + "failed": 0, + "total": 0 + }, + "planCacheClear": { + "failed": 0, + "total": 0 + }, + "planCacheClearFilters": { + "failed": 0, + "total": 0 + }, + "planCacheListFilters": { + "failed": 0, + "total": 0 + }, + "planCacheListPlans": { + "failed": 0, + "total": 0 + }, + "planCacheListQueryShapes": { + "failed": 0, + "total": 0 + }, + "planCacheSetFilter": { + "failed": 0, + "total": 0 + }, + "profile": { + "failed": 0, + "total": 0 + }, + "reIndex": { + "failed": 0, + "total": 0 + }, + "renameCollection": { + "failed": 0, + "total": 0 + }, + "repairCursor": { + "failed": 0, + "total": 0 + }, + "repairDatabase": { + "failed": 0, + "total": 0 + }, + "replSetDeclareElectionWinner": { + "failed": 0, + "total": 0 + }, + "replSetElect": { + "failed": 0, + "total": 0 + }, + "replSetFreeze": { + "failed": 0, + "total": 0 + }, + "replSetFresh": { + "failed": 0, + "total": 0 + }, + "replSetGetConfig": { + "failed": 0, + "total": 0 + }, + "replSetGetRBID": { + "failed": 0, + "total": 0 + }, + "replSetGetStatus": { + "failed": 9, + "total": 9 + }, + "replSetHeartbeat": { + "failed": 0, + "total": 0 + }, + "replSetInitiate": { + "failed": 0, + "total": 0 + }, + "replSetMaintenance": { + "failed": 0, + "total": 0 + }, + "replSetReconfig": { + "failed": 0, + "total": 0 + }, + "replSetRequestVotes": { + "failed": 0, + "total": 0 + }, + "replSetStepDown": { + "failed": 0, + "total": 0 + }, + "replSetSyncFrom": { + "failed": 0, + "total": 0 + }, + "replSetUpdatePosition": { + "failed": 0, + "total": 0 + }, + "resetError": { + "failed": 0, + "total": 0 + }, + "resync": { + "failed": 0, + "total": 0 + }, + "revokePrivilegesFromRole": { + "failed": 0, + "total": 0 + }, + "revokeRolesFromRole": { + "failed": 0, + "total": 0 + }, + "revokeRolesFromUser": { + "failed": 0, + "total": 0 + }, + "rolesInfo": { + "failed": 0, + "total": 0 + }, + "saslContinue": { + "failed": 0, + "total": 0 + }, + "saslStart": { + "failed": 0, + "total": 0 + }, "serverStatus": { - "failed": { - "floatApprox": 0 - }, - "total": { - "floatApprox": 26 - } + "failed": 0, + "total": 10 + }, + "setParameter": { + "failed": 0, + "total": 0 + }, + "setShardVersion": { + "failed": 0, + "total": 0 + }, + "shardConnPoolStats": { + "failed": 0, + "total": 0 + }, + "shardingState": { + "failed": 0, + "total": 0 + }, + "shutdown": { + "failed": 0, + "total": 0 + }, + "splitChunk": { + "failed": 0, + "total": 0 + }, + "splitVector": { + "failed": 0, + "total": 0 + }, + "top": { + "failed": 0, + "total": 0 + }, + "touch": { + "failed": 0, + "total": 0 + }, + "unsetSharding": { + "failed": 0, + "total": 0 + }, + "update": { + "failed": 0, + "total": 0 + }, + "updateRole": { + "failed": 0, + "total": 0 + }, + "updateUser": { + "failed": 0, + "total": 0 + }, + "usersInfo": { + "failed": 0, + "total": 0 + }, + "validate": { + "failed": 0, + "total": 0 }, "whatsmyuri": { - "failed": { - "floatApprox": 0 - }, - "total": { - "floatApprox": 1 - } + "failed": 0, + "total": 0 + }, + "writebacklisten": { + "failed": 0, + "total": 0 } }, "cursor": { - "timedOut": { - "floatApprox": 0 - }, + "timedOut": 0, "open": { - "noTimeout": { - "floatApprox": 0 - }, - "pinned": { - "floatApprox": 0 - }, - "total": { - "floatApprox": 0 - } + "noTimeout": 0, + "pinned": 0, + "total": 0 } }, "document": { - "deleted": { - "floatApprox": 0 - }, - "inserted": { - "floatApprox": 0 - }, - "returned": { - "floatApprox": 0 - }, - "updated": { - "floatApprox": 0 - } + "deleted": 0, + "inserted": 0, + "returned": 0, + "updated": 0 }, "getLastError": { "wtime": { "num": 0, "totalMillis": 0 }, - "wtimeouts": { - "floatApprox": 0 - } + "wtimeouts": 0 }, "operation": { - "fastmod": { - "floatApprox": 0 - }, - "idhack": { - "floatApprox": 0 - }, - "scanAndOrder": { - "floatApprox": 0 - }, - "writeConflicts": { - "floatApprox": 0 - } + "fastmod": 0, + "idhack": 0, + "scanAndOrder": 0, + "writeConflicts": 0 }, "queryExecutor": { - "scanned": { - "floatApprox": 0 - }, - "scannedObjects": { - "floatApprox": 0 - } + "scanned": 0, + "scannedObjects": 0 }, "record": { - "moves": { - "floatApprox": 0 - } + "moves": 0 }, "repl": { "executor": { @@ -504,33 +1010,21 @@ "num": 0, "totalMillis": 0 }, - "ops": { - "floatApprox": 0 - } + "ops": 0 }, "buffer": { - "count": { - "floatApprox": 0 - }, + "count": 0, "maxSizeBytes": 268435456, - "sizeBytes": { - "floatApprox": 0 - } + "sizeBytes": 0 }, "network": { - "bytes": { - "floatApprox": 0 - }, + "bytes": 0, "getmores": { "num": 0, "totalMillis": 0 }, - "ops": { - "floatApprox": 0 - }, - "readersCreated": { - "floatApprox": 0 - } + "ops": 0, + "readersCreated": 0 }, "preload": { "docs": { @@ -546,26 +1040,16 @@ "storage": { "freelist": { "search": { - "bucketExhausted": { - "floatApprox": 0 - }, - "requests": { - "floatApprox": 0 - }, - "scanned": { - "floatApprox": 0 - } + "bucketExhausted": 0, + "requests": 0, + "scanned": 0 } } }, "ttl": { - "deletedDocuments": { - "floatApprox": 0 - }, - "passes": { - "floatApprox": 71 - } + "deletedDocuments": 0, + "passes": 18 } }, - "ok": 1 -} + "ok": 1.0 +} \ No newline at end of file diff --git a/test/lib/sensu-plugins-mongodb/metrics_spec.rb b/test/lib/sensu-plugins-mongodb/metrics_spec.rb index 3a3723b..e0cb1e5 100644 --- a/test/lib/sensu-plugins-mongodb/metrics_spec.rb +++ b/test/lib/sensu-plugins-mongodb/metrics_spec.rb @@ -85,12 +85,12 @@ 'databaseSizes.admin.collections' => 4, 'databaseSizes.admin.objects' => 11, 'databaseSizes.admin.avgObjSize' => 106.18181818181819, - 'databaseSizes.admin.dataSize' => 1168.0, - 'databaseSizes.admin.storageSize' => 286_72.0, + 'databaseSizes.admin.dataSize' => 1168, + 'databaseSizes.admin.storageSize' => 286_72, 'databaseSizes.admin.numExtents' => 4, 'databaseSizes.admin.indexes' => 3, - 'databaseSizes.admin.indexSize' => 245_28.0, - 'databaseSizes.admin.fileSize' => 671_088_64.0, + 'databaseSizes.admin.indexSize' => 245_28, + 'databaseSizes.admin.fileSize' => 671_088_64, 'databaseSizes.admin.nsSizeMB' => 16, 'indexes.accesses' => 2, 'indexes.hits' => 2, @@ -114,7 +114,6 @@ 'lock.queue_total' => 0, 'lock.queue_writers' => 0, 'lock.totalTime' => 4_127_130_000, - 'mem.heap_usage_bytes' => 62_525_976, 'mem.mapped' => 80, 'mem.mappedWithJournal' => 160, 'mem.pageFaults' => 236, @@ -207,47 +206,262 @@ metrics.connect_mongo_db('admin') result = metrics.server_metrics expect(result).to eq( + 'asserts.warnings' => 0, 'asserts.errors' => 0, 'asserts.regular' => 0, - 'asserts.rollovers' => 0, 'asserts.user' => 0, - 'asserts.warnings' => 0, - 'connections.available' => 52_427, - 'connections.current' => 1, - 'connections.totalCreated' => 76, + 'asserts.rollovers' => 0, + 'connections.current' => 2, + 'connections.available' => 838_858, + 'connections.totalCreated' => 30, + 'cursors.timedOut' => 0, 'cursors.open.noTimeout' => 0, 'cursors.open.pinned' => 0, 'cursors.open.total' => 0, - 'cursors.timedOut' => 0, - 'databaseSizes.admin.collections' => 4, - 'databaseSizes.admin.objects' => 11, 'databaseSizes.admin.avgObjSize' => 106.18181818181819, - 'databaseSizes.admin.dataSize' => 1168.0, - 'databaseSizes.admin.storageSize' => 286_72.0, - 'databaseSizes.admin.numExtents' => 4, - 'databaseSizes.admin.indexes' => 3, + 'databaseSizes.admin.collections' => 4, + 'databaseSizes.admin.dataSize' => 116_8, + 'databaseSizes.admin.fileSize' => 671_088_64, 'databaseSizes.admin.indexSize' => 245_28.0, - 'databaseSizes.admin.fileSize' => 671_088_64.0, + 'databaseSizes.admin.indexes' => 3, 'databaseSizes.admin.nsSizeMB' => 16, - 'lock.clients_readers' => 0, - 'lock.clients_total' => 8, - 'lock.clients_writers' => 0, - 'lock.queue_readers' => 0, + 'databaseSizes.admin.numExtents' => 4, + 'databaseSizes.admin.objects' => 11, + 'databaseSizes.admin.storageSize' => 286_72, + 'mem.pageFaults' => 0, + 'mem.heap_size_bytes' => 645_201_92, + 'lock.totalTime' => 111_200_200_0, 'lock.queue_total' => 0, + 'lock.queue_readers' => 0, 'lock.queue_writers' => 0, - 'lock.totalTime' => 4_261_830_000, - 'locks.Collection.acquireCount_r' => 1_142, - 'locks.Database.acquireCount_W' => 1_142, - 'locks.Database.acquireCount_r' => 1_142, - 'locks.Global.acquireCount_W' => 2_290, - 'locks.Global.acquireCount_r' => 2_290, - 'locks.Global.acquireCount_w' => 2_290, - 'mem.heap_usage_bytes' => 60_214_264, + 'lock.clients_total' => 9, + 'lock.clients_readers' => 0, + 'lock.clients_writers' => 0, + 'locks.Collection.acquireCount_r' => 304, + 'locks.Global.acquireCount_r' => 653, + 'locks.Global.acquireCount_w' => 653, + 'locks.Global.acquireCount_W' => 653, + 'locks.Database.acquireCount_r' => 313, + 'locks.Database.acquireCount_R' => 313, + 'locks.Database.acquireCount_W' => 313, + 'network.bytesIn' => 793_2, + 'network.bytesOut' => 182_742, + 'network.numRequests' => 66, + 'opcounters.insert' => 0, + 'opcounters.query' => 1, + 'opcounters.update' => 0, + 'opcounters.delete' => 0, + 'opcounters.getmore' => 0, + 'opcounters.command' => 67, + 'opcountersRepl.insert' => 0, + 'opcountersRepl.query' => 0, + 'opcountersRepl.update' => 0, + 'opcountersRepl.delete' => 0, + 'opcountersRepl.getmore' => 0, + 'opcountersRepl.command' => 0, + 'mem.residentMb' => 50, + 'mem.virtualMb' => 244, 'mem.mapped' => 0, 'mem.mappedWithJournal' => 0, - 'mem.pageFaults' => 256, - 'mem.residentMb' => 49, - 'mem.virtualMb' => 245, + 'mem.current_allocated_bytes' => 601_839_28, + 'wiredTiger.data_handle.session_dhandles_swept' => 0, + 'wiredTiger.data_handle.connection_sweeps' => 111, + 'wiredTiger.data_handle.connection_sweep_dhandles_removed_from_hash_list' => 72, + 'wiredTiger.data_handle.connection_data_handles_currently_active' => 6, + 'wiredTiger.data_handle.connection_sweep_dhandles_closed' => 0, + 'wiredTiger.data_handle.session_sweep_attempts' => 33, + 'wiredTiger.data_handle.connection_sweep_candidate_became_referenced' => 0, + 'wiredTiger.data_handle.connection_sweep_time_of_death_sets' => 72, + 'wiredTiger.reconciliation.fast_path_pages_deleted' => 0, + 'wiredTiger.reconciliation.split_objects_currently_awaiting_free' => 0, + 'wiredTiger.reconciliation.split_bytes_currently_awaiting_free' => 0, + 'wiredTiger.reconciliation.pages_deleted' => 0, + 'wiredTiger.reconciliation.page_reconciliation_calls_for_eviction' => 0, + 'wiredTiger.reconciliation.page_reconciliation_calls' => 12, + 'wiredTiger.cache.unmodified_pages_evicted' => 0, + 'wiredTiger.cache.eviction_server_evicting_pages' => 0, + 'wiredTiger.cache.eviction_server_populating_queue_but_not_evicting_pages' => 0, + 'wiredTiger.cache.eviction_server_skipped_very_large_page' => 0, + 'wiredTiger.cache.tracked_dirty_pages_in_the_cache' => 0, + 'wiredTiger.cache.eviction_calls_to_get_a_page_found_queue_empty_after_locking' => 0, + 'wiredTiger.cache.internal_pages_split_during_eviction' => 0, + 'wiredTiger.cache.page_split_during_eviction_deepened_the_tree' => 0, + 'wiredTiger.cache.leaf_pages_split_during_eviction' => 0, + 'wiredTiger.cache.pages_walked_for_eviction' => 0, + 'wiredTiger.cache.percentage_overhead' => 8, + 'wiredTiger.cache.pages_evicted_by_application_threads' => 0, + 'wiredTiger.cache.tracked_dirty_bytes_in_the_cache' => 0, + 'wiredTiger.cache.maximum_page_size_at_eviction' => 0, + 'wiredTiger.cache.failed_eviction_of_pages_that_exceeded_the_in_memory_maximum' => 0, + 'wiredTiger.cache.pages_evicted_because_they_exceeded_the_in_memory_maximum' => 0, + 'wiredTiger.cache.tracked_bytes_belonging_to_leaf_pages_in_the_cache' => 312_12, + 'wiredTiger.cache.tracked_bytes_belonging_to_overflow_pages_in_the_cache' => 0, + 'wiredTiger.cache.eviction_server_candidate_queue_empty_when_topping_up' => 0, + 'wiredTiger.cache.bytes_written_from_cache' => 191_44, + 'wiredTiger.cache.eviction_server_slept_because_we_did_not_make_progress_with_eviction' => 0, + 'wiredTiger.cache.pages_queued_for_urgent_eviction' => 0, + 'wiredTiger.cache.eviction_currently_operating_in_aggressive_mode' => 0, + 'wiredTiger.cache.tracked_bytes_belonging_to_internal_pages_in_the_cache' => 136_31, + 'wiredTiger.cache.bytes_currently_in_the_cache' => 448_43, + 'wiredTiger.cache.pages_selected_for_eviction_unable_to_be_evicted' => 0, + 'wiredTiger.cache.hazard_pointer_maximum_array_length' => 0, + 'wiredTiger.cache.lookaside_table_remove_calls' => 0, + 'wiredTiger.cache.in_memory_page_passed_criteria_to_be_split' => 0, + 'wiredTiger.cache.checkpoint_blocked_page_eviction' => 0, + 'wiredTiger.cache.eviction_calls_to_get_a_page_found_queue_empty' => 0, + 'wiredTiger.cache.pages_written_from_cache' => 12, + 'wiredTiger.cache.eviction_calls_to_get_a_page' => 0, + 'wiredTiger.cache.modified_pages_evicted_by_application_threads' => 0, + 'wiredTiger.cache.pages_seen_by_eviction_walk' => 0, + 'wiredTiger.cache.eviction_worker_thread_evicting_pages' => 0, + 'wiredTiger.cache.bytes_read_into_cache' => 754_1, + 'wiredTiger.cache.page_written_requiring_lookaside_records' => 0, + 'wiredTiger.cache.hazard_pointer_blocked_page_eviction' => 0, + 'wiredTiger.cache.lookaside_table_insert_calls' => 0, + 'wiredTiger.cache.pages_read_into_cache' => 10, + 'wiredTiger.cache.pages_written_requiring_in_memory_restoration' => 0, + 'wiredTiger.cache.pages_evicted_because_they_had_chains_of_deleted_items' => 0, + 'wiredTiger.cache.files_with_new_eviction_walks_started' => 0, + 'wiredTiger.cache.pages_queued_for_eviction' => 0, + 'wiredTiger.cache.pages_requested_from_the_cache' => 244, + 'wiredTiger.cache.pages_read_into_cache_requiring_lookaside_entries' => 0, + 'wiredTiger.cache.eviction_server_candidate_queue_not_empty_when_topping_up' => 0, + 'wiredTiger.cache.files_with_active_eviction_walks' => 0, + 'wiredTiger.cache.hazard_pointer_check_entries_walked' => 0, + 'wiredTiger.cache.in_memory_page_splits' => 0, + 'wiredTiger.cache.internal_pages_evicted' => 0, + 'wiredTiger.cache.maximum_bytes_configured' => 107_374_182_4.0, + 'wiredTiger.cache.pages_currently_held_in_the_cache' => 11, + 'wiredTiger.cache.modified_pages_evicted' => 0, + 'wiredTiger.cache.eviction_server_unable_to_reach_eviction_goal' => 0, + 'wiredTiger.cache.hazard_pointer_check_calls' => 0, + 'wiredTiger.log.log_sync_dir_operations' => 1, + 'wiredTiger.log.log_sync_dir_time_duration_usecs' => 16, + 'wiredTiger.log.log_write_operations' => 11, + 'wiredTiger.log.log_server_thread_advances_write_LSN' => 2, + 'wiredTiger.log.consolidated_slot_join_races' => 0, + 'wiredTiger.log.maximum_log_file_size' => 104_857_600, + 'wiredTiger.log.records_processed_by_log_scan' => 10, + 'wiredTiger.log.total_log_buffer_size' => 335_544_32, + 'wiredTiger.log.log_records_too_small_to_compress' => 6, + 'wiredTiger.log.log_force_write_operations_skipped' => 121_66, + 'wiredTiger.log.log_scan_operations' => 3, + 'wiredTiger.log.pre_allocated_log_files_used' => 0, + 'wiredTiger.log.pre_allocated_log_files_not_ready_and_missed' => 1, + 'wiredTiger.log.total_size_of_compressed_records' => 318_3, + 'wiredTiger.log.pre_allocated_log_files_prepared' => 2, + 'wiredTiger.log.log_sync_time_duration_usecs' => 142_38, + 'wiredTiger.log.total_in_memory_size_of_compressed_records' => 474_9, + 'wiredTiger.log.yields_waiting_for_previous_log_file_close' => 0, + 'wiredTiger.log.log_records_not_compressed' => 1, + 'wiredTiger.log.log_force_write_operations' => 121_68, + 'wiredTiger.log.consolidated_slot_unbuffered_writes' => 0, + 'wiredTiger.log.written_slots_coalesced' => 0, + 'wiredTiger.log.log_records_compressed' => 4, + 'wiredTiger.log.number_of_pre_allocated_log_files_to_create' => 2, + 'wiredTiger.log.log_bytes_written' => 473_6, + 'wiredTiger.log.busy_returns_attempting_to_switch_slots' => 0, + 'wiredTiger.log.consolidated_slot_joins' => 11, + 'wiredTiger.log.log_files_manually_zero_filled' => 0, + 'wiredTiger.log.log_bytes_of_payload_data' => 349_7, + 'wiredTiger.log.log_flush_operations' => 110_23, + 'wiredTiger.log.log_sync_operations' => 7, + 'wiredTiger.log.log_scan_records_requiring_two_reads' => 4, + 'wiredTiger.log.logging_bytes_consolidated' => 435_2, + 'wiredTiger.log.log_server_thread_write_LSN_walk_skipped' => 207_8, + 'wiredTiger.log.consolidated_slot_join_transitions' => 7, + 'wiredTiger.log.log_release_advances_write_LSN' => 5, + 'wiredTiger.log.consolidated_slot_closures' => 7, + 'wiredTiger.LSM.sleep_for_LSM_merge_throttle' => 0, + 'wiredTiger.LSM.application_work_units_currently_queued' => 0, + 'wiredTiger.LSM.rows_merged_in_an_LSM_tree' => 0, + 'wiredTiger.LSM.switch_work_units_currently_queued' => 0, + 'wiredTiger.LSM.merge_work_units_currently_queued' => 0, + 'wiredTiger.LSM.tree_maintenance_operations_discarded' => 0, + 'wiredTiger.LSM.sleep_for_LSM_checkpoint_throttle' => 0, + 'wiredTiger.LSM.tree_maintenance_operations_executed' => 0, + 'wiredTiger.LSM.tree_maintenance_operations_scheduled' => 0, + 'wiredTiger.LSM.tree_queue_hit_maximum' => 0, + 'wiredTiger.transaction.number_of_named_snapshots_dropped' => 0, + 'wiredTiger.transaction.transaction_checkpoint_currently_running' => 0, + 'wiredTiger.transaction.transaction_begins' => 41, + 'wiredTiger.transaction.transaction_fsync_calls_for_checkpoint_after_allocating_the_transaction_ID' => 19, + 'wiredTiger.transaction.transaction_fsync_calls_for_checkpoint_before_allocating_the_transaction_ID' => 19, + 'wiredTiger.transaction.transaction_fsync_duration_for_checkpoint_after_allocating_the_transaction_ID_usecs' => 210_03, + 'wiredTiger.transaction.transaction_fsync_duration_for_checkpoint_before_allocating_the_transaction_ID_usecs' => 647_72, + 'wiredTiger.transaction.transaction_checkpoint_most_recent_time_msecs' => 6, + 'wiredTiger.transaction.transaction_checkpoints' => 19, + 'wiredTiger.transaction.transaction_range_of_IDs_currently_pinned_by_a_checkpoint' => 0, + 'wiredTiger.transaction.transaction_sync_calls' => 0, + 'wiredTiger.transaction.transactions_committed' => 4, + 'wiredTiger.transaction.transaction_checkpoint_max_time_msecs' => 8, + 'wiredTiger.transaction.number_of_named_snapshots_created' => 0, + 'wiredTiger.transaction.transaction_checkpoint_min_time_msecs' => 6, + 'wiredTiger.transaction.transaction_checkpoint_total_time_msecs' => 28, + 'wiredTiger.transaction.transaction_checkpoint_generation' => 19, + 'wiredTiger.transaction.transaction_failures_due_to_cache_overflow' => 0, + 'wiredTiger.transaction.transaction_range_of_IDs_currently_pinned_by_named_snapshots' => 0, + 'wiredTiger.transaction.transactions_rolled_back' => 37, + 'wiredTiger.transaction.transaction_range_of_IDs_currently_pinned' => 0, + 'wiredTiger.cursor.cursor_restarted_searches' => 0, + 'wiredTiger.cursor.cursor_prev_calls' => 3, + 'wiredTiger.cursor.cursor_insert_calls' => 12, + 'wiredTiger.cursor.cursor_reset_calls' => 220, + 'wiredTiger.cursor.cursor_update_calls' => 0, + 'wiredTiger.cursor.cursor_search_near_calls' => 1, + 'wiredTiger.cursor.cursor_search_calls' => 209, + 'wiredTiger.cursor.cursor_next_calls' => 28, + 'wiredTiger.cursor.cursor_create_calls' => 29, + 'wiredTiger.cursor.truncate_calls' => 0, + 'wiredTiger.cursor.cursor_remove_calls' => 1, + 'wiredTiger.connection.total_read_I/Os' => 876, + 'wiredTiger.connection.memory_re_allocations' => 457_7, + 'wiredTiger.connection.pthread_mutex_shared_lock_write_lock_calls' => 129_6, + 'wiredTiger.connection.auto_adjusting_condition_resets' => 9, + 'wiredTiger.connection.pthread_mutex_condition_wait_calls' => 145_31, + 'wiredTiger.connection.memory_frees' => 191_13, + 'wiredTiger.connection.pthread_mutex_shared_lock_read_lock_calls' => 257_4, + 'wiredTiger.connection.total_fsync_I/Os' => 190, + 'wiredTiger.connection.files_currently_open' => 9, + 'wiredTiger.connection.memory_allocations' => 197_00, + 'wiredTiger.connection.auto_adjusting_condition_wait_calls' => 337_2, + 'wiredTiger.connection.total_write_I/Os' => 38, + 'wiredTiger.session.open_cursor_count' => 20, + 'wiredTiger.session.open_session_count' => 16, + 'wiredTiger.block_manager.bytes_read' => 696_32, + 'wiredTiger.block_manager.blocks_read' => 16, + 'wiredTiger.block_manager.blocks_pre_loaded' => 5, + 'wiredTiger.block_manager.bytes_written' => 110_592, + 'wiredTiger.block_manager.mapped_bytes_read' => 0, + 'wiredTiger.block_manager.blocks_written' => 24, + 'wiredTiger.block_manager.mapped_blocks_read' => 0, + 'wiredTiger.thread_yield.page_acquire_busy_blocked' => 0, + 'wiredTiger.thread_yield.page_acquire_read_blocked' => 0, + 'wiredTiger.thread_yield.page_acquire_locked_blocked' => 0, + 'wiredTiger.thread_yield.page_acquire_eviction_blocked' => 0, + 'wiredTiger.thread_yield.page_acquire_time_sleeping_usecs' => 0, + 'wiredTiger.async.total_insert_calls' => 0, + 'wiredTiger.async.total_remove_calls' => 0, + 'wiredTiger.async.number_of_operation_slots_viewed_for_allocation' => 0, + 'wiredTiger.async.total_allocations' => 0, + 'wiredTiger.async.current_work_queue_length' => 0, + 'wiredTiger.async.number_of_flush_calls' => 0, + 'wiredTiger.async.maximum_work_queue_length' => 0, + 'wiredTiger.async.total_compact_calls' => 0, + 'wiredTiger.async.total_update_calls' => 0, + 'wiredTiger.async.number_of_allocation_state_races' => 0, + 'wiredTiger.async.number_of_times_operation_allocation_failed' => 0, + 'wiredTiger.async.number_of_times_worker_found_no_work' => 0, + 'wiredTiger.async.total_search_calls' => 0, + 'wiredTiger.concurrentTransactions.write.out' => 0, + 'wiredTiger.concurrentTransactions.write.available' => 128, + 'wiredTiger.concurrentTransactions.write.totalTickets' => 128, + 'wiredTiger.concurrentTransactions.read.out' => 0, + 'wiredTiger.concurrentTransactions.read.available' => 128, + 'wiredTiger.concurrentTransactions.read.totalTickets' => 128, + 'wiredTiger.thread_state.active_filesystem_write_calls' => 0, + 'wiredTiger.thread_state.active_filesystem_read_calls' => 0, + 'wiredTiger.thread_state.active_filesystem_fsync_calls' => 0, 'metrics.document.deleted' => 0, 'metrics.document.inserted' => 0, 'metrics.document.returned' => 0, @@ -281,22 +495,7 @@ 'metrics.storage.freelist.search_requests' => 0, 'metrics.storage.freelist.search_scanned' => 0, 'metrics.ttl.deletedDocuments' => 0, - 'metrics.ttl.passes' => 71, - 'network.bytesIn' => 4_567, - 'network.bytesOut' => 489_982, - 'network.numRequests' => 77, - 'opcounters.command' => 78, - 'opcounters.delete' => 0, - 'opcounters.getmore' => 0, - 'opcounters.insert' => 0, - 'opcounters.query' => 1, - 'opcounters.update' => 0, - 'opcountersRepl.command' => 0, - 'opcountersRepl.delete' => 0, - 'opcountersRepl.getmore' => 0, - 'opcountersRepl.insert' => 0, - 'opcountersRepl.query' => 0, - 'opcountersRepl.update' => 0 + 'metrics.ttl.passes' => 18 ) end end