In a previous article, JENNIFER Events and Alerts, we gave an introduction to JENNIFER EVENTS system. In this article, we will see how the EVENT system can be used in action. We will see how to analyze a transaction when an event occurs, how to configure EVENT settings and how to generate a comparing-data-based event.
When an event occurs in a system, there are several areas in JENNIFER from which you can start analyzing the transaction in order to figure out the reason for the event.
- JENNIFER will show a notification in the notification panel describing the event details, with a link to analyze the transaction in X-View if applicable.
- The instance/agent icon color will change depending on the event severity. Double-clicking the icon will open the EVENT list pop-up window, from which you can see a list of all events that took place in the current day.
- X-View will show the transaction in which the event took place with different color, that way it is easier to spot the transaction and start analyzing it.
We will use our iHotel sample application in our examples of the EVENT analysis. Let us consider the following example.
A user is trying to create a new account at the iHotel website. However, the user is always presented with an error message, and the account creation process always fails.
Looking at JENNIFER dashboard, we can see that JENNIFER already show a notice about an EVENT.
If we click on the notification icon on the upper right of the dashboard, we can see that an SQL_EXCEPTION error took place in the /ihotel/doSignup transaction.
Clicking on the EVENT will show more details including the exception message if any, and a link to view the transaction in X-View.
Clicking the "Transaction Analysis" will show the transaction details in X-View. Once we take a look at the transaction we can see the ERROR message stating that the username cannot be null. Which indicates that the application developer forgot to perform validation on the data before attempting to save it to the database.
Every Java application makes use of the Java Exceptions to handle errors occurred during application processing logic. In this example, we will see how we can configure our agent to catch custom application exceptions.
Back to our iHotel sample application, when the application fails to process certain user requests, it throws a custom application exception. The error page presented to the user looks like the following.
The exception edu.jennifer.hotel.exceptions.ParseException thrown by the application is a custom application exception. In order to let JENNIFER show those kinds of error, we need to configure the enable_method_exception_event option. We can use this option to show exception thrown by application methods.
First, we need to enable the enable_method_exception_event option by settings its value to "true" from the agent advanced options. Secondly, we need to make sure that the method throwing the exception is under BCI, i.e, method profiling is enabling.
After we finish our configuration, whenever a method exception occurs, JENNIFER will show it in the events list as well as in the X-View transactions details.
The last example we will look at is the Compare EVENT settings. Rather than setting absolute values as an EVENT trigger or threshold, the EVENT compare allows you to generate EVENTs by comparing data from different time periods. You can think of it as a base-line trigger for your event.
We will configure JENNIFER to trigger an EVENT when the system's TPS increase by 5% compared to the same day of the past week. To do so, open the EVENT rule menu item, and select the Compare EVENT tab.
Then, click the "Add" button to add a new rule. The rule configuration looks as follow
Now, this rule is active, and whenever the TPS of the current day increases by 5% compare to the same day of the past week, JENNIFER will generate the EVENT and we can see it in the EVENT lists.
Note that JENNIFER does not show a link to analyze transaction on X-View from Metrics Event and Compare Event
In this article, we saw how to configure and use JENNIFER events and the EVENT rules system.
In our next article, we will explain how to use the notification system in JENNIFER to send alerts to system admin when a participle event occurs.