Talk about using Ganglia and other tools for storing all kinds of web application metrics for both operations and business purposes. Presented at Cambridge Geek Night
1. Collecting Metrics
With Ganglia and Friends
Cambridge Geek Night 28th March 2011
gareth rushgrove | morethanseven.net http://www.flickr.com/photos/memestate/45986749
6. - Capacity planning metrics
- Metrics for your application
- Business analytics
- Having everything in one place
Covering (Business Version)
gareth rushgrove | morethanseven.net
7. - Ganglia Store metrics and view graphs
- Logster Get log files into Ganglia
- Gmetric Get anything into Ganglia
- Syslog Using Loggly to view individual log items
Covering (Tech Version)
gareth rushgrove | morethanseven.net
10. “Ganglia is a scalable distributed monitoring
system for high-performance computing
systems such as clusters and Grids.
ganglia.sourceforge.net
What is Ganglia?
gareth rushgrove | morethanseven.net
16. “A strategy for anticipating future workloads
of your computers, with the aim of creating
a computing environment that can handle
future workload
IBM
Predicting When Your System Will Fail
gareth rushgrove | morethanseven.net
21. Tail a log file and filter each line to generate metrics that can be sent to
common monitoring packages.
Options:
-p METRIC_PREFIX, --metric-prefix=METRIC_PREFIX
Add prefix to all published metrics. This is for
people that may multiple instances of same service on
same host.
--gmetric-options=GMETRIC_OPTIONS
Options to pass to gmetric such as -d 180 -c
/etc/ganglia/gmond.conf (default). These are passed
directly to gmetric.
--graphite-host=GRAPHITE_HOST
Hostname and port for Graphite collector, e.g.
graphite.example.com:2003
-s STATE_DIR, --state-dir=STATE_DIR
Where to store the logtail state file. Default
location /var/run
-d, --dry-run Parse the log file but send stats to standard output.
-D, --debug Provide more verbose logging for debugging.
Logster
gareth rushgrove | morethanseven.net
24. The Ganglia Metric Client (gmetric) announces a metric
on the list of defined send channels defined in a configuration file
Usage: gmetric [OPTIONS]...
-V, --version Print version and exit
-c, --conf=STRING The configuration file to use for finding send channels
(default='/etc/ganglia/gmond.conf')
-n, --name=STRING Name of the metric
-v, --value=STRING Value of the metric
-t, --type=STRING Either
string|int8|uint8|int16|uint16|int32|uint32|float|double
-u, --units=STRING Unit of measure for the value e.g. Kilobytes, Celcius
(default='')
-s, --slope=STRING Either zero|positive|negative|both (default='both')
-x, --tmax=INT The maximum time in seconds between gmetric calls
(default='60')
-d, --dmax=INT The lifetime in seconds of this metric (default='0')
-S, --spoof=STRING IP address and name of host/device (colon separated) we
are spoofing (default='')
-H, --heartbeat spoof a heartbeat message (use with spoof option)
Gmetric
gareth rushgrove | morethanseven.net
25. Gmetric Scripts for Common Applications
gareth rushgrove | morethanseven.net
32. “Syslog is a standard for logging program
messages. It allows separation of the
software that generates messages from the
system that stores them and the software
that reports and analyzes them.
Wikipedia
Syslog
gareth rushgrove | morethanseven.net
33. Loggly - Logging as a Service
gareth rushgrove | morethanseven.net
37. - Database table sizes
- Cache hits
- Time taken for test runs
- Codebase size
- Signups, sales, subscriptions
- Twitter followers
Other Things You Could Monitor
gareth rushgrove | morethanseven.net
38. - Wikipedia http://ganglia.wikimedia.org/
- Install Ganglia deb and rpm packages available
- Add system metrics web servers, databases
- Add business metrics users, sales, tweets
- Try Loggly or at least investigate syslog
What Next?
gareth rushgrove | morethanseven.net