SlideShare a Scribd company logo
1 of 75
Download to read offline
Graphite:
An Introduction
Scaling real-time monitoring
The purpose today
What is graphite
Why it’s so great
How to graph
(It’s really easy!)
How we use graphite
First, a definition
Alerts+Metrics=Monitoring
Graphite
Cacti
Munin
Nagios
Icinga
Both
Zenoss
Hyperic
Zabbix
PNP4Nagios
Alerting
Metrics
What is graphite
About graphite
● Django web application consisting of 3 parts:
○ carbon (relays, caches, aggregates metrics)
○ whisper (graphite’s equivalent of RRD files)
○ Web UI (graph composer, simple dashboard)
Why graphite?
Why graphing?
Discover trends and patterns
What time of the day do we get the most users?
When x happened, what was the effect on y?
How many hits am I getting per hour?
How does this compare to last week? last month?
Predict future events
When will we need to add more servers? Databases?
Negative feedback
Did the release into production fix problem x?
Cacti SUCKS
A few reasons:
Ancient user interface (no javascript/ajax), terrible workflow, cannot push metrics, no
formulas, no graph introspection, cannot push metrics, cannot feed out of sequence
metrics, ugly graphs, no API, expose system/os metrics on host via snmp, no graph
composer, no custom graphs, predefine metrics, predefine graphs, static polling interval,
unscalable, tons of work to create one graph, no 3rd party ecosystem, etc.
Graphite ++
Simple
Powerful
Functions
(sum, derivatives, integrals, timeshift, mostDeviant, scale,
averages, etc.)
API
(Nagios integration, 3rd party custom dashboards)
Scalable
Easy to feed data
Wide ecosystem of 3rd party
tools and dashboards
http://graphite.readthedocs.org/en/latest/tools.html
Tools
StatsD
Logster
Skyline
Collectd
Dashboards
Graphite --
No poller
No all in one solution
No easy backups
It probably will become
business critical
How to graph
There are tons of ways to
feed graphite your data
Bash
#!/bin/bash
timestamp = `date +%s`
value = 10
echo "dot.delimited.metric.name $value $timestamp" | nc -w 1 graphite.
host.name 2003
Python
def send_msg(message, HOST, PORT):
sock = socket.create_connection((HOST, PORT))
sock.send(message)
sock.close()
Python using graphite-pymetrics
from metrics import timing
@timing("heavy.task")
def heavy_task( x, y, z):
# do heavy stuff here
Ruby
require 'socket'
Host = 'somegraphitehost'
conn = TCPSocket.new Host, 2003
conn.puts 'Metrics value timestamp'
conn.close
Java
import java.io.DataOutputStream;
import java.net.Socket;
Socket conn = new Socket("somegraphitehost" , 2003);
DataOutputStream dos = new DataOutputStream(conn .getOutputStream());
dos.writeBytes("metrics value timestamp" );
conn.close();
How we use graphite
700K + metrics per minute
A Common Graphite Stack
Graphite-web
Collectd
Poller(s)
Applications
Carbon Whisper
Dashboards
Statsd
Scripts
Nagios
Collectd
Agent for system/hardware level metrics
Growing repository of plugins for a wide variety
of applications:
disk i/o, disk space, cpu, memory, mysql,
JMX, java, Redis, file sizes, load, etc.
https://collectd.org/wiki/index.php/Table_of_Plugins
Write your custom plugin in python
Nagios integration
You can write Nagios plugins that can alert off
of metrics values
Nagios can also feed graphite
performance data, events (ie: update
counter each time email is sent), etc.
What to collect?
Hardware/OS metrics
Load
Disk space
Disk I/O
Network data
Application metrics
How often function x is called
Average value of function x
Average running time of
function x
Database/Datastore
performance metrics
number of records with
value == ?
number of slow queries
Events
Deployments
send a 1, draw as infinite
Log files
http access logs
(2xx, 3xx, 4xx, 5xx)
Application logs
Exception counts, results, important events, hits
Final Musings
Treat graphite like ‘Big Data’
You don’t know what metrics
you need until you need it
Get Raid 10 SSD’s once you
decide to scale
More devopsy
You can start graphing today!

More Related Content

What's hot

empirical analysis modeling of power dissipation control in internet data ce...
 empirical analysis modeling of power dissipation control in internet data ce... empirical analysis modeling of power dissipation control in internet data ce...
empirical analysis modeling of power dissipation control in internet data ce...
saadjamil31
 

What's hot (20)

The next generation of the Montage image mosaic engine
The next generation of the Montage image mosaic engineThe next generation of the Montage image mosaic engine
The next generation of the Montage image mosaic engine
 
empirical analysis modeling of power dissipation control in internet data ce...
 empirical analysis modeling of power dissipation control in internet data ce... empirical analysis modeling of power dissipation control in internet data ce...
empirical analysis modeling of power dissipation control in internet data ce...
 
Highly Available Graphite
Highly Available GraphiteHighly Available Graphite
Highly Available Graphite
 
Fall in Love with Graphs and Metrics using Grafana
Fall in Love with Graphs and Metrics using GrafanaFall in Love with Graphs and Metrics using Grafana
Fall in Love with Graphs and Metrics using Grafana
 
Zentral QueryCon 2018
Zentral QueryCon 2018Zentral QueryCon 2018
Zentral QueryCon 2018
 
Stream Processing Live Traffic Data with Kafka Streams
Stream Processing Live Traffic Data with Kafka StreamsStream Processing Live Traffic Data with Kafka Streams
Stream Processing Live Traffic Data with Kafka Streams
 
Scalable real-time processing techniques
Scalable real-time processing techniquesScalable real-time processing techniques
Scalable real-time processing techniques
 
Druid + Superset (資料的快速通道)
Druid + Superset (資料的快速通道)Druid + Superset (資料的快速通道)
Druid + Superset (資料的快速通道)
 
Slack in the Age of Prometheus
Slack in the Age of PrometheusSlack in the Age of Prometheus
Slack in the Age of Prometheus
 
Paris DataGeek - SummingBird
Paris DataGeek - SummingBirdParis DataGeek - SummingBird
Paris DataGeek - SummingBird
 
Airflow - a data flow engine
Airflow - a data flow engineAirflow - a data flow engine
Airflow - a data flow engine
 
Care and Feeding of Large Scale Graphite Installations - DevOpsDays Austin 2013
Care and Feeding of Large Scale Graphite Installations - DevOpsDays Austin 2013Care and Feeding of Large Scale Graphite Installations - DevOpsDays Austin 2013
Care and Feeding of Large Scale Graphite Installations - DevOpsDays Austin 2013
 
(CMP310) Data Processing Pipelines Using Containers & Spot Instances
(CMP310) Data Processing Pipelines Using Containers & Spot Instances(CMP310) Data Processing Pipelines Using Containers & Spot Instances
(CMP310) Data Processing Pipelines Using Containers & Spot Instances
 
Dato vs GraphX
Dato vs GraphXDato vs GraphX
Dato vs GraphX
 
Google Cloud Dataflow meets TensorFlow
Google Cloud Dataflow meets TensorFlowGoogle Cloud Dataflow meets TensorFlow
Google Cloud Dataflow meets TensorFlow
 
Intro to Airflow: Goodbye Cron, Welcome scheduled workflow management
Intro to Airflow: Goodbye Cron, Welcome scheduled workflow managementIntro to Airflow: Goodbye Cron, Welcome scheduled workflow management
Intro to Airflow: Goodbye Cron, Welcome scheduled workflow management
 
Managing data workflows with Luigi
Managing data workflows with LuigiManaging data workflows with Luigi
Managing data workflows with Luigi
 
Airflow introduction
Airflow introductionAirflow introduction
Airflow introduction
 
Business Dashboards using Bonobo ETL, Grafana and Apache Airflow
Business Dashboards using Bonobo ETL, Grafana and Apache AirflowBusiness Dashboards using Bonobo ETL, Grafana and Apache Airflow
Business Dashboards using Bonobo ETL, Grafana and Apache Airflow
 
Workflow Engines + Luigi
Workflow Engines + LuigiWorkflow Engines + Luigi
Workflow Engines + Luigi
 

Viewers also liked

Carbon and its compounds
Carbon and its compoundsCarbon and its compounds
Carbon and its compounds
Nikhil Gupta
 
Chemistry - Graphite Model
Chemistry - Graphite ModelChemistry - Graphite Model
Chemistry - Graphite Model
Kiy A Graham
 
Propeller making process finnscrew
Propeller making process   finnscrewPropeller making process   finnscrew
Propeller making process finnscrew
Mohd Syahmi Nuruddin
 

Viewers also liked (20)

Diamond & Graphite
Diamond & GraphiteDiamond & Graphite
Diamond & Graphite
 
