Building a robust monitoring system part 2

Building a robust monitoring system part 2

In our last blog, we covered server monitoring and used New Relic to get all the metrics and alerts. So let’s install New Relic APM to zero in on service monitoring part.

What is an Application Performance Management

As the name suggests it is a tool which lets DevOps and Dev get the insights of the application in an environment where the application is deployed. It helps the team to learn more about bottlenecks within the application which can’t be fixed by providing more hardware resources. Below are the few salient features of an APM:

  1. Tracks the time consumed by all the requests
  2. Can show the stack trace of each transaction including all calls made to databases and other dependencies
  3. Helps you out the identify the slow queries and transaction
  4. Lets you know about which external service is the most time consuming
  5. Helps  you decide the apdex where you know how the application is performing to actual clients
  6. Alerts the team when there is performance degradation
  7. Displays detailed errors within the application and lets help in debugging.

How to install New Relic APM

New Relic APM installation is very easy and really easy to use.

Let’s install New Relic APM for PHP application.

Login to New Relic and go to APM section. Click on Add more.

New relic APM

Select the PHP to get agent installation

Select the OS you are using to get the repo details and further steps. Once you are done with the installation you will see an application under APM. By default, the name will be PHP application. Change it to a meaningful name so that anyone from your team can identify the application.

How to use New Relic APM

The New Relic is quite friendly and very informative but if you are a new user it might take some time. Let me get you aware of the terminology used here :

  1. Transaction – The code executed by the application which has the details of database calls, external services consumed etc. These are further divided in to
    1. Web transaction – Application which is served via HTTP
    2. Non-web transactions – These are applications which run in the background like cron jobs
  2. Apdex – It is a measure of response time compared to the threshold set by you i.e if you assume your application will respond back in a 1 sec and it does that the Apdex score will be a perfect 1 but in case some transactions didn’t respond in 1 sec the score will lower down.
  3. Service Maps – shows a high-level diagram of all services and dependencies your application has
  4. Key Transactions – You can identify and mark a few of your transaction as key transaction like add to cart or confirm the order.
  5. External services – This is very handy to let you know the external services consumed by the application and their behavior.

How to set an alarm for APM

If you need to get notified when your application performance deteriorates then APM alarms are for you. To get started go to the setting in your desired application and set a T value as per your requirement.

Following our last blog create an alert but this time instead of selecting server select APM

Select the application on which you need to be notified and then select the apdex score for warning and critical state and create the alert policy. Follow these steps to cover as many as applications.

 

With the APM in place, you have advanced your monitoring framework and added one more maturity level.

 

In our next blog, we will be covering service availability monitoring.

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *