SlideShare uma empresa Scribd logo
1 de 66
Baixar para ler offline
Cyrille Le Clerc
Open Source Monitoring for Java with Graphite
Wednesday, May 15, 13
Speaker
Cyrille Le Clerc
@cyrilleleclerc
Open Source
CTO
DevOps, Infra as Code
Solution Architect
Cloud
Wednesday, May 15, 13
You ?
DEV ? QA ? OPS ?
Monitoring Experience ?
Wednesday, May 15, 13
Agenda
Wednesday, May 15, 13
Agenda
• The demo application
• Monitoring performance: Why ? What ?
• Java webapp monitoring with JMX
• Monitoring with Graphite
• Conclusion
Wednesday, May 15, 13
The Application
Wednesday, May 15, 13
Your mission, should you decide to accept it, ...
Setup technical and business monitoring
e-commerce SOS Cocktails
http://www.flickr.com/photos/23791504@N08/2607814349
Wednesday, May 15, 13
SOS Cocktail
Wednesday, May 15, 13
Monitoring application performance
Why ? What ?
Wednesday, May 15, 13
The Indicators to Monitor
Wednesday, May 15, 13
The Indicators to Monitor
• Operating System ➔ Sysload
• JVM ➔ GC duration
• Tomcat ➔ activeSessions (active visitors)
• Application ➔ sales revenue & items
Wednesday, May 15, 13
Open Source Monitoring for Java
Wednesday, May 15, 13
Open Source Monitoring for Java
e-commerce web site
Graphite
Seyren
Dashboard - wiki
Nagios
Email
Wednesday, May 15, 13
JMX & Metrics
Wednesday, May 15, 13
Why JMX ?
• JMX vs. web pages vs. logs vs. ...
• Simple and secured
• Displayable with web pages and logs
• Alternatives to JMX ?
Wednesday, May 15, 13
JMX vs. logs vs. web pages vs. ...
• Monitoring logs
• Parsing GB of text files ?
• Per invocation details vs. average per minute
• Web pages
• History ?
• Clustered applications ?
• Security ?
Wednesday, May 15, 13
JMX with Spring Framework
<beans	
  ...>
	
  	
  	
  ...
	
  	
  	
  <context:mbean-­‐export/>
	
  	
  	
  ...
