Doug Bell Chicago Perl Mongers
CPU, Memory, I/O
Active users, Cache misses, Database writes
Security prices, Rates
Yes, I know where I am 🐍
Networking and Stuff
Database
Data visualizer
Just run more Carbon daemons
pip pip
pip install carbon pip install whisper pip install graphite-web
I 💔⛔️☠☹ Python's Toolchain
😍 Grafana is much, much nicer
modem.ef67abc19.bandwidth.upload modem.ef67abc19.bandwidth.download
modem.ef67abc19.bandwidth.upload modem/ef67abc19/bandwidth/upload.wsp
storage-schemas.conf
[default] pattern = .* retentions = 5m:3d
[bandwidth] pattern = [.]bandwidth[.] retentions = 5m:7d,1d:1y,7d:50y
Older data is less precise
Finally, some 🐪!
# <stat> <value> <timestamp> modem.ef67abc19.bandwidth.upload 6000 1454019615
use IO::Socket::IP; my $sock = IO::Socket::IP->new( PeerHost => 'localhost', PeerPort => 2003, );
print { $sock } "modem.ef67abc19.bandwidth.upload 6000 1454019615\n" or warn "Couldn't write: $!";
# <output> (<interval>) = <input> modem.all.bandwidth.<ud> (60) = modem.<id>.bandwidth.<ud>
Configured in storage-schemas.conf
💖 Better Data Visualizer!
Scale vertically
How much to hold in memory
Writes to disk
carbon-relay.py
Scale horizontally
[cache:a] LINE_RECEIVER_PORT = 2103 PICKLE_RECEIVER_PORT = 2104 CACHE_QUERY_PORT = 7102 [cache:b] LINE_RECEIVER_PORT = 2203 PICKLE_RECEIVER_PORT = 2204 CACHE_QUERY_PORT = 7202
[relay] LINE_RECEIVER_INTERFACE = 0.0.0.0 LINE_RECEIVER_PORT = 2003 PICKLE_RECEIVER_INTERFACE = 0.0.0.0 PICKLE_RECEIVER_PORT = 2014 RELAY_METHOD = consistent-hashing DESTINATIONS = 127.0.0.1:2104:a, 127.0.0.1:2204:b
Only carbon-relay.py
carbon-relay.py and carbon-cache.py Max iostat
Slides: http://github.com/preaction/Collecting-Metrics-With-Graphite/