Created
September 5, 2012 22:12
-
-
Save davisp/3646035 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/cookbooks/collectd/files/default/dbcore b/cookbooks/collectd/files/default/dbcore | |
index f4863da..2d6828e 100644 | |
--- a/cookbooks/collectd/files/default/dbcore | |
+++ b/cookbooks/collectd/files/default/dbcore | |
@@ -85,6 +85,23 @@ def system(address, fqdn): | |
for k, v in info.iteritems(): | |
fmt = (base, name, k, timestamp, v) | |
print '%s.packet_distribution.%s.%s %s:%s' % fmt | |
+ elif stat == "disk_queues": | |
+ for k in ("compaction", "low", "replicator"): | |
+ fmt = (base, stat, k, timestamp, value.get(k, 0)) | |
+ print '%s.%s.%s %s:%s' % fmt | |
+ totals = { | |
+ "interacive_reads": 0, | |
+ "interactive_writes": 0, | |
+ "view_updates": 0 | |
+ } | |
+ for channel in value["channels"].values(): | |
+ totals["interactive_reads"] += channel[0] | |
+ totals["interactive_writse"] += channel[1] | |
+ totals["view_updates"] += channel[2] | |
+ for k in totals: | |
+ fmt = (base, stat, k, timestamp, totals[k]) | |
+ print "%s.%s.%s %s:%s" % fmt | |
+ | |
def stats(address, fqdn): | |
base = 'PUTVAL %s/cloudant/current-couchdb' % fqdn |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment