Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dustin/statcap
Memcached stat capture/logging tool.
https://github.com/dustin/statcap
Last synced: 3 days ago
JSON representation
Memcached stat capture/logging tool.
- Host: GitHub
- URL: https://github.com/dustin/statcap
- Owner: dustin
- Created: 2012-02-18T21:21:04.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2012-11-01T07:14:50.000Z (about 12 years ago)
- Last Synced: 2024-11-11T13:06:50.490Z (about 1 month ago)
- Language: Go
- Homepage:
- Size: 145 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
# Capture memcached Stats
There are millions of these things, and I've written several myself.
This is another one.The purpose of this tool is to capture stats from a
memcached/membase/couchbase node and store them into a CouchDB for
offline analysis. This is suitable for unattended operation at a
customer site reporting back home.# Usage
Usage of ./statcap:
-out="http://localhost:5984/stats": http://couch.db/path or a /file/path
-proto="": Proto document, into which timings stats will be added
-server="localhost:11211": memcached server to connect to
-sleep=5: Sleep time between samples
-stats="timings,kvtimings": stats to fetch beyond toplevel; comma separatedMost of the usage should be obvious, but I'll add even more
description here so people know what's up.## Out
Where to send the output. This can be a URL to a CouchDB, or a file
path where a stream of gzipped JSON docs will be written.CouchDB supports basic auth, so you can do something like this:
./statscap -out=http://myuser:[email protected]/secretdb
or a plain file:
./statscap -out=file.gz
## Proto
This one probably needs the most explanation, but the rationale is
pretty straightforward: I want to be able to log additional
properties along with the stat snapshots so I can aggregate the
records more easily.In order to do this, I supply a JSON document prototype that has a
bunch of properties, and then build the stats on top of it. For
example:{
"customer": "enterprise rent a bar",
"mission_date": "2012-02-18T13:30:00",
"attempt": 382
}Those properties will now appear in the final documents.
If your proto document includes properties that match the names of
stats you're capturing, the stats will win. Don't do that and expect
otherwise.## Server
The memcached server to talk to. Binary protocol only and no auth
support currently.## Sleep
How long (in seconds) to wait between samples.
## Stats
The toplevel stats are always captured and stored as "`all`".
You can specify additional stats to grab here. The default list
includes some I care about right now and might change in the future.