SlideShare a Scribd company logo
Monitoring your WO apps
Pascal Robert
Why monitoring?

•   Because you want to find out problems before your customers
    find them!

•   This is not about finding bugs in your app, more about finding
    deployment problems.

•   Have to be notified about any problems, including OS, hardware
    and Web server problems.
Nagios

•   My favorite tool for monitoring.

•   Been around since 1999 (was called Netsaint back in the days).

•   Open source (C and PERL code).

•   Works fine on Linux and OS X (use MacPorts to install on OS
    X).
Nagios
•   Can monitor many things with the default plugins : HTTP, SNMP,
    disk space, load, etc.

•   Can do remote checks (checks runs on the "client", essential for
    things like disk space or load).

•   Tons of plugins on Nagios Exchange, including for RDMBS like
    Oracle or MySQL.

•   Easy to write plugins, be it in PERL, Bash, C or even Java.
Nagios HTTP check
•   You can use the default "check_http" plugin.

•   Will check its state based on content's response, timeout, or
    HTTP response code (404, 500, etc.)

•   Can post data (might be useful for REST services).

•   Can specify a specific HTTP method (HEAD, OPTIONS, TRACE,
    PUT, DELETE, POST, GET).

•   Can even check if your SSL certificate is still valid!
DEMO
Java-specific checks


•   Checks with check_http are fine... but won't find some problems
    like "Out of memory" errors.

•   You can use JMX for that!
Java-specific checks

•   With JMX, you can monitor things like heap memory usage,
    number of threads, number of loaded classes and CPU usage.

•   Works fine on Java 5 and 6.

•   Easy to enable.
Enabling JMX in your app
bash-3.2# cp /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/management/
jmxremote.password.template /Library/WebObjects/jmxremote.password

bash-3.2# chown appserver /Library/WebObjects/jmxremote.password

bash-3.2# chmod 600 /Library/WebObjects/jmxremote.password

In your apps launch arguments:

-Dcom.sun.management.jmxremote.port=XXXX
-Dcom.sun.management.jmxremote.authenticate=true
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.password.file=/Library/WebObjects/jmxremote.password
WO-specific checks

•   With WO 5.4, the stats available from WOStats are also available
    by JMX.

•   It give you access to data like memory usage, average session
    memory, and average requests per session.

•   You need to enable JMX + add one line in your Application class
    constructor.
JConsole output
Enabling WO JMX in your app
   import com.webobjects.appserver.WOStatisticsStore;
	
public Application() {
...
    registerMBean((Object)statisticsStore(), getJMXDomain(), WOStatisticsStore.class.getName());
}
check_jmx

•   check_jmx is a Nagios plugin to connect to JMX-enabled apps.

•   Written in Java, source code is available.

•   Sadly, it can only check results of type number or string, no
    hashmap support.
DEMO
Finding EOF deadlocks

•   Create two DirectActions : one that use EOF, the other pure
    JDBC.

•   Make sure the DA returns the same result everytime.

•   Call the DA with check_http, and validate the result.

•   If the JDBC check is good, but not the EOF one, good chance
    that you have a EOF deadlock.
Checking wotaskd config

•   Nagios plugin that I wrote to check for various settings, based on
    the /admin direct actions available in Wonder's JavaMonitor.

•   Useful to check settings, like if auto recover or refuse new
    sessions is off, number of deaths have reached a certain level or
    that the app is not running.

•   Work in progress, will release it in late September.
Graphing

•   Would be nice to graph some data, like memory usage.

•   Lot of tools can do this (Cacti, SNMP tools, etc.), but you can do
    it with Nagios too.

•   Graphing and performance data are useful when stress loading
    your application with JMeter.

•   Look at PNP4Nagios or NagiosGraph if you want graphing.
Sample NagiosGraph chart
Resources


•   Nagios : http://www.nagios.org

•   JMX : http://download-llnw.oracle.com/javase/1.5.0/docs/guide/management/agent.html

•   check_jmx : http://exchange.nagios.org/directory/Plugins/Java-Applications-and-Servers/Syabru-
    Nagios-JMX-Plugin/details
Q&A
Monitoring your WO apps

More Related Content

PDF
2020 ADDO Spring Break OWASP ZAP Automation
ODP
2017 Codemotion OWASP ZAP in CI/CD
PDF
Better Monitoring for Python: Inclusive Monitoring with Prometheus (Pycon Ire...
PPTX
Monitoring 101 - Leveraging on the power of JMX
PDF
Coding for production
PDF
CNIT 127: L9: Web Templates and .NET
PPTX
Who’s afraid of WinDbg
PPTX
Unit testing hippo
2020 ADDO Spring Break OWASP ZAP Automation
2017 Codemotion OWASP ZAP in CI/CD
Better Monitoring for Python: Inclusive Monitoring with Prometheus (Pycon Ire...
Monitoring 101 - Leveraging on the power of JMX
Coding for production
CNIT 127: L9: Web Templates and .NET
Who’s afraid of WinDbg
Unit testing hippo

What's hot (15)

PPT
Speed Up Synchronization Locks: How and Why?
PPTX
ONOS System Test - ONS2016
PDF
How To Get The Most Out Of Your Hibernate, JBoss EAP 7 Application (Ståle Ped...
PDF
From 0 to 0xdeadbeef - security mistakes that will haunt your startup
PPTX
PDF
Casual mass parallel data processing in Java
PPTX
Monitoring What Matters: The Prometheus Approach to Whitebox Monitoring (Berl...
PPTX
How to Analyze Reports in Jmeter
PDF
Three Lessons about Gatling and Microservices
PPTX
Why internal pen tests are still fun
PDF
Gatling - Bordeaux JUG
PPTX
Performance testing using Jmeter for apps which needs authentication
PDF
Who Should Use Powershell? You Should Use Powershell!
PDF
Analyzing Java Applications Using Thermostat (Omair Majid)
PDF
Speed geeking-lotusscript
Speed Up Synchronization Locks: How and Why?
ONOS System Test - ONS2016
How To Get The Most Out Of Your Hibernate, JBoss EAP 7 Application (Ståle Ped...
From 0 to 0xdeadbeef - security mistakes that will haunt your startup
Casual mass parallel data processing in Java
Monitoring What Matters: The Prometheus Approach to Whitebox Monitoring (Berl...
How to Analyze Reports in Jmeter
Three Lessons about Gatling and Microservices
Why internal pen tests are still fun
Gatling - Bordeaux JUG
Performance testing using Jmeter for apps which needs authentication
Who Should Use Powershell? You Should Use Powershell!
Analyzing Java Applications Using Thermostat (Omair Majid)
Speed geeking-lotusscript
Ad

Similar to Monitoring your WebObjects apps (20)

PDF
Using Nagios to monitor your WO systems
PDF
OSMC 2009 | Application Monitoring - Bridging the gap... by Michael Medin
PPTX
What developers can really contribute in DevOps concept?
PDF
Proactive monitoring tools or services - Open Source
PDF
Nagios Conference 2007 | A Framework for Hardware-based Monitoring by Kevin ...
PDF
Diagnosing Your Application on the JVM
PPT
Nagios Conference 2007
PDF
Nagios 3
PPT
Nagios
PPTX
Functionality, security and performance monitoring of web assets (e.g. Joomla...
ODP
Open Source Monitoring Tools Shootout
PPTX
Nagios Conference 2011 - Nate Broderick - Nagios XI Large Implementation Tips...
PDF
Janice Singh - Writing Custom Nagios Plugins
PDF
Learning Nagios module 1
ODP
Monitoring shootout loadays
PDF
Nagios 3
PDF
Stop using Nagios (so it can die peacefully)
ODP
Nagios Conference 2011 - Ethan Galstad - Keynote Presentation
PDF
OSMC 2009 | Nagios Plugins: New features and future projects by Thomas Guyot-...
ODP
Monitoring at/with SUSE 2015
Using Nagios to monitor your WO systems
OSMC 2009 | Application Monitoring - Bridging the gap... by Michael Medin
What developers can really contribute in DevOps concept?
Proactive monitoring tools or services - Open Source
Nagios Conference 2007 | A Framework for Hardware-based Monitoring by Kevin ...
Diagnosing Your Application on the JVM
Nagios Conference 2007
Nagios 3
Nagios
Functionality, security and performance monitoring of web assets (e.g. Joomla...
Open Source Monitoring Tools Shootout
Nagios Conference 2011 - Nate Broderick - Nagios XI Large Implementation Tips...
Janice Singh - Writing Custom Nagios Plugins
Learning Nagios module 1
Monitoring shootout loadays
Nagios 3
Stop using Nagios (so it can die peacefully)
Nagios Conference 2011 - Ethan Galstad - Keynote Presentation
OSMC 2009 | Nagios Plugins: New features and future projects by Thomas Guyot-...
Monitoring at/with SUSE 2015
Ad

More from WO Community (20)

PDF
KAAccessControl
PDF
In memory OLAP engine
PDF
Build and deployment
PDF
High availability
PDF
Reenabling SOAP using ERJaxWS
PDF
Chaining the Beast - Testing Wonder Applications in the Real World
PDF
D2W Stateful Controllers
PDF
Deploying WO on Windows
PDF
Unit Testing with WOUnit
PDF
Life outside WO
PDF
Apache Cayenne for WO Devs
PDF
Advanced Apache Cayenne
PDF
Migrating existing Projects to Wonder
PDF
iOS for ERREST - alternative version
PDF
iOS for ERREST
PDF
"Framework Principal" pattern
PDF
Filtering data with D2W
PDF
PDF
Localizing your apps for multibyte languages
PDF
KAAccessControl
In memory OLAP engine
Build and deployment
High availability
Reenabling SOAP using ERJaxWS
Chaining the Beast - Testing Wonder Applications in the Real World
D2W Stateful Controllers
Deploying WO on Windows
Unit Testing with WOUnit
Life outside WO
Apache Cayenne for WO Devs
Advanced Apache Cayenne
Migrating existing Projects to Wonder
iOS for ERREST - alternative version
iOS for ERREST
"Framework Principal" pattern
Filtering data with D2W
Localizing your apps for multibyte languages

Recently uploaded (20)

PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Big Data Technologies - Introduction.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Advanced Soft Computing BINUS July 2025.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Approach and Philosophy of On baking technology
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Advanced IT Governance
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPT
Teaching material agriculture food technology
PDF
cuic standard and advanced reporting.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
Dropbox Q2 2025 Financial Results & Investor Presentation
GamePlan Trading System Review: Professional Trader's Honest Take
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Big Data Technologies - Introduction.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Advanced Soft Computing BINUS July 2025.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Approach and Philosophy of On baking technology
Understanding_Digital_Forensics_Presentation.pptx
Advanced IT Governance
“AI and Expert System Decision Support & Business Intelligence Systems”
MYSQL Presentation for SQL database connectivity
Chapter 3 Spatial Domain Image Processing.pdf
Teaching material agriculture food technology
cuic standard and advanced reporting.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Reach Out and Touch Someone: Haptics and Empathic Computing

Monitoring your WebObjects apps

  • 1. Monitoring your WO apps Pascal Robert
  • 2. Why monitoring? • Because you want to find out problems before your customers find them! • This is not about finding bugs in your app, more about finding deployment problems. • Have to be notified about any problems, including OS, hardware and Web server problems.
  • 3. Nagios • My favorite tool for monitoring. • Been around since 1999 (was called Netsaint back in the days). • Open source (C and PERL code). • Works fine on Linux and OS X (use MacPorts to install on OS X).
  • 4. Nagios • Can monitor many things with the default plugins : HTTP, SNMP, disk space, load, etc. • Can do remote checks (checks runs on the "client", essential for things like disk space or load). • Tons of plugins on Nagios Exchange, including for RDMBS like Oracle or MySQL. • Easy to write plugins, be it in PERL, Bash, C or even Java.
  • 5. Nagios HTTP check • You can use the default "check_http" plugin. • Will check its state based on content's response, timeout, or HTTP response code (404, 500, etc.) • Can post data (might be useful for REST services). • Can specify a specific HTTP method (HEAD, OPTIONS, TRACE, PUT, DELETE, POST, GET). • Can even check if your SSL certificate is still valid!
  • 7. Java-specific checks • Checks with check_http are fine... but won't find some problems like "Out of memory" errors. • You can use JMX for that!
  • 8. Java-specific checks • With JMX, you can monitor things like heap memory usage, number of threads, number of loaded classes and CPU usage. • Works fine on Java 5 and 6. • Easy to enable.
  • 9. Enabling JMX in your app bash-3.2# cp /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/management/ jmxremote.password.template /Library/WebObjects/jmxremote.password bash-3.2# chown appserver /Library/WebObjects/jmxremote.password bash-3.2# chmod 600 /Library/WebObjects/jmxremote.password In your apps launch arguments: -Dcom.sun.management.jmxremote.port=XXXX -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.password.file=/Library/WebObjects/jmxremote.password
  • 10. WO-specific checks • With WO 5.4, the stats available from WOStats are also available by JMX. • It give you access to data like memory usage, average session memory, and average requests per session. • You need to enable JMX + add one line in your Application class constructor.
  • 12. Enabling WO JMX in your app import com.webobjects.appserver.WOStatisticsStore; public Application() { ... registerMBean((Object)statisticsStore(), getJMXDomain(), WOStatisticsStore.class.getName()); }
  • 13. check_jmx • check_jmx is a Nagios plugin to connect to JMX-enabled apps. • Written in Java, source code is available. • Sadly, it can only check results of type number or string, no hashmap support.
  • 14. DEMO
  • 15. Finding EOF deadlocks • Create two DirectActions : one that use EOF, the other pure JDBC. • Make sure the DA returns the same result everytime. • Call the DA with check_http, and validate the result. • If the JDBC check is good, but not the EOF one, good chance that you have a EOF deadlock.
  • 16. Checking wotaskd config • Nagios plugin that I wrote to check for various settings, based on the /admin direct actions available in Wonder's JavaMonitor. • Useful to check settings, like if auto recover or refuse new sessions is off, number of deaths have reached a certain level or that the app is not running. • Work in progress, will release it in late September.
  • 17. Graphing • Would be nice to graph some data, like memory usage. • Lot of tools can do this (Cacti, SNMP tools, etc.), but you can do it with Nagios too. • Graphing and performance data are useful when stress loading your application with JMeter. • Look at PNP4Nagios or NagiosGraph if you want graphing.
  • 19. Resources • Nagios : http://www.nagios.org • JMX : http://download-llnw.oracle.com/javase/1.5.0/docs/guide/management/agent.html • check_jmx : http://exchange.nagios.org/directory/Plugins/Java-Applications-and-Servers/Syabru- Nagios-JMX-Plugin/details