Monitoring Open Source pour Java avec JmxTrans, Graphite et Nagios



Similar documents
Qu est-ce que le Cloud? Quels sont ses points forts? Pourquoi l'adopter? Hugues De Pra Data Center Lead Cisco Belgium & Luxemburg

Accélérer le développement d'applications avec DevOps


Data Center Automation with YADT

Administrer les solutions Citrix XenApp et XenDesktop 7.6 CXD-203

Operations and Monitoring with Spring

Personnalisez votre intérieur avec les revêtements imprimés ALYOS design

Introduction. GEAL Bibliothèque Java pour écrire des algorithmes évolutionnaires. Objectifs. Simplicité Evolution et coévolution Parallélisme

DevOps Course Content

Stockage distribué sous Linux

Big data blue print for cloud architecture

System Management Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice

Bernd Ahlers Michael Friedrich. Log Monitoring Simplified Get the best out of Graylog2 & Icinga 2

How we monitor 1 billion km of monthly ride sharing

Integrate 'Oracle Forms', 'Oracle Reports', 'Oracle

You can choose to install the plugin through Magento Connect or by directly using the archive files.

Durée 4 jours. Pré-requis

HP OO 10.X - SiteScope Monitoring Templates

Jimmy Hébergement Cloud - TechDay

the missing log collector Treasure Data, Inc. Muga Nishizawa

API MORNING. IBM Bluemix. The Digital Innovation Platform IBM Corporation

How Comcast Built An Open Source Content Delivery Network National Engineering & Technical Operations

A Year of HTCondor Monitoring. Lincoln Bryant Suchandra Thapa

Interfaces de programmation pour les composants de la solution LiveCycle ES (juillet 2008)

Volume SYSLOG JUNCTION. User s Guide. User s Guide

Vincent Rullier Technology specialist Microsoft Suisse Romande

Concevoir et déployer vos applications à base de microservices sur Cloud Foundry

FileNet System Manager Dashboard Help

Workshop. Avril 2015 Benoit Buonassera

Profiling and Testing with Test and Performance Tools Platform (TPTP)

TPAf KTl Pen source. System Monitoring. Zenoss Core 3.x Network and

MESSAGING SECURITY USING GLASSFISH AND OPEN MESSAGE QUEUE

WEBAPP PATTERN FOR APACHE TOMCAT - USER GUIDE

«Object-Oriented Multi-Methods in Cecil» Craig Chambers (Cours IFT6310, H08)

Monitoring HP OO 10. Overview. Available Tools. HP OO Community Guides

Load and Performance Load Testing. RadView Software October

Introduction au BIM. ESEB Seyssinet-Pariset Economie de la construction contact@eseb.fr

Continuous Delivery for Alfresco Solutions. Satisfied customers and happy developers with!! Continuous Delivery!

ArcGIS 10.1 Web Apps and APIs. John Hasthorpe & Kai Hübner

Introduction Présentation de scapy. Scapy. Easy Packet Handling. Etienne Maynier. Capitole du Libre 24 Novembre 2012

Quel pilote ètes-vous

CHAPTER 1 - JAVA EE OVERVIEW FOR ADMINISTRATORS

How To Use The Cloud For Dev Ops

ESMA REGISTERS OJ/26/06/2012-PROC/2012/004. Questions/ Answers

Fondation Rennes 1. Atelier de l innovation. Fondation Rennes 1. Fondation Rennes 1 MANAGEMENT AGILE. Fondation Rennes 1 ET INNOVATION

Integration of IT-DB Monitoring tools into IT General Notification Infrastructure

Sisense. Product Highlights.

SUCCESFUL TESTING THE CONTINUOUS DELIVERY PROCESS

Sophos (Schweiz) AG May 2012

Voici votre rapport sur votre service OpenERP en ligne.

IBM Power UNIX Leadership

PRMS.

Monitoring Tomcat with JMX

Intégrez SharePoint Avec Lotus Notes

WhiteWave's Integrated Managed File Transfer (MFT)

Modern Web development and operations practices. Grig Gheorghiu VP Tech Operations Nasty Gal

Copyright 2014, Oracle and/or its affiliates. All rights reserved.

Oracle WebLogic Server 11g Administration

Superviser efficacement son IT avec Tivoli Monitoring

MarkLogic Server. Java Application Developer s Guide. MarkLogic 8 February, Copyright 2015 MarkLogic Corporation. All rights reserved.

Apache Jakarta Tomcat

Jenkins World Tour 2015 Santa Clara, CA, September 2-3

Publish Acrolinx Terminology Changes via RSS

NGASI Shared-Runtime Manager Administration and User Guide WebAppShowcase DBA NGASI

Architecting ColdFusion For Scalability And High Availability. Ryan Stewart Platform Evangelist

Monitor and Manage Your MicroStrategy BI Environment Using Enterprise Manager and Health Center

How To Set Up Vsftpd On A Pc Or Mac Or Mac (For Mac) On A Mac Or Ipa (For Pc Or Ipad) On Pc Or Pc Or Pb (For Ipa) On An Ipa Or Mac

Présentation Evolutions CAS Version 3

Copyright 2012, Oracle and/or its affiliates. All rights reserved.

Calcul parallèle avec R

Short Form Description / Sommaire: Carrying on a prescribed activity without or contrary to a licence

Ganglia & Nagios. Maciej Lasyk 11. Sesja Linuksowa Wrocław, /25. Maciej Lasyk, Ganglia & Nagios

November 12 th 13 th London: Mastering Continuous Integration with Jenkins

Considerations for Adopting PaaS (Platform as a Service)

Développer des applications mobiles avec ArcGIS 10.1

POB-JAVA Documentation

Oracle WebLogic Server: Remote Monitoring and Management

Account Manager H/F - CDI - France

vcenter Operations Management Pack for SAP HANA Installation and Configuration Guide

PTC System Monitor Solution Training

Volvo IT - WirelessCar. RedHat Forum 2014

How To Monitor A Server With Zabbix

Server-side OSGi with Apache Sling. Felix Meschberger Day Management AG 124

What s New in System Center 2012 R2 - Operations Manager?

Planning, Provisioning and Deploying Enterprise Clouds with Oracle Enterprise Manager 12c Kevin Patterson, Principal Sales Consultant, Enterprise

SOFTWARE DEFINED SOLUTIONS JEUDI 19 NOVEMBRE Nicolas EHRMAN Sr Presales SDS

Enabling Continuous Delivery for Java Projects with Oracle Cloud Services (Oracle PaaS) Siva Rama Krishna Oracle India

Transcription:

Monitoring Open Source pour Java avec JmxTrans, Graphite et Nagios 27 au 29 mars 2013

Speaker @cyrilleleclerc CTO Architect Cyrille Le Clerc Fort Traffic Open Source Cloud, DevOps

Speaker @hgomez Architecte CI Henri Gomez Intégration Continue Open Source DevOps

Vous? Dev? Qa? Ops? Expérience monitoring?

Agenda 27 au 29 mars 2013

Agenda L application Le monitoring à réaliser Instrumenter une webapp Java avec JMX Monitorer Grapher avec Graphite Alerter avec Seyren (et Nagios) Monitoring & Continuous Delivery Déploiement de Graphite Conclusion

Votre mission, si toutefois vous l acceptez... e-commerce SOS Cocktails http://www.flickr.com/photos/23791504@n08/2607814349 Mettre en place le monitoring technique et métier

Démo SOS Cocktail

Les indicateurs à monitorer Pourquoi Monitorer? Quoi? 27 au 29 mars 2013

Les indicateurs à monitorer

Les Indicateurs à monitorer Operating System -> Sysload JVM -> GC duration Tomcat -> activesessions (active visitors) Application -> sales revenue & items

Open Source Monitoring for Java (4) ecommerce Web Site Dashboard - wiki Graphite Email (1) (2) (3) Seyren (5) Nagios

JMX & Métriques 27 au 29 mars 2013

Pourquoi JMX? JMX vs. pages web vs. logs vs.... Simple et sécurisé Exposable vers pages web et les logs Des alternatives à JMX

JMX vs. logs vs. pages web vs.... Logs de monitoring Parser des Go de fichiers texte? Détail par invocation vs. moyenne par minute Pages web Historisation? Applications en clusters? Sécurité?

JMX avec Spring <beans...>... <context:mbean- export/>... </beans> @ManagedResource("cocktail:name=ShoppingCartController,type=...") class ShoppingCartController { final AtomicInteger revenueincentscounter = new AtomicInteger(); @ManagedAttribute public int getrevenueincentscounter() { return revenueincentscounter.get(); } void purchase(...){... revenueincentscounter.addandget(priceincents); }

JMX

JMX & JSP Powered by JMX! Human readable et script friendly Attention sécurité! $ curl http://demo- cocktail.jmxtrans.cloudbees.net/5adruwr5/jmx- sales- metrics.txt.jsp Epoch SalesRevenueInCentsCounter SalesItemsCounter SalesOrdersCounter 1363217376 4500 7 2 http://demo-cocktail.jmxtrans.cloudbees.net/jmx.jsp curl http://demo- cocktail.jmxtrans.cloudbees.net/5adruwr5/... { "Epoch":1363217653, "SalesRevenueInCentsCounter":4050, "SalesItemsCounter":7, "SalesOrdersCounter":2 }

JMX & JSP /5ADrUWr5/jmx-sales-metrics.jsp Powered by JMX! Human readable et script friendly Attention sécurité! $ curl http://demo- cocktail.jmxtrans.cloudbees.net/5adruwr5/jmx- sales- metrics.txt.jsp Epoch SalesRevenueInCentsCounter SalesItemsCounter SalesOrdersCounter 1363217376 4500 7 2 http://demo-cocktail.jmxtrans.cloudbees.net/jmx.jsp curl http://demo- cocktail.jmxtrans.cloudbees.net/5adruwr5/... { "Epoch":1363217653, "SalesRevenueInCentsCounter":4050, "SalesItemsCounter":7, "SalesOrdersCounter":2 }

JMX & JSP Powered by JMX!

Alternatives à JMX

Alternatives à JMX Servo class ShoppingCartController { @Monitor(name="revenueInCents", type=counter) final AtomicInteger revenueincentscounter = new AtomicInteger(); void purchase(...){... revenueincentscounter.addandget(priceincents); }

Alternatives à JMX Metrics class ShoppingCartController { Servo final Counter revenueincentscounter = Metrics.newCounter( ShoppingCartController, "revenue- in- cents"); void purchase(...){... revenueincentscounter.inc(priceincents); } class ShoppingCartController { @Monitor(name="revenueInCents", type=counter) final AtomicInteger revenueincentscounter = new AtomicInteger(); void purchase(...){... revenueincentscounter.addandget(priceincents); }

JMX OS: Sysload JVM: Garbage Collector Tomcat: activesessions Application: Web Site Revenue

jmxtrans & embedded-jmxtrans 27 au 29 mars 2013

jmxtrans - standalone ecommerce Tomcat logistics Tomcat Graphite accounting Tomcat... jmxtrans - standalone

embedded-jmxtrans ecommerce Tomcat Graphite logistics Tomcat Librato accounting Tomcat... batch embedded-jmxtrans

standalone vs. embedded standalone embedded Packaging Modèle daemon externe, raccordement manuel des applications & des indicateurs agent embarqué, applications & indicateurs auto-raccordés / autonomes Curseur OPS - ----------- DEV OPS ---------- -- DEV Use case applis peu modifiables, middlewares, curseur OPS cloud, batch, curseur DEV/QA

jmxtrans & embedded-jmxtrans SOS Cocktail Graphite embedded

embedded-jmxtrans configuration

embedded-jmxtrans configuration <dependency> <groupid>org.jmxtrans.embedded</groupid> <artifactid>embedded- jmxtrans</artifactid> <version>1.0.5</version> </dependency>

embedded-jmxtrans configuration <dependency> <groupid>org.jmxtrans.embedded</groupid> <artifactid>embedded- jmxtrans</artifactid> <version>1.0.5</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>

embedded-jmxtrans configuration <dependency> <groupid>org.jmxtrans.embedded</groupid> <artifactid>embedded- jmxtrans</artifactid> <version>1.0.5</version> </dependency> <beans... { xmlns:jmxtrans="http://www.jmxtrans.org/schema/embedded" xsi:schemalocation="... http://www.jmxtrans.org/schema/embedded... > { "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}," <jmxtrans:jmxtrans> "enabled": "${graphite.enabled:true}" <jmxtrans:configuration>classpath:jmxtrans.json</jmxtrans:configuration> }... } </jmxtrans:jmxtrans> ] </beans> }

jmxtrans OS: Sysload JVM: Garbage Collector Tomcat: activesessions Application: Web Site Revenue

Graphite 27 au 29 mars 2013

Graphite BD de Time Series et solution de Graphe Utilisé par des grands du Web Similaires Simplicité et Self Service

Ecriture / Alimentation Création automatique des métriques Protocoles socket plain text & sérialisation Python Pickle echo "devoxx.happycounter 1.2 1364338989" nc localhost 2003 Précision et durée de stockage par configuration [sales_1min_for_15days_5min_for_1year] pattern = ^sales\. retentions = 60s:30d,300s:365d 1.7MB

Lecture / Consommation Composer de graphe & URL API Tout le monde peut créer ses graphes Fonctions Riches sum, scale, derivative, timeshift, deviation, filter,... Exports variés : png, svg, csv, json, raw text

Graphes et monitoring 27 au 29 mars 2013

Demo Graphite sur le Cloud http://hostedgraphite.com/ 1 email: admin@jmxtrans.org password: devoxx2013 Graphite as a Service Pas de tracas d installation addons: Tasseo No-OPS 2 3

Les métriques Gauge Ever Increasing Counter Exemples: activerequests, datasource.activeconnection,... Information exploitable immédiatement Exemples: requestscount, revenue,... Conversion nécessaire en par minute

Des graphes et des formules? Ever Increasing Counter Revenue per Second

Des graphes et des formules derivative()? Ever Increasing Counter Revenue per Second

Des graphes et des formules? Per Second -> Per Hour Revenue per Hour

Des graphes et des formules summarize()? Per Second -> Per Hour Revenue per Hour

Des graphes et des formules? 2 servers Total Revenue per Hour

Des graphes et des formules sumseries()? 2 servers Total Revenue per Hour

Des graphes et des formules? server restart Ignore reset to zero

Des graphes et des formules nonnegativederivative()? server restart Ignore reset to zero

Des graphes et des formules Compare to last week?

Des graphes et des formules Compare to last week timeshift()?

Des graphes et des formules OS: Sysload JVM: Garbage Collector Tomcat: activesessions Application: Web Site Revenue

Dashoards Wiki dashboard.prod.md # Sales <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

Dashoards by Email Envoyer les graphes par email

L alerting Intégrer Graphite à de l alerting URL Api Seyren Nagios 27 au 29 mars 2013

Intégrer Graphite à l alerting Utiliser l URL API Format rawtext ou JSON Pattern /render?from=- 11minutes&until=- 1minutes&format=raw&target=**** Exemple $ curl "http://graphite.exemple.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.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0

Alerting - Seyren Alerting Dashboard for Graphite Open Source Java.war + MongoDB Alertes email, PagerDuty,...

Alerting - Seyren http://seyren.jmxtrans.cloudbees.net/ OS: Sysload JVM: Garbage Collector Tomcat: activesessions Application: Web Site Revenue

Nagios Infrastructure Monitoring Open Source Standard de facto en entreprise check_graphite plugin Pierre-Yves Ritschard Jason Dixon / obfuscurity

Monitoring & Continuous Delivery 27 au 29 mars 2013

Monitoring & Continuous Delivery Livrer le monitoring avec l application Les indicateurs Les dashboards Builder en continue les configs par environnement Require: topologie des environnements intégrées au build Déploiement sur un repo (Maven,...) Déployer en automatique le monitoring

Monitoring & Continuous Delivery src/main/graphite/dashboard.template.md StringTemplate Cocktail App Dashboards - ${environment} - ${version} # Sales <table> <tr> <td> <img src="${graphite.baseurl}/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="${graphite.baseurl}/render/?..."> </td> <tr> </table> ${variable} Dashboard template

Monitoring & Continuous Delivery dashboard.template.md PROD-env-topology.json... QA-env-topology.json pom.xml <gmaven-plugin> dashboard.prod.md... dashboard.qa.md dashboard-generator.groovy repository https://github.com/jmxtrans/embedded-jmxtrans-samples/wiki/monitoring-continuous-deployment Monitoring dashboards Continuous Integration

Déploiement de Graphite 27 au 29 mars 2013

Déploiement de Graphite

Cadeau bonus! 27 au 29 mars 2013

Promo Code http://hostedgraphite.com/ 60 days trial with DEVOXX promo code (2) Enter Promo Code DEVOXX (1) Signup help: cleclerc@cloudbees.com (3) Promo Code DEVOXX

Conclusion 27 au 29 mars 2013

Conclusion Monitoring technique et métier Monitoring intégrée au Continuous Delivery de l appli L approche self-service transforme le monitoring Solutions Open Source disponibles Monitoring no longer sucks in Java! http://lusislog.blogspot.fr/2011/06/why-monitoring-sucks.html

http://demo-cocktail.jmxtrans.cloudbees.net/ http://jmxtrans.org/