You are previewing Monitoring with Graphite.
O'Reilly logo
Monitoring with Graphite

Book Description

Why is Graphite one of the most popular tools for monitoring and graphing the performance of computer systems? This practical book helps you use this open source tool to track the operational data you need to monitor your systems and track application-level metrics for profiling your services. You’ll learn how to correlate all of that data with business intelligence to help you make informed decisions about your IT strategies.

Table of Contents

  1. Preface
    1. Who Should Read This Book
    2. Why I Wrote This Book
    3. A Word on Monitoring Today
    4. Navigating This Book
    5. Online Resources
    6. Conventions Used in This Book
    7. Safari® Books Online
    8. How to Contact Us
    9. Acknowledgments
  2. 1. What is Graphite?
    1. What is time series data?
    2. Time-Series Databases
      1. Storage Considerations
      2. Prioritizing Operations
    3. What is the history of Graphite?
    4. What makes Graphite unique?
      1. Simple Metrics Format
      2. Graphing API
      3. Rapid Prototyping
      4. Rich Statistical Library
      5. Chained Functions
    5. Case Studies: Who uses Graphite in production?
      1. Booking.com
      2. GitHub
      3. Etsy
      4. Electronic Arts
    6. Why should I use Graphite?
  3. 2. Monitoring Conventions
    1. Three Tenets of Monitoring
      1. Fault Detection
      2. Alerting
      3. Capacity Planning
    2. Rethinking the Poll/Pull Model
      1. Pull Model
      2. Push Model
    3. Where does Graphite Fit into the Picture?
    4. Composable Monitoring Systems
      1. Telemetry
      2. Metrics Router
      3. Aggregation
      4. State Engine
      5. Notification Routers
      6. Storage Engine
      7. Visualization
    5. Conclusion
  4. 3. Graphite Components: The Moving Parts
    1. Carbon
      1. carbon-cache
      2. carbon-relay
      3. carbon-aggregator
      4. Filtering Metrics
      5. Internal Statistics
      6. Network Security Considerations
    2. Whisper
      1. How do Whisper files get created?
      2. Retention Policies and Archives
      3. The Laws of Whisper Archives
      4. Calculating Whisper file sizes
      5. Deconstructing a Whisper file
      6. Which archive handles my query?
      7. Aggregation Methods
      8. xFilesFactor
      9. Planning Your Namespaces
      10. Performance Considerations
    3. Graphite-Web
      1. Django Framework
      2. Webserver
      3. Database
      4. Memcached
      5. Events
      6. Storage Backends
    4. Putting it all together
      1. Basic Setup
      2. Vertical Scaling
      3. Horizontal Scaling
      4. Multi-Site Replication
    5. A Final Thought
  5. 4. Building Your First Graphite Server
    1. Installation
      1. Are there containers or images already available?
      2. Where does Graphite store all my files?
      3. Are packages available for my distro?
      4. What installation methods are available?
      5. Should I use Virtualenv?
      6. Using sudo effectively
      7. Dependencies
      8. Installing from Source
    2. Preparing your web database
    3. Configuring Carbon
      1. carbon.conf
      2. storage-schemas.conf
      3. storage-aggregation.conf
      4. Some final preparations
      5. Starting your Carbon daemons
    4. Configuring Graphite-Web
      1. local_settings.py
      2. Setting up Apache
    5. Verifying your Graphite installation
      1. Carbon Statistics
      2. Feeding new data to Carbon
      3. Building your first graph
  6. 5. The Graphite User Interface
    1. Finding Metrics
      1. Navigating the Tree
      2. Using the Search feature
      3. Working smarter with the Auto-Completer
      4. Wildcards
    2. The Graphite Composer window
    3. The Embedded Chart
    4. The Toolbar
      1. Selecting Recent Data
      2. Refreshing the Graph
      3. Selecting a Date Range
      4. Exporting a Short URL
      5. Loading a Graph from URL
      6. Saving to My Graphs
      7. Deleting from My Graphs
    5. The Graph Options menu
      1. Adding a Graph Title
      2. Overriding the Graph Legend
      3. Toggling Axes and the Grid
      4. Applying a Graph Template
      5. Line Chart Modes
      6. Area and Stacked Graphs
      7. Tweaking the Y-Axis
    6. The Graph Data dialog
      1. What are Targets anyways?
      2. Building a Carbon Performance graph
    7. Sharing your work
  7. 6. The Render API
    1. Working with Functions
      1. Starting With the Basics
      2. Math and Statistical Transforms
      3. Filtering and Sorting
      4. Grouping on Wildcards
      5. Comparing and Smoothing Series
    2. Custom Display Formats
    3. Alerting with Graphite
  8. 7. Dashboards
    1. Why do I need a dashboard?
    2. Graphite Dashboard
    3. Third-party dashboards
      1. Grafana
      2. Tasseo
      3. Dusk
    4. Do-It-Yourself
      1. Dashing
      2. Rickshaw and D3.js
    5. Conclusion
  9. 8. Troubleshooting Graphite Performance
    1. First, the Basics
    2. The Troubleshooting Toolbelt
      1. Generating Metrics and Benchmarking
      2. CPU Utilization
      3. Disk Performance (I/O)
      4. Networking
      5. Inspecting Metrics
    3. Configuration Settings
      1. Carbon
      2. Graphite-Web
    4. Logging
      1. Carbon
      2. Graphite-Web
      3. Kernel messages
    5. Failure Scenarios
      1. The Full Disk
      2. CPU Saturation
      3. Rendering Problems
    6. Taking it to the next level
  10. 9. Scaling Graphite
    1. What makes it “hard” to scale Graphite?
    2. Peter’s Graphite Story
      1. The Beginning
      2. The Pains of Popularity
      3. Clearing the Next Hurdle
      4. Try, Try Again
      5. Maximizing Resources
      6. Avoiding Outages
      7. Shared Web Database
      8. Scaling in Both Directions
    3. Some Final Thoughts
  11. 10. Appendix D - Carbon and Graphite-Web Internal Statistics
    1. Carbon
      1. common to all Carbon types
      2. carbon-cache
      3. carbon-relay
      4. carbon-aggregator
    2. Graphite-Web