Skip to content

Instantly share code, notes, and snippets.

@frsyuki
Created October 10, 2011 08:09
Show Gist options
  • Save frsyuki/1274846 to your computer and use it in GitHub Desktop.
Save frsyuki/1274846 to your computer and use it in GitHub Desktop.
<match ...>
type metrics
key ...
tag metrics.mongo
</match>
<match metrics.mongo>
type mongo_incr
host
port
collection
</match>
class MongoIncrOutput < MongoOutput
def format
end
def write(chunk)
chunk.each {|key,val|
@collection.incr(key, value)
}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment