Home

Felix edited this page Feb 2, 2017 · 24 revisions

stagemonitor-h100px

To get started with stagemonitor, check out the installation page.

What is stagemonitor?

Stagemonitor is an open source java application performance monitoring solution which gives you all the tools you need in development, quality assurance and production to monitor the performance of your Java web app. Stagemonitor was built with clustered application stacks in mind and it is possible to view historical as well as live data from your cluster or your developer server.

Stagemonitor includes an agent that sits inside your Java application and sends metrics and request traces to a central database. It also includes dashboards to visualize and analyze the metrics and requests. While it is specialized in web applications, stagemonitor also has support for other types of applications.

Architecture

┌─────────────────┐      ┌─────────────┐     ┌───────────────────────────┐
│ Your Java       │      │Elasticsearch│     │ Kibana/Grafana            │
│ application     │      │(or Graphite/│     │ The Kibana and Grafana    │
│ ┌─────────────┐ │      │ InfluxDB)   │     │ dashboards visualize      │
│ │stagemonitor ├─┼──┬───>             <─────┤ metrics and let you       │
│ └─────┬───────┘ │  │   │             │     │ analyze captured requests │
└───────┼─────────┘  │   └─────────────┘     └───────────────────────────┘
        │            │
        │      The stagemonitor agent sits inside your 
        │      application and sends metrics and details
        │      about requests (request traces) to Elasticsearch. 
        │      Metrics can optionally be sent to Graphite, InfluxDB 
        │      and Prometheus.
┌───────V───────────┐
│ In browser widget │
│                   │
│ Lets you analyze  │
│ metrics and call  │
│ trees in your     │
│ browser without   │
│ installing a      │
│ backend           │
└───────────────────┘

What are the main Features and use cases?

Development-time monitoring

In many cases you only learn about performance problems when it is way too late: when you get calls from an angry customer that your site is too slow.

call-tree

Stagemonitor’s in-browser-widget helps you to optimize your website while you are developing it. Stagemonitor injects a small icon on the lower right corner of your web page. This opens a door into the application monitoring dashboard:

  • Call tree - The first screen shows a call tree of all methods and SQL queries that were executed during the current request. That way you can easily identify bottlenecks in your code.
  • HTTP requests - In the request tab, you can find general information of the request like the response size, request headers and user agent details.
  • Ajax Requests - Stagemonitor is capable of capturing ajax requests. Go to the Ajax Requests tab to select which request you want to analyze.
  • Configurable alerts - You can define thresholds for the page load time and the number of SQL queries during a request. The icon notifies you by flashing, if the performance does not keep up with your predefined limits.
  • Real time graphs - There is also a metrics tab which shows you live updating graphs, for example of your JVM application and your operating system.

The best thing is that you don’t have to install any kind of backend for that.

Production monitoring

Not only useful for development, but you can also use stagemonitor to monitor your production clusters.

Do you want to know what the most common source of errors is, what the series of requests that lead to an error looked like or why a specific request yesterday at 7:36 was slow? Stagemonitor offers a dashboard you can use to search and analyze detailed request traces of the incoming HTTP requests which gives you the answers.

There are different dashboards for monitoring your whole cluster:

  • The request dashboard tells you about the response times and the throughput of your user’s requests. It also lets you quickly identify the business transactions with the highest response time, throughput and error rate.
  • The JVM dashboard contains information about the heap utilisation, the garbage collector and the CPU utilisation of the JVM.
  • There are even more dashboards that contain metrics, for example of EhCache, logging behaviour, application server stats, database queries and the operating system.

How does stagemonitor work?

Request Monitoring

Stagemonitor monitors applications with the help of servlet filters and bytecode manipulation. Servlet API 3.0 brings support for registering filters automatically. Stagemonitor makes use of this feature to register its RequestMonitoringFilter which measures metrics like the response time, error rates and throughput. These metrics are then sent to a time series database (for example Elasticsearch, Graphite or InfluxDB). Stagemonitor is a plugin based system and there are plugins that collect metrics from the operating system, for example.

The RequestMonitoringFilter is also responsible for injecting the in-browser-widget into all of your HTML pages. It buffers the content of the generated HTML and appends the widget code.

Stagemonitor is also sending detailed information about incoming requests (request traces) to Elasticsearch and offers a Kibana dashboard which gives you deep insight into the behavior of your users and misbehaving parts of your application. Klick here to see more details.

Dashboards

On startup, stagemonitor automatically populates preconfigured monitoring dashboards to your Kibana or Grafana installation. Of course, you are free to modify them or create your own dashbaords.