Skip to content

Commit

Permalink
[mongo] Add WiredTiger metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben McCann committed Aug 14, 2015
1 parent 3fb1653 commit 79fae99
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
17 changes: 17 additions & 0 deletions checks.d/mongo.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,23 @@ class MongoDb(AgentCheck):
"metrics.repl.buffer.count",
"metrics.repl.buffer.maxSizeBytes",
"metrics.repl.buffer.sizeBytes",

"wiredTiger.cache.maximum bytes configured",
"wiredTiger.cache.bytes read into cache",
"wiredTiger.cache.pages evicted by application threads",
"wiredTiger.cache.pages evicted because they exceeded the in-memory maximum",
"wiredTiger.cache.failed eviction of pages that exceeded the in-memory maximum",
"wiredTiger.cache.maximum page size at eviction",
"wiredTiger.cache.in-memory page splits",
"wiredTiger.cache.pages read into cache",
"wiredTiger.session.open cursor count",
"wiredTiger.session.open session count",
"wiredTiger.concurrentTransactions.write.out",
"wiredTiger.concurrentTransactions.write.available",
"wiredTiger.concurrentTransactions.write.totalTickets"
"wiredTiger.concurrentTransactions.read.out",
"wiredTiger.concurrentTransactions.read.available",
"wiredTiger.concurrentTransactions.read.totalTickets",
]

RATES = [
Expand Down
4 changes: 2 additions & 2 deletions checks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def normalize(self, metric, prefix=None):
"""Turn a metric into a well-formed metric name
prefix.b.c
"""
name = re.sub(r"[,\+\*\-/()\[\]{}]", "_", metric)
name = re.sub(r"[,\+\*\-/()\[\]{}\s]", "_", metric)
# Eliminate multiple _
name = re.sub(r"__+", "_", name)
# Don't start/end with _
Expand Down Expand Up @@ -759,7 +759,7 @@ def normalize(self, metric, prefix=None, fix_case=False):
if prefix is not None:
prefix = self.convert_to_underscore_separated(prefix)
else:
name = re.sub(r"[,\+\*\-/()\[\]{}]", "_", metric)
name = re.sub(r"[,\+\*\-/()\[\]{}\s]", "_", metric)
# Eliminate multiple _
name = re.sub(r"__+", "_", name)
# Don't start/end with _
Expand Down

0 comments on commit 79fae99

Please sign in to comment.