Flake Graphite: Supply, Demand, Prices - GMP Securities
Flake Graphite: Supply, Demand, Prices - GMP SecuritiesFlake Graphite: Supply, Demand, Prices - GMP Securities
Flake Graphite: Supply, Demand, Prices - GMP Securities
 
Carbon and its compounds
Carbon and its compoundsCarbon and its compounds
Carbon and its compounds
 
Practical resource monitoring with munin (English editon)
Practical resource monitoring with munin  (English editon)Practical resource monitoring with munin  (English editon)
Practical resource monitoring with munin (English editon)
 
Vigor overview for propeller club 06 2011
Vigor overview for propeller club 06 2011Vigor overview for propeller club 06 2011
Vigor overview for propeller club 06 2011
 
Increasing Washington's International Competitiveness - Seattle Propeller Club
Increasing Washington's International Competitiveness  - Seattle Propeller ClubIncreasing Washington's International Competitiveness  - Seattle Propeller Club
Increasing Washington's International Competitiveness - Seattle Propeller Club
 
Propeller Diameter & Pitch - Choosing the right prop for your boat
Propeller Diameter & Pitch - Choosing the right prop for your boatPropeller Diameter & Pitch - Choosing the right prop for your boat
Propeller Diameter & Pitch - Choosing the right prop for your boat
 
Graphite
GraphiteGraphite
Graphite
 
Leonardo da vinci, propeller and our invention
Leonardo da vinci, propeller and our inventionLeonardo da vinci, propeller and our invention
Leonardo da vinci, propeller and our invention
 
Chemistry - Graphite Model
Chemistry - Graphite ModelChemistry - Graphite Model
Chemistry - Graphite Model
 
2015 Investor Day - Graphite Presentation
2015 Investor Day - Graphite Presentation2015 Investor Day - Graphite Presentation
2015 Investor Day - Graphite Presentation
 
Graphite Availability and Market Requirements by Fabrizio Corti
Graphite Availability and Market Requirements by Fabrizio CortiGraphite Availability and Market Requirements by Fabrizio Corti
Graphite Availability and Market Requirements by Fabrizio Corti
 
Design & Analysis of Composite Propeller Shaft
Design & Analysis of Composite Propeller ShaftDesign & Analysis of Composite Propeller Shaft
Design & Analysis of Composite Propeller Shaft
 
Marine Propulsion
Marine PropulsionMarine Propulsion
Marine Propulsion
 
Carbon and its structure
Carbon and its structureCarbon and its structure
Carbon and its structure
 
Developing Markets for Natural Graphite by George C Hawley
Developing Markets for Natural Graphite by George C HawleyDeveloping Markets for Natural Graphite by George C Hawley
Developing Markets for Natural Graphite by George C Hawley
 
Propeller making process finnscrew
Propeller making process   finnscrewPropeller making process   finnscrew
Propeller making process finnscrew
 
2016 International Lithium & Graphite Conference
 2016 International Lithium & Graphite Conference 2016 International Lithium & Graphite Conference
2016 International Lithium & Graphite Conference
 
Synthesis and Characterisation of Copper Oxide nanoparticles
Synthesis and Characterisation of Copper Oxide nanoparticlesSynthesis and Characterisation of Copper Oxide nanoparticles
Synthesis and Characterisation of Copper Oxide nanoparticles
 
The history of Prometheus at SoundCloud
The history of Prometheus at SoundCloudThe history of Prometheus at SoundCloud
The history of Prometheus at SoundCloud
 

Similar to Graphite, an introduction

Flink Forward San Francisco 2019: Streaming your Lyft Ride Prices - Thomas We...
Flink Forward San Francisco 2019: Streaming your Lyft Ride Prices - Thomas We...Flink Forward San Francisco 2019: Streaming your Lyft Ride Prices - Thomas We...
Flink Forward San Francisco 2019: Streaming your Lyft Ride Prices - Thomas We...
Flink Forward
 
Flink Forward San Francisco 2019: Streaming your Lyft Ride Prices - Thomas We...
Flink Forward San Francisco 2019: Streaming your Lyft Ride Prices - Thomas We...Flink Forward San Francisco 2019: Streaming your Lyft Ride Prices - Thomas We...
Flink Forward San Francisco 2019: Streaming your Lyft Ride Prices - Thomas We...
Flink Forward
 