</beans> @ManagedResource("cocktail:name=ShoppingCartController,type=...")
class	
  ShoppingCartController	
  {
	
  	
  	
  	
  
	
  final	
  AtomicInteger	
  revenueInCentsCounter	
  =	
  new	
  AtomicInteger();
	
  void	
  purchase(...){
	
  	
  	
  ...
	
  	
  	
  revenueInCentsCounter.addAndGet(priceInCents);
	
  }
	
  @ManagedAttribute
	
  public	
  int	
  getRevenueInCentsCounter()	
  {
	
  	
  return	
  revenueInCentsCounter.get();
	
  }
	
  	
  	
  	
  
Wednesday, May 15, 13
JMX with VisualVM
Wednesday, May 15, 13
JMX with JSP
$	
  curl	
  http://demo-­‐cocktail.jmxtrans.cloudbees.net/5ADrUWr5/jmx-­‐sales-­‐metrics.txt.jsp
Epoch	
   SalesRevenueInCentsCounter	
   SalesItemsCounter	
   SalesOrdersCounter
1363217376	
   4500	
   7	
   2
curl	
  http://demo-­‐cocktail.jmxtrans.cloudbees.net/5ADrUWr5/...
{
	
  	
  "Epoch":1363217653,
	
  	
  "SalesRevenueInCentsCounter":4050,
	
  	
  "SalesItemsCounter":7,	
  ...
}http://demo-cocktail.jmxtrans.cloudbees.net/jmx.jsp
Human readable & script friendly
Watch out for security !
Wednesday, May 15, 13
JMX with JSP
$	
  curl	
  http://demo-­‐cocktail.jmxtrans.cloudbees.net/5ADrUWr5/jmx-­‐sales-­‐metrics.txt.jsp
Epoch	
   SalesRevenueInCentsCounter	
   SalesItemsCounter	
   SalesOrdersCounter
1363217376	
   4500	
   7	
   2
curl	
  http://demo-­‐cocktail.jmxtrans.cloudbees.net/5ADrUWr5/...
{
	
  	
  "Epoch":1363217653,
	
  	
  "SalesRevenueInCentsCounter":4050,
	
  	
  "SalesItemsCounter":7,	
  ...
}http://demo-cocktail.jmxtrans.cloudbees.net/jmx.jsp
Human readable & script friendly
Watch out for security !
/5ADrUWr5/jmx-sales-metrics.jsp
Wednesday, May 15, 13
JMX with JSP
Wednesday, May 15, 13
Alternatives to JMX
Wednesday, May 15, 13
Alternatives to JMX
class	
  ShoppingCartController	
  {
	
  @Monitor(name="revenueInCents",	
  type=COUNTER)
	
  final	
  AtomicInteger	
  revenueInCentsCounter	
  =	
  new	
  AtomicInteger();
	
  	
  	
  	
  
	
  void	
  purchase(...){
	
  	
  	
  ...
	
  	
  	
  revenueInCentsCounter.addAndGet(priceInCents);
	
  }
Servo
Wednesday, May 15, 13
Alternatives to JMX
class	
  ShoppingCartController	
  {
	
  @Monitor(name="revenueInCents",	
  type=COUNTER)
	
  final	
  AtomicInteger	
  revenueInCentsCounter	
  =	
  new	
  AtomicInteger();
	
  	
  	
  	
  
	
  void	
  purchase(...){
	
  	
  	
  ...
	
  	
  	
  revenueInCentsCounter.addAndGet(priceInCents);
	
  }
Servo
class	
  ShoppingCartController	
  {	
  	
  	
  	
  
	
  final	
  Counter	
  revenueInCentsCounter	
  =	
  Metrics.newCounter(
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  ShoppingCartController,	
  "revenue-­‐in-­‐cents");
	
  	
  	
  	
  
	
  void	
  purchase(...){	
  	
  	
  ...
	
  	
  	
  revenueInCentsCounter.inc(priceInCents);
	
  }
Metrics
Wednesday, May 15, 13
JMX
• OS: Sysload
• JVM: Garbage Collector
• Tomcat: activeSessions
• Application: Web Site Revenue
Wednesday, May 15, 13
jmxtrans
Wednesday, May 15, 13
jmxtrans - standalone
ecommerce
Tomcat
Graphite
accounting
Tomcat
logistics
Tomcat
...
jmxtrans - standalone
Wednesday, May 15, 13
embedded-jmxtrans
logistics
Tomcat
Graphite
ecommerce
Tomcat
accounting
Tomcat
Librato
...
batch
embedded-jmxtrans
Wednesday, May 15, 13
jmxtrans-agent
jmxtrans-agent
java -javaagent=jmxtrans-agent.jar=...
Graphite
...
batch
ecommerce
Tomcat
JVM
ecommerce
Tomcat
JVM
ecommerce
Tomcat
JVM
logistics
Tomcat
JVM
ecommerce
Tomcat
JVM
accounting
Tomcat
JVM
JVM
JVM
Librato
Wednesday, May 15, 13
standalone vs. embedded vs. agent
standalone embedded agent
Packaging
Model
Manually connected apps
Pull
Standalone apps
Push
Standalone middleware
Push
Cursor OPS -♦----------- DEV OPS ----------♦-- DEV OPS ---♦--------- DEV
Use case
Net unfriendly monitoring,
OPS
cloud, batch
DEV/QA
cloud, batch
OPS
Wednesday, May 15, 13
embedded-jmxtrans configuration
Wednesday, May 15, 13
embedded-jmxtrans configuration
<dependency>
	
  	
  <groupId>org.jmxtrans.embedded</groupId>
	
  	
  <artifactId>embedded-­‐jmxtrans</artifactId>
	
  	
  <version>1.0.7</version>
</dependency>
Wednesday, May 15, 13
embedded-jmxtrans configuration
<dependency>
	
  	
  <groupId>org.jmxtrans.embedded</groupId>
	
  	
  <artifactId>embedded-­‐jmxtrans</artifactId>
	
  	
  <version>1.0.7</version>
</dependency>
<beans	
  ...
	
  	
  xmlns:jmxtrans="http://www.jmxtrans.org/schema/embedded"
	
  	
  xsi:schemaLocation="...
	
  	
  	
  	
  http://www.jmxtrans.org/schema/embedded	
  ...”>
	
  	
  <jmxtrans:jmxtrans>
	
  	
  	
  	
  <jmxtrans:configuration>classpath:jmxtrans.json</jmxtrans:configuration>
	
  	
  	
  	
  ...
	
  	
  </jmxtrans:jmxtrans>
</beans>
Wednesday, May 15, 13
embedded-jmxtrans configuration
<dependency>
	
  	
  <groupId>org.jmxtrans.embedded</groupId>
	
  	
  <artifactId>embedded-­‐jmxtrans</artifactId>
	
  	
  <version>1.0.7</version>
</dependency>
<beans	
  ...
	
  	
  xmlns:jmxtrans="http://www.jmxtrans.org/schema/embedded"
	
  	
  xsi:schemaLocation="...
	
  	
  	
  	
  http://www.jmxtrans.org/schema/embedded	
  ...”>
	
  	
  <jmxtrans:jmxtrans>
	
  	
  	
  	
  <jmxtrans:configuration>classpath:jmxtrans.json</jmxtrans:configuration>
	
  	
  	
  	
  ...
	
  	
  </jmxtrans:jmxtrans>
</beans>
{
	
  	
  "queries":	
  [
	
  	
  	
  	
  	
  	
  {
	
  	
  	
  	
  	
  	
  "objectName":	
  "cocktail:name=ShoppingCartController",
	
  	
  	
  	
  	
  	
  "resultAlias":	
  "sales",
	
  	
  	
  	
  	
  	
  "attributes":	
  ["SalesRevenueInCentsCounter"]
	
  	
  	
  	
  },
	
  	
  ],
	
  	
  "outputWriters":	
  [
	
  	
  	
  	
  {
	
  	
  	
  	
  	
  	
  "@class":	
  "org.jmxtrans.embedded.output.GraphiteWriter",
	
  	
  	
  	
  	
  	
  "settings":	
  {
	
  	
  	
  	
  	
  	
  	
  	
  "host":	
  "${graphite.host:localhost}",
	
  	
  	
  	
  	
  	
  	
  	
  "port":	
  "${graphite.port:2003},"
	
  	
  	
  	
  	
  	
  	
  	
  "enabled":	
  "${graphite.enabled:true}"
	
  	
  	
  	
  	
  	
  }
	
  	
  	
  	
  }
	
  	
  ]
}
Wednesday, May 15, 13
Graphite
Wednesday, May 15, 13
Graphite
• Open Source
• Time Series DataBase and graphing tool
• Used by tech giants
• Similar
Wednesday, May 15, 13
Graphite
• Open Source
• Time Series DataBase and graphing tool
• Used by tech giants
• Similar
Simplicity and Self Service
Wednesday, May 15, 13
Metrics injection / Write Access
• Automatic metrics creation
• Socket protocols: “plain text” & Python Pickle serialization
• Precision and storage duration by configuration
echo	
  "geecon.happyCounter	
  1.2	
  1364338989"	
  |	
  nc	
  localhost	
  2003
[sales_1min_for_15days_5min_for_1year]
pattern	
  =	
  ^sales.
retentions	
  =	
  60s:30d,300s:365d
1.7MB
Wednesday, May 15, 13
• Graph Composer & URL API
• Everybody can create graphs
• Wide range of functions
• sum, scale, derivative, timeshift, deviation, filter, ...
• Various exports
• png, svg, csv, json, raw text
Metrics rendering / Read Access
Wednesday, May 15, 13
The Art of Graphing
Wednesday, May 15, 13
Monitoring on the Cloud
• http://hostedgraphite.com/
• Graphite as a Service
• Zero setup
• Addons: Tasseo
• No-OPS
1
2
3
email: admin@jmxtrans.org
password: GEECON
Wednesday, May 15, 13
Metrics Types
• Examples: activeRequests, dataSource.activeConnection, ...
• Information available without transformation
Gauge Ever Increasing Counter
• Examples: requestsCount, revenue, ...
• “per minute” aggregation required
Wednesday, May 15, 13
Graphs and Maths
Ever Increasing Counter Revenue per Second
?
Wednesday, May 15, 13
Graphs and Maths
Ever Increasing Counter Revenue per Second
?
derivative()
Wednesday, May 15, 13
Graphs and Maths
?
Revenue per HourPer Second → Per Hour
Wednesday, May 15, 13
Graphs and Maths
?
Revenue per HourPer Second → Per Hour
summarize(..., “1h”)
Wednesday, May 15, 13
Graphs and Maths
2 servers
?
Total Revenue per Hour
Wednesday, May 15, 13
Graphs and Maths
2 servers
?
Total Revenue per Hour
sumSeries()
Wednesday, May 15, 13
Graphs and Maths
server restart
?
Ignore reset to zero
Wednesday, May 15, 13
Graphs and Maths
server restart
?
Ignore reset to zero
nonNegativeDerivative()
Wednesday, May 15, 13
Graphs and Maths
Compare to
last week
?
Wednesday, May 15, 13
Graphs and Maths
Compare to
last week
?timeShift(..., “7d”)
Wednesday, May 15, 13
JMX
• OS: Sysload
• JVM: Garbage Collector
• Tomcat: activeSessions
• Application: Web Site Revenue
Wednesday, May 15, 13
Graphite URL API
http://localhost:8081/render/?
	
  	
  	
  from=-­‐7days&
	
  	
  	
  title=Revenue%20per%20Hour&
	
  	
  	
  vtitle=Dollars&
	
  	
  	
  lineWidth=3&
	
  	
  	
  xFormat=%25a%20%25H%25p&
	
  	
  	
  target=
	
  	
  	
  	
  alias(
	
  	
  	
  	
  	
  scale(
	
  	
  	
  	
  	
  	
  summarize(
	
  	
  	
  	
  	
  	
  	
  sumSeries(
	
  	
  	
  	
  	
  	
  	
  	
  nonNegativeDerivative(
	
  	
  	
  	
  	
  	
  	
  	
  	
  edu.servers.*.sales.revenueInCentsCounter)...)&
	
  	
  	
  	
  ...
Wednesday, May 15, 13
Sharing metrics and graphs
Wednesday, May 15, 13
Dashboards and Wikis
dashboard.prod.md
#	
  Website	
  Traffic
<table>
<tr>
	
  	
  <td>
	
  	
  	
  	
  <img	
  src="http://graphite.prod.mycompany/graphite/render/?
width=400&height=300&title=Revenue&xFormat=%25a%20%25d
%25p&vtitle=USD&lineWidth=3&from=-­‐5days&target=alias(scale(summarize(sumS
eries(nonNegativeDerivative(edu.servers.*.sales.revenueInCentsCounter))
%2C%221h%22)%2C0.01)%2C%22Revenue%20per%20Hour%22)...">
	
  	
  	
  	
  </td>
	
  	
  	
  	
  <td>
	
  	
  	
  	
  	
  	
  	
  	
  <img	
  src="http://graphite.prod.mycompany/graphite/render/?...">
	
  	
  	
  	
  </td>
<tr>
</table>
Wiki
https://github.com/jmxtrans/embedded-jmxtrans-samples/wiki/Dashboard-PROD
Wednesday, May 15, 13
Dashboards and Email
Send dashboards by email
Wednesday, May 15, 13
Alerting with Metrics
Wednesday, May 15, 13
Graphite Integration with Alerting
• Based on Graphite URL API
• RawText or JSON format
• Pattern
/render?from=-­‐11minutes&until=-­‐1minutes&format=raw&target=****
Wednesday, May 15, 13
Graphite Integration with Alerting
• Based on Graphite URL API
• RawText or JSON format
• Pattern
/render?from=-­‐11minutes&until=-­‐1minutes&format=raw&target=****
$	
  curl	
  "http://graphite.example.com/render?from=-­‐11minutes&until=-­‐1minutes&format=raw&
	
  	
  	
  target=keepLastValue(servers.cloudbees.jvm.os.SystemLoadAverage)"	
  
my-­‐metric,1363225680,1363226340,60|0.03,0.01,0.1,4.0,4.0,0.9,0.7,0.8,0.4,0.5,0.5
Example
Wednesday, May 15, 13
Graphite Alerting with Seyren
• Alerting Dashboard for Graphite
• Open Source
• Java .war + MongoDB
• Alerts: email, PagerDuty, ...
http://seyren.jmxtrans.cloudbees.net/
Wednesday, May 15, 13
• Monitoring Infrastructure
• Open Source
• De facto standard
• check_graphite plugin
• Pierre-Yves Ritschard
• Jason Dixon / obfuscurity
Graphite Alerting with Nagios
Wednesday, May 15, 13
Conclusion
Wednesday, May 15, 13
Conclusion
• Self-service monitoring changes everything
• Technical and business monitoring
• Monitoring integrated in the Continuous Delivery
pipeline
• Open Source solutions are available
Wednesday, May 15, 13
Hosted Graphite Promo
• http://hostedgraphite.com
• 60 days trial with “GEECON” promo code
help: cleclerc@cloudbees.com
(1) Signup (2) Options / Enter Promo Code (3) Promo Code “GEECON”
Wednesday, May 15, 13
http://demo-cocktail.jmxtrans.cloudbees.net/http://jmxtrans.org/
Wednesday, May 15, 13

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Running Kafka On Kubernetes With Strimzi For Real-Time Streaming Applications
Running Kafka On Kubernetes With Strimzi For Real-Time Streaming ApplicationsRunning Kafka On Kubernetes With Strimzi For Real-Time Streaming Applications
Running Kafka On Kubernetes With Strimzi For Real-Time Streaming Applications
 
Enable GoldenGate Monitoring with OEM 12c/JAgent
Enable GoldenGate Monitoring with OEM 12c/JAgentEnable GoldenGate Monitoring with OEM 12c/JAgent
Enable GoldenGate Monitoring with OEM 12c/JAgent
 
Whats new in Autonomous Database in 2022
Whats new in Autonomous Database in 2022Whats new in Autonomous Database in 2022
Whats new in Autonomous Database in 2022
 
Spark streaming , Spark SQL
Spark streaming , Spark SQLSpark streaming , Spark SQL
Spark streaming , Spark SQL
 
Introduction to Kafka Cruise Control
Introduction to Kafka Cruise ControlIntroduction to Kafka Cruise Control
Introduction to Kafka Cruise Control
 
Best Practices for Middleware and Integration Architecture Modernization with...
Best Practices for Middleware and Integration Architecture Modernization with...Best Practices for Middleware and Integration Architecture Modernization with...
Best Practices for Middleware and Integration Architecture Modernization with...
 
A Thorough Comparison of Delta Lake, Iceberg and Hudi
A Thorough Comparison of Delta Lake, Iceberg and HudiA Thorough Comparison of Delta Lake, Iceberg and Hudi
A Thorough Comparison of Delta Lake, Iceberg and Hudi
 
Data Quality With or Without Apache Spark and Its Ecosystem
Data Quality With or Without Apache Spark and Its EcosystemData Quality With or Without Apache Spark and Its Ecosystem
Data Quality With or Without Apache Spark and Its Ecosystem
 
Transaction Management on Cassandra
Transaction Management on CassandraTransaction Management on Cassandra
Transaction Management on Cassandra
 
Koalas: Making an Easy Transition from Pandas to Apache Spark
Koalas: Making an Easy Transition from Pandas to Apache SparkKoalas: Making an Easy Transition from Pandas to Apache Spark
Koalas: Making an Easy Transition from Pandas to Apache Spark
 
Delight: An Improved Apache Spark UI, Free, and Cross-Platform
Delight: An Improved Apache Spark UI, Free, and Cross-PlatformDelight: An Improved Apache Spark UI, Free, and Cross-Platform
Delight: An Improved Apache Spark UI, Free, and Cross-Platform
 
Apache Beam: A unified model for batch and stream processing data
Apache Beam: A unified model for batch and stream processing dataApache Beam: A unified model for batch and stream processing data
Apache Beam: A unified model for batch and stream processing data
 
DevOps for Databricks
DevOps for DatabricksDevOps for Databricks
DevOps for Databricks
 
Deep Dive into Stateful Stream Processing in Structured Streaming with Tathag...
Deep Dive into Stateful Stream Processing in Structured Streaming with Tathag...Deep Dive into Stateful Stream Processing in Structured Streaming with Tathag...
Deep Dive into Stateful Stream Processing in Structured Streaming with Tathag...
 
Enabling Vectorized Engine in Apache Spark
Enabling Vectorized Engine in Apache SparkEnabling Vectorized Engine in Apache Spark
Enabling Vectorized Engine in Apache Spark
 
Monitoring Flink with Prometheus
Monitoring Flink with PrometheusMonitoring Flink with Prometheus
Monitoring Flink with Prometheus
 
Apache Flink in the Cloud-Native Era
Apache Flink in the Cloud-Native EraApache Flink in the Cloud-Native Era
Apache Flink in the Cloud-Native Era
 
Where is my bottleneck? Performance troubleshooting in Flink
Where is my bottleneck? Performance troubleshooting in FlinkWhere is my bottleneck? Performance troubleshooting in Flink
Where is my bottleneck? Performance troubleshooting in Flink
 
How to Actually Tune Your Spark Jobs So They Work
How to Actually Tune Your Spark Jobs So They WorkHow to Actually Tune Your Spark Jobs So They Work
How to Actually Tune Your Spark Jobs So They Work
 
【2016年3月時点】Data Visualization Cloud Service ハンズオン資料
【2016年3月時点】Data Visualization Cloud Service ハンズオン資料【2016年3月時点】Data Visualization Cloud Service ハンズオン資料
【2016年3月時点】Data Visualization Cloud Service ハンズオン資料
 

Destaque

Realtime statistics using Java, Kafka and Graphite
Realtime statistics using Java, Kafka and GraphiteRealtime statistics using Java, Kafka and Graphite
Realtime statistics using Java, Kafka and Graphite
Hung Nguyen
 
Wayne State University & DataStax: World's best data modeling tool for Apache...
Wayne State University & DataStax: World's best data modeling tool for Apache...Wayne State University & DataStax: World's best data modeling tool for Apache...
Wayne State University & DataStax: World's best data modeling tool for Apache...
DataStax Academy
 
Life of an Fluentd event
Life of an Fluentd eventLife of an Fluentd event
Life of an Fluentd event
Kiyoto Tamura
 

Destaque (20)

Cassandra Metrics
Cassandra MetricsCassandra Metrics
Cassandra Metrics
 
Jmxtrans presentation
Jmxtrans presentationJmxtrans presentation
Jmxtrans presentation
 
Cassandra for Sysadmins
Cassandra for SysadminsCassandra for Sysadmins
Cassandra for Sysadmins
 
Monitoring Cassandra with graphite using Yammer Coda-Hale Library
Monitoring Cassandra with graphite using Yammer Coda-Hale LibraryMonitoring Cassandra with graphite using Yammer Coda-Hale Library
Monitoring Cassandra with graphite using Yammer Coda-Hale Library
 
Jafka guide
Jafka guideJafka guide
Jafka guide
 
JMX Introduction
JMX IntroductionJMX Introduction
JMX Introduction
 
Graphite Presentation
Graphite PresentationGraphite Presentation
Graphite Presentation
 
Hardening cassandra q2_2016
Hardening cassandra q2_2016Hardening cassandra q2_2016
Hardening cassandra q2_2016
 
Prometheus and Docker (Docker Galway, November 2015)
Prometheus and Docker (Docker Galway, November 2015)Prometheus and Docker (Docker Galway, November 2015)
Prometheus and Docker (Docker Galway, November 2015)
 
Advanced Apache Cassandra Operations with JMX
Advanced Apache Cassandra Operations with JMXAdvanced Apache Cassandra Operations with JMX
Advanced Apache Cassandra Operations with JMX
 
Realtime statistics using Java, Kafka and Graphite
Realtime statistics using Java, Kafka and GraphiteRealtime statistics using Java, Kafka and Graphite
Realtime statistics using Java, Kafka and Graphite
 
Wayne State University & DataStax: World's best data modeling tool for Apache...
Wayne State University & DataStax: World's best data modeling tool for Apache...Wayne State University & DataStax: World's best data modeling tool for Apache...
Wayne State University & DataStax: World's best data modeling tool for Apache...
 
Monitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamics
Monitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamicsMonitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamics
Monitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamics
 
Metrics by coda hale : to know your app’ health
Metrics by coda hale : to know your app’ healthMetrics by coda hale : to know your app’ health
Metrics by coda hale : to know your app’ health
 
도커를 이용한 파이썬 모듈 배포하기
도커를 이용한 파이썬 모듈 배포하기도커를 이용한 파이썬 모듈 배포하기
도커를 이용한 파이썬 모듈 배포하기
 
Paris Devops - Monitoring And Feature Toggle Pattern With JMX
Paris Devops - Monitoring And Feature Toggle Pattern With JMXParis Devops - Monitoring And Feature Toggle Pattern With JMX
Paris Devops - Monitoring And Feature Toggle Pattern With JMX
 
Troubleshooting redis
Troubleshooting redisTroubleshooting redis
Troubleshooting redis
 
도커(Docker) 메트릭스 & 로그 수집
도커(Docker) 메트릭스 & 로그 수집도커(Docker) 메트릭스 & 로그 수집
도커(Docker) 메트릭스 & 로그 수집
 
Java application monitoring with Dropwizard Metrics and graphite
Java application monitoring with Dropwizard Metrics and graphite Java application monitoring with Dropwizard Metrics and graphite
Java application monitoring with Dropwizard Metrics and graphite
 
Life of an Fluentd event
Life of an Fluentd eventLife of an Fluentd event
Life of an Fluentd event
 

Semelhante a Open Source Monitoring for Java with JMX and Graphite (GeeCON 2013)

Performance Aware SDN, LSPE talk
Performance Aware SDN, LSPE talkPerformance Aware SDN, LSPE talk
Performance Aware SDN, LSPE talk
netvis
 
WSO2 Business Activity Monitor (BAM) 2.0 - a new beginning
WSO2 Business Activity Monitor (BAM) 2.0 - a new beginningWSO2 Business Activity Monitor (BAM) 2.0 - a new beginning
WSO2 Business Activity Monitor (BAM) 2.0 - a new beginning
WSO2
 
The Four Hats of Load and Performance Testing with special guest Mentora
The Four Hats of Load and Performance Testing with special guest MentoraThe Four Hats of Load and Performance Testing with special guest Mentora
The Four Hats of Load and Performance Testing with special guest Mentora
SOASTA
 
The Four Hats of Load and Performance Testing with special guest Mentora
The Four Hats of Load and Performance Testing with special guest MentoraThe Four Hats of Load and Performance Testing with special guest Mentora
The Four Hats of Load and Performance Testing with special guest Mentora
SOASTA
 

Semelhante a Open Source Monitoring for Java with JMX and Graphite (GeeCON 2013) (20)

Tek 2013 - Building Web Apps from a New Angle with AngularJS
Tek 2013 - Building Web Apps from a New Angle with AngularJSTek 2013 - Building Web Apps from a New Angle with AngularJS
Tek 2013 - Building Web Apps from a New Angle with AngularJS
 
Monitoring Open Source pour Java avec JmxTrans, Graphite et Nagios - DevoxxFR...
Monitoring Open Source pour Java avec JmxTrans, Graphite et Nagios - DevoxxFR...Monitoring Open Source pour Java avec JmxTrans, Graphite et Nagios - DevoxxFR...
Monitoring Open Source pour Java avec JmxTrans, Graphite et Nagios - DevoxxFR...
 
Measuring P99 Latency in Event-Driven Architectures with OpenTelemetry
Measuring P99 Latency in Event-Driven Architectures with OpenTelemetryMeasuring P99 Latency in Event-Driven Architectures with OpenTelemetry
Measuring P99 Latency in Event-Driven Architectures with OpenTelemetry
 
PostgreSQL Monitoring using modern software stacks
PostgreSQL Monitoring using modern software stacksPostgreSQL Monitoring using modern software stacks
PostgreSQL Monitoring using modern software stacks
 
Monitoring using Prometheus and Grafana
Monitoring using Prometheus and GrafanaMonitoring using Prometheus and Grafana
Monitoring using Prometheus and Grafana
 
Functional Reactive Programming in the Netflix API
Functional Reactive Programming in the Netflix APIFunctional Reactive Programming in the Netflix API
Functional Reactive Programming in the Netflix API
 
How to monitor your micro-service with Prometheus?
How to monitor your micro-service with Prometheus?How to monitor your micro-service with Prometheus?
How to monitor your micro-service with Prometheus?
 
Performance Aware SDN, LSPE talk
Performance Aware SDN, LSPE talkPerformance Aware SDN, LSPE talk
Performance Aware SDN, LSPE talk
 
WSO2 Business Activity Monitor (BAM) 2.0 - a new beginning
WSO2 Business Activity Monitor (BAM) 2.0 - a new beginningWSO2 Business Activity Monitor (BAM) 2.0 - a new beginning
WSO2 Business Activity Monitor (BAM) 2.0 - a new beginning
 
Monitor your Java application with Prometheus Stack
Monitor your Java application with Prometheus StackMonitor your Java application with Prometheus Stack
Monitor your Java application with Prometheus Stack
 
Creando microservicios con Java, Microprofile y TomEE - Baranquilla JUG
Creando microservicios con Java, Microprofile y TomEE - Baranquilla JUGCreando microservicios con Java, Microprofile y TomEE - Baranquilla JUG
Creando microservicios con Java, Microprofile y TomEE - Baranquilla JUG
 
The Four Hats of Load and Performance Testing with special guest Mentora
The Four Hats of Load and Performance Testing with special guest MentoraThe Four Hats of Load and Performance Testing with special guest Mentora
The Four Hats of Load and Performance Testing with special guest Mentora
 
The Four Hats of Load and Performance Testing with special guest Mentora
The Four Hats of Load and Performance Testing with special guest MentoraThe Four Hats of Load and Performance Testing with special guest Mentora
The Four Hats of Load and Performance Testing with special guest Mentora
 
Client-Side Performance Testing
Client-Side Performance TestingClient-Side Performance Testing
Client-Side Performance Testing
 
The Fine Art of Time Travelling - Implementing Event Sourcing - Andrea Saltar...
The Fine Art of Time Travelling - Implementing Event Sourcing - Andrea Saltar...The Fine Art of Time Travelling - Implementing Event Sourcing - Andrea Saltar...
The Fine Art of Time Travelling - Implementing Event Sourcing - Andrea Saltar...
 
Automated Performance Testing
Automated Performance TestingAutomated Performance Testing
Automated Performance Testing
 
Java one2013 con4540-keenan
Java one2013 con4540-keenanJava one2013 con4540-keenan
Java one2013 con4540-keenan
 
Front end microservices - October 2019
Front end microservices - October 2019Front end microservices - October 2019
Front end microservices - October 2019
 
Using Stackdriver with MongoDB
Using Stackdriver with MongoDBUsing Stackdriver with MongoDB
Using Stackdriver with MongoDB
 
Keeping it small - Getting to know the Slim PHP micro framework
Keeping it small - Getting to know the Slim PHP micro frameworkKeeping it small - Getting to know the Slim PHP micro framework
Keeping it small - Getting to know the Slim PHP micro framework
 

Mais de Cyrille Le Clerc

Soirée OSGi au Paris Jug (14/10/2008)
Soirée OSGi au Paris Jug (14/10/2008)Soirée OSGi au Paris Jug (14/10/2008)
Soirée OSGi au Paris Jug (14/10/2008)
Cyrille Le Clerc
 
Soirée Data Grid au Paris JUG (2009/05/12)
Soirée Data Grid au Paris JUG (2009/05/12)Soirée Data Grid au Paris JUG (2009/05/12)
Soirée Data Grid au Paris JUG (2009/05/12)
Cyrille Le Clerc
 

Mais de Cyrille Le Clerc (9)

Embracing Observability in CI/CD with OpenTelemetry
Embracing Observability in CI/CD with OpenTelemetryEmbracing Observability in CI/CD with OpenTelemetry
Embracing Observability in CI/CD with OpenTelemetry
 
Joe Mobile sur le Cloud - DevoxxFR 2013
Joe Mobile sur le Cloud - DevoxxFR 2013Joe Mobile sur le Cloud - DevoxxFR 2013
Joe Mobile sur le Cloud - DevoxxFR 2013
 
Paris NoSQL User Group - In Memory Data Grids in Action (without transactions...
Paris NoSQL User Group - In Memory Data Grids in Action (without transactions...Paris NoSQL User Group - In Memory Data Grids in Action (without transactions...
Paris NoSQL User Group - In Memory Data Grids in Action (without transactions...
 
GeeCon 2011 - NoSQL and In Memory Data Grids from a developer perspective
GeeCon 2011 - NoSQL and In Memory Data Grids from a developer perspectiveGeeCon 2011 - NoSQL and In Memory Data Grids from a developer perspective
GeeCon 2011 - NoSQL and In Memory Data Grids from a developer perspective
 
Java Application Monitoring with AppDynamics' Founder
Java Application Monitoring with AppDynamics' FounderJava Application Monitoring with AppDynamics' Founder
Java Application Monitoring with AppDynamics' Founder
 
Bonnes pratiques des applications java prêtes pour la production
Bonnes pratiques des applications java prêtes pour la productionBonnes pratiques des applications java prêtes pour la production
Bonnes pratiques des applications java prêtes pour la production
 
Soirée OSGi au Paris Jug (14/10/2008)
Soirée OSGi au Paris Jug (14/10/2008)Soirée OSGi au Paris Jug (14/10/2008)
Soirée OSGi au Paris Jug (14/10/2008)
 
Xebia Knowledge Exchange - Owasp Top Ten
Xebia Knowledge Exchange - Owasp Top TenXebia Knowledge Exchange - Owasp Top Ten
Xebia Knowledge Exchange - Owasp Top Ten
 
Soirée Data Grid au Paris JUG (2009/05/12)
Soirée Data Grid au Paris JUG (2009/05/12)Soirée Data Grid au Paris JUG (2009/05/12)
Soirée Data Grid au Paris JUG (2009/05/12)
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

Open Source Monitoring for Java with JMX and Graphite (GeeCON 2013)

  • 1. Cyrille Le Clerc Open Source Monitoring for Java with Graphite Wednesday, May 15, 13
  • 2. Speaker Cyrille Le Clerc @cyrilleleclerc Open Source CTO DevOps, Infra as Code Solution Architect Cloud Wednesday, May 15, 13
  • 3. You ? DEV ? QA ? OPS ? Monitoring Experience ? Wednesday, May 15, 13
  • 5. Agenda • The demo application • Monitoring performance: Why ? What ? • Java webapp monitoring with JMX • Monitoring with Graphite • Conclusion Wednesday, May 15, 13
  • 7. Your mission, should you decide to accept it, ... Setup technical and business monitoring e-commerce SOS Cocktails http://www.flickr.com/photos/23791504@N08/2607814349 Wednesday, May 15, 13
  • 9. Monitoring application performance Why ? What ? Wednesday, May 15, 13
  • 10. The Indicators to Monitor Wednesday, May 15, 13
  • 11. The Indicators to Monitor • Operating System ➔ Sysload • JVM ➔ GC duration • Tomcat ➔ activeSessions (active visitors) • Application ➔ sales revenue & items Wednesday, May 15, 13
  • 12. Open Source Monitoring for Java Wednesday, May 15, 13
  • 13. Open Source Monitoring for Java e-commerce web site Graphite Seyren Dashboard - wiki Nagios Email Wednesday, May 15, 13
  • 15. Why JMX ? • JMX vs. web pages vs. logs vs. ... • Simple and secured • Displayable with web pages and logs • Alternatives to JMX ? Wednesday, May 15, 13
  • 16. JMX vs. logs vs. web pages vs. ... • Monitoring logs • Parsing GB of text files ? • Per invocation details vs. average per minute • Web pages • History ? • Clustered applications ? • Security ? Wednesday, May 15, 13
  • 17. JMX with Spring Framework <beans  ...>      ...      <context:mbean-­‐export/>      ... </beans> @ManagedResource("cocktail:name=ShoppingCartController,type=...") class  ShoppingCartController  {          final  AtomicInteger  revenueInCentsCounter  =  new  AtomicInteger();  void  purchase(...){      ...      revenueInCentsCounter.addAndGet(priceInCents);  }  @ManagedAttribute  public  int  getRevenueInCentsCounter()  {    return  revenueInCentsCounter.get();  }         Wednesday, May 15, 13
  • 19. JMX with JSP $  curl  http://demo-­‐cocktail.jmxtrans.cloudbees.net/5ADrUWr5/jmx-­‐sales-­‐metrics.txt.jsp Epoch   SalesRevenueInCentsCounter   SalesItemsCounter   SalesOrdersCounter 1363217376   4500   7   2 curl  http://demo-­‐cocktail.jmxtrans.cloudbees.net/5ADrUWr5/... {    "Epoch":1363217653,    "SalesRevenueInCentsCounter":4050,    "SalesItemsCounter":7,  ... }http://demo-cocktail.jmxtrans.cloudbees.net/jmx.jsp Human readable & script friendly Watch out for security ! Wednesday, May 15, 13
  • 20. JMX with JSP $  curl  http://demo-­‐cocktail.jmxtrans.cloudbees.net/5ADrUWr5/jmx-­‐sales-­‐metrics.txt.jsp Epoch   SalesRevenueInCentsCounter   SalesItemsCounter   SalesOrdersCounter 1363217376   4500   7   2 curl  http://demo-­‐cocktail.jmxtrans.cloudbees.net/5ADrUWr5/... {    "Epoch":1363217653,    "SalesRevenueInCentsCounter":4050,    "SalesItemsCounter":7,  ... }http://demo-cocktail.jmxtrans.cloudbees.net/jmx.jsp Human readable & script friendly Watch out for security ! /5ADrUWr5/jmx-sales-metrics.jsp Wednesday, May 15, 13
  • 23. Alternatives to JMX class  ShoppingCartController  {  @Monitor(name="revenueInCents",  type=COUNTER)  final  AtomicInteger  revenueInCentsCounter  =  new  AtomicInteger();          void  purchase(...){      ...      revenueInCentsCounter.addAndGet(priceInCents);  } Servo Wednesday, May 15, 13
  • 24. Alternatives to JMX class  ShoppingCartController  {  @Monitor(name="revenueInCents",  type=COUNTER)  final  AtomicInteger  revenueInCentsCounter  =  new  AtomicInteger();          void  purchase(...){      ...      revenueInCentsCounter.addAndGet(priceInCents);  } Servo class  ShoppingCartController  {          final  Counter  revenueInCentsCounter  =  Metrics.newCounter(                            ShoppingCartController,  "revenue-­‐in-­‐cents");          void  purchase(...){      ...      revenueInCentsCounter.inc(priceInCents);  } Metrics Wednesday, May 15, 13
  • 25. JMX • OS: Sysload • JVM: Garbage Collector • Tomcat: activeSessions • Application: Web Site Revenue Wednesday, May 15, 13
  • 30. standalone vs. embedded vs. agent standalone embedded agent Packaging Model Manually connected apps Pull Standalone apps Push Standalone middleware Push Cursor OPS -♦----------- DEV OPS ----------♦-- DEV OPS ---♦--------- DEV Use case Net unfriendly monitoring, OPS cloud, batch DEV/QA cloud, batch OPS Wednesday, May 15, 13
  • 32. embedded-jmxtrans configuration <dependency>    <groupId>org.jmxtrans.embedded</groupId>    <artifactId>embedded-­‐jmxtrans</artifactId>    <version>1.0.7</version> </dependency> Wednesday, May 15, 13
  • 33. embedded-jmxtrans configuration <dependency>    <groupId>org.jmxtrans.embedded</groupId>    <artifactId>embedded-­‐jmxtrans</artifactId>    <version>1.0.7</version> </dependency> <beans  ...    xmlns:jmxtrans="http://www.jmxtrans.org/schema/embedded"    xsi:schemaLocation="...        http://www.jmxtrans.org/schema/embedded  ...”>    <jmxtrans:jmxtrans>        <jmxtrans:configuration>classpath:jmxtrans.json</jmxtrans:configuration>        ...    </jmxtrans:jmxtrans> </beans> Wednesday, May 15, 13
  • 34. embedded-jmxtrans configuration <dependency>    <groupId>org.jmxtrans.embedded</groupId>    <artifactId>embedded-­‐jmxtrans</artifactId>    <version>1.0.7</version> </dependency> <beans  ...    xmlns:jmxtrans="http://www.jmxtrans.org/schema/embedded"    xsi:schemaLocation="...        http://www.jmxtrans.org/schema/embedded  ...”>    <jmxtrans:jmxtrans>        <jmxtrans:configuration>classpath:jmxtrans.json</jmxtrans:configuration>        ...    </jmxtrans:jmxtrans> </beans> {    "queries":  [            {            "objectName":  "cocktail:name=ShoppingCartController",            "resultAlias":  "sales",            "attributes":  ["SalesRevenueInCentsCounter"]        },    ],    "outputWriters":  [        {            "@class":  "org.jmxtrans.embedded.output.GraphiteWriter",            "settings":  {                "host":  "${graphite.host:localhost}",                "port":  "${graphite.port:2003},"                "enabled":  "${graphite.enabled:true}"            }        }    ] } Wednesday, May 15, 13
  • 36. Graphite • Open Source • Time Series DataBase and graphing tool • Used by tech giants • Similar Wednesday, May 15, 13
  • 37. Graphite • Open Source • Time Series DataBase and graphing tool • Used by tech giants • Similar Simplicity and Self Service Wednesday, May 15, 13
  • 38. Metrics injection / Write Access • Automatic metrics creation • Socket protocols: “plain text” & Python Pickle serialization • Precision and storage duration by configuration echo  "geecon.happyCounter  1.2  1364338989"  |  nc  localhost  2003 [sales_1min_for_15days_5min_for_1year] pattern  =  ^sales. retentions  =  60s:30d,300s:365d 1.7MB Wednesday, May 15, 13
  • 39. • Graph Composer & URL API • Everybody can create graphs • Wide range of functions • sum, scale, derivative, timeshift, deviation, filter, ... • Various exports • png, svg, csv, json, raw text Metrics rendering / Read Access Wednesday, May 15, 13
  • 40. The Art of Graphing Wednesday, May 15, 13
  • 41. Monitoring on the Cloud • http://hostedgraphite.com/ • Graphite as a Service • Zero setup • Addons: Tasseo • No-OPS 1 2 3 email: admin@jmxtrans.org password: GEECON Wednesday, May 15, 13
  • 42. Metrics Types • Examples: activeRequests, dataSource.activeConnection, ... • Information available without transformation Gauge Ever Increasing Counter • Examples: requestsCount, revenue, ... • “per minute” aggregation required Wednesday, May 15, 13
  • 43. Graphs and Maths Ever Increasing Counter Revenue per Second ? Wednesday, May 15, 13
  • 44. Graphs and Maths Ever Increasing Counter Revenue per Second ? derivative() Wednesday, May 15, 13
  • 45. Graphs and Maths ? Revenue per HourPer Second → Per Hour Wednesday, May 15, 13
  • 46. Graphs and Maths ? Revenue per HourPer Second → Per Hour summarize(..., “1h”) Wednesday, May 15, 13
  • 47. Graphs and Maths 2 servers ? Total Revenue per Hour Wednesday, May 15, 13
  • 48. Graphs and Maths 2 servers ? Total Revenue per Hour sumSeries() Wednesday, May 15, 13
  • 49. Graphs and Maths server restart ? Ignore reset to zero Wednesday, May 15, 13
  • 50. Graphs and Maths server restart ? Ignore reset to zero nonNegativeDerivative() Wednesday, May 15, 13
  • 51. Graphs and Maths Compare to last week ? Wednesday, May 15, 13
  • 52. Graphs and Maths Compare to last week ?timeShift(..., “7d”) Wednesday, May 15, 13
  • 53. JMX • OS: Sysload • JVM: Garbage Collector • Tomcat: activeSessions • Application: Web Site Revenue Wednesday, May 15, 13
  • 54. Graphite URL API http://localhost:8081/render/?      from=-­‐7days&      title=Revenue%20per%20Hour&      vtitle=Dollars&      lineWidth=3&      xFormat=%25a%20%25H%25p&      target=        alias(          scale(            summarize(              sumSeries(                nonNegativeDerivative(                  edu.servers.*.sales.revenueInCentsCounter)...)&        ... Wednesday, May 15, 13
  • 55. Sharing metrics and graphs Wednesday, May 15, 13
  • 56. Dashboards and Wikis dashboard.prod.md #  Website  Traffic <table> <tr>    <td>        <img  src="http://graphite.prod.mycompany/graphite/render/? width=400&height=300&title=Revenue&xFormat=%25a%20%25d %25p&vtitle=USD&lineWidth=3&from=-­‐5days&target=alias(scale(summarize(sumS eries(nonNegativeDerivative(edu.servers.*.sales.revenueInCentsCounter)) %2C%221h%22)%2C0.01)%2C%22Revenue%20per%20Hour%22)...">        </td>        <td>                <img  src="http://graphite.prod.mycompany/graphite/render/?...">        </td> <tr> </table> Wiki https://github.com/jmxtrans/embedded-jmxtrans-samples/wiki/Dashboard-PROD Wednesday, May 15, 13
  • 57. Dashboards and Email Send dashboards by email Wednesday, May 15, 13
  • 59. Graphite Integration with Alerting • Based on Graphite URL API • RawText or JSON format • Pattern /render?from=-­‐11minutes&until=-­‐1minutes&format=raw&target=**** Wednesday, May 15, 13
  • 60. Graphite Integration with Alerting • Based on Graphite URL API • RawText or JSON format • Pattern /render?from=-­‐11minutes&until=-­‐1minutes&format=raw&target=**** $  curl  "http://graphite.example.com/render?from=-­‐11minutes&until=-­‐1minutes&format=raw&      target=keepLastValue(servers.cloudbees.jvm.os.SystemLoadAverage)"   my-­‐metric,1363225680,1363226340,60|0.03,0.01,0.1,4.0,4.0,0.9,0.7,0.8,0.4,0.5,0.5 Example Wednesday, May 15, 13
  • 61. Graphite Alerting with Seyren • Alerting Dashboard for Graphite • Open Source • Java .war + MongoDB • Alerts: email, PagerDuty, ... http://seyren.jmxtrans.cloudbees.net/ Wednesday, May 15, 13
  • 62. • Monitoring Infrastructure • Open Source • De facto standard • check_graphite plugin • Pierre-Yves Ritschard • Jason Dixon / obfuscurity Graphite Alerting with Nagios Wednesday, May 15, 13
  • 64. Conclusion • Self-service monitoring changes everything • Technical and business monitoring • Monitoring integrated in the Continuous Delivery pipeline • Open Source solutions are available Wednesday, May 15, 13
  • 65. Hosted Graphite Promo • http://hostedgraphite.com • 60 days trial with “GEECON” promo code help: cleclerc@cloudbees.com (1) Signup (2) Options / Enter Promo Code (3) Promo Code “GEECON” Wednesday, May 15, 13