To blog |

Integrating With Plumbr

September 30, 2019 by Ram Iyengar Filed under: Blog Plumbr Product Updates

Every engineering team has their own method to work with incidents on production. It is therefore imperative that we work along with the tools that engineers presently use. Plumbr integrations add value to your existing processes without having to undertake major changes to your workflows. Plumbr provides the data from real user monitoring and application performance monitoring that you can insert into existing engineering processes. 

Plumbr monitors applications at two discrete levels. 

One is from the client-side, known as real user monitoring. Real user monitoring data allows you to understand how your application is behaving for users. It gives you a complete profile of the application availability and performance from the perspective of clients used to access the application. Real user monitoring with Plumbr work irrespective of what technology you are using to run your application in the back. 

The second dimension of Plumbr data comes from application performance monitoring. By monitoring the runtime upon which your applications function, Plumbr provides data about any degradation occurring on the server-side of a web application. Plumbr works with specific runtimes (JVM-based and PHP) and can support a limited number of related languages and frameworks (Java, Scala, Akka, Groovy and PHP frameworks such as Drupal, WordPress, Magento, and several others). 

The data from monitoring is available for you to integrate into your workflows using Plumbr integrations. These integrations come in several types that allow you to empower your teams in distinct ways. 

1. Native integrations with email

Plumbr data can be sent to your teams using an email. Use a team alias to notify an entire list of stakeholders, or individuals who are responsible for an application. You can configure many email channels, and use them for each application as needed. 

Take the following steps to configure one within Plumbr:

  1. Click on the Hamburger icon () next to the Plumbr icon on the top-left corner within Plumbr. 

2. Navigate to the Settings (⚙️) button and click on it.

3. Within the menu on the left, under ‘Product’ navigate to ‘Alert channels’ and click on it. 

4. This will open up the Alert channels. Click on ‘Add New Alert Channel’. 

5. Select the email channel from the dropdown. Enter the email id or the email alias you would like to use. Save it to create a channel. 

This will make emails available as a channel that you can use to send engineers Plumbr data. 

2. Native integrations with dev tools

You can add integrations to various tools such as Slack, Jira, and PagerDuty. Each of these tools has a means with which they allow incoming webhooks to post data into them. Use the individual options to add data to these tools. 

For example, with PagerDuty:

  1. Head to https://your-company-name.pagerduty.com/services/new
  2. Fill in all the details in the “General Settings” form
  3. In “Integration Settings” section choose “Use our API directly”
  4. Choose the desired “Incident Settings”
  5. Click on “Add Service” button
  6. Copy generated “Integration Key” to corresponding input field

By integrating with the various dev tools that are available, you will be able to make use of Plumbr data in a seamless way. 

3. Native integrations with monitoring tools

Plumbr allows you to integrate with monitoring and alerting tools such as Nagios, Prometheus, and Zabbix. This will allow you to add real user monitoring data to existing alerting configurations that you have in place. By integrating with various monitoring tools, you will be able to aggregate metrics, improve incident detection, and make remediation better. 

Here is an example of how to make use of Plumbr along with Nagios. Create a custom command definition as follows:

define command {
    command_name    check_plumbr
    command_line    /path/to/check_plumbr_data.sh -srv "<full_server_url>" -u <username>:<password> $ARG1$
}

Replace the placeholders with actual values.

You will then be required to define a custom service such as:

define service {
    use                           generic-service
    service_description           Plumbr: Login to example.com
    host_name                     example-host
    check_command                 check_plumbr!-a example.com -s login -c 1
}

Similarly, you can find documentation about integrating with Prometheus and Zabbix.

4. Integration via the Plumbr API

At times, integration needs may not be easily defined and you would like to create some custom integrations to suit your workflow better. In such cases, we recommend teams to use the Plumbr API. Using the Plumbr API you can query the Plumbr monitoring infrastructure for data about the availability and performance of the underlying system. 

An example query is given below:

$ curl -s -u admin@example.com "https://app.plumbr.io/api/v4/users/summary?
context=applicationName%3Dshop.example.com&last=4h"

Response:

[
   {
      "total" : 1218,
      "failed" : 79,
      …
 …
   }
]

By using similar queries, you can build out cron jobs and scripts that can provide additional alerting or other processes needed to help operate your production systems better. 

5.Special cases

There might be integration cases which we have not covered in this document, but can certainly provide coverage for. Please reach out to us via support@plumbr.io for any questions or queries you may have. Notable ommissions at this point include:

  1. Customizing the email template that gets sent out. 
  2. Using multiple channels with data from a single application.
  3. Configuring these options on an on-prem installation of Plumbr.
  4. If you have the need to integrate with any of the tools that we have not mentioned here.

Icons made by turkkub from www.flaticon.com

ADD COMMENT