Блохин Леонид - "Mist, как часть Hydrosphere"
Блохин Леонид - "Mist, как часть Hydrosphere"Блохин Леонид - "Mist, как часть Hydrosphere"
Блохин Леонид - "Mist, как часть Hydrosphere"
Provectus
 

Similar to Graphite, an introduction (20)

Python and trending_data_ops
Python and trending_data_opsPython and trending_data_ops
Python and trending_data_ops
 
Deduplicating and analysing time-series data with Apache Beam and QuestDB
Deduplicating and analysing time-series data with Apache Beam and QuestDBDeduplicating and analysing time-series data with Apache Beam and QuestDB
Deduplicating and analysing time-series data with Apache Beam and QuestDB
 
GDG Devfest 2019 - Build go kit microservices at kubernetes with ease
GDG Devfest 2019 - Build go kit microservices at kubernetes with easeGDG Devfest 2019 - Build go kit microservices at kubernetes with ease
GDG Devfest 2019 - Build go kit microservices at kubernetes with ease
 
The magic behind your Lyft ride prices: A case study on machine learning and ...
The magic behind your Lyft ride prices: A case study on machine learning and ...The magic behind your Lyft ride prices: A case study on machine learning and ...
The magic behind your Lyft ride prices: A case study on machine learning and ...
 
LSPE Meetup talk on Graphite
LSPE Meetup talk on GraphiteLSPE Meetup talk on Graphite
LSPE Meetup talk on Graphite
 
Observability and Product Release
Observability and Product ReleaseObservability and Product Release
Observability and Product Release
 
Building the IoT - Coding Serbia 2015
Building the IoT - Coding Serbia 2015Building the IoT - Coding Serbia 2015
Building the IoT - Coding Serbia 2015
 
Visual Network Analysis
Visual Network AnalysisVisual Network Analysis
Visual Network Analysis
 
Timelapse: interactive record/replay for the web
Timelapse: interactive record/replay for the webTimelapse: interactive record/replay for the web
Timelapse: interactive record/replay for the web
 
Streaming your Lyft Ride Prices - Flink Forward SF 2019
Streaming your Lyft Ride Prices - Flink Forward SF 2019Streaming your Lyft Ride Prices - Flink Forward SF 2019
Streaming your Lyft Ride Prices - Flink Forward SF 2019
 
Flink Forward San Francisco 2019: Streaming your Lyft Ride Prices - Thomas We...
Flink Forward San Francisco 2019: Streaming your Lyft Ride Prices - Thomas We...Flink Forward San Francisco 2019: Streaming your Lyft Ride Prices - Thomas We...
Flink Forward San Francisco 2019: Streaming your Lyft Ride Prices - Thomas We...
 
Flink Forward San Francisco 2019: Streaming your Lyft Ride Prices - Thomas We...
Flink Forward San Francisco 2019: Streaming your Lyft Ride Prices - Thomas We...Flink Forward San Francisco 2019: Streaming your Lyft Ride Prices - Thomas We...
Flink Forward San Francisco 2019: Streaming your Lyft Ride Prices - Thomas We...
 
Make It Fast - Using Modern Browser Performance APIs to Monitor and Improve t...
Make It Fast - Using Modern Browser Performance APIs to Monitor and Improve t...Make It Fast - Using Modern Browser Performance APIs to Monitor and Improve t...
Make It Fast - Using Modern Browser Performance APIs to Monitor and Improve t...
 
HTML5 - Daha Flash bir web?
HTML5 - Daha Flash bir web?HTML5 - Daha Flash bir web?
HTML5 - Daha Flash bir web?
 
State of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open SourceState of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open Source
 
Abusing JavaScript to Measure Web Performance
Abusing JavaScript to Measure Web PerformanceAbusing JavaScript to Measure Web Performance
Abusing JavaScript to Measure Web Performance
 
BASTA 2020 VS Code Data Visualisation
BASTA 2020 VS Code Data VisualisationBASTA 2020 VS Code Data Visualisation
BASTA 2020 VS Code Data Visualisation
 
A More Flash Like Web?
A More Flash Like Web?A More Flash Like Web?
A More Flash Like Web?
 
Блохин Леонид - "Mist, как часть Hydrosphere"
Блохин Леонид - "Mist, как часть Hydrosphere"Блохин Леонид - "Mist, как часть Hydrosphere"
Блохин Леонид - "Mist, как часть Hydrosphere"
 
C++ Coroutines
C++ CoroutinesC++ Coroutines
C++ Coroutines
 

Recently uploaded

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software Engineering
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 

Graphite, an introduction