Skip to main content
Sumo Logic

Install the HAProxy Monitors, App, and View the Dashboards

This page has instructions for installing the Sumo App for HAProxy and the descriptionfor the app dashboard.

This page has instructions for installing Sumo Logic Monitors for HAProxy, the app and descriptions of each of the app dashboards.

Sumo Logic has provided pre-packaged alerts available through Sumo Logic monitors to help you proactively determine if a HAProxy cluster is available and performing as expected. These monitors are based on metric and log data and include pre-set thresholds that reflect industry best practices and recommendations. For more information about individual alerts, see HAProxy Alerts.

To install these monitors, you must have the Manage Monitors role capability.

You can install monitors by importing a JSON file or using a Terraform script.

Method 1: Install Monitors by importing a JSON file

  1. Download the JSON file that describes the monitors. 

  2. The JSON contains the alerts that are based on Sumo Logic searches that do not have any scope filters and therefore will be applicable to all HAProxy clusters, the data for which has been collected via the instructions in the previous sections.  

However, if you would like to restrict these alerts to specific clusters or environments, update the JSON file by replacing the text proxy_cluster=* with <Your Custom Filter>.  

Custom filter examples: 

  1. For alerts applicable only to a specific cluster, your custom filter would be:  proxy_cluster=dev-haproxy01

  2. For alerts applicable to all clusters that start with haproxy-prod, your custom filter would be: proxy_cluster=haproxy-prod*

  3. For alerts applicable to a specific cluster within a production environment, your custom filter would be: 

proxy_cluster=dev-haproxy01 AND environment=prod (This assumes you have set the optional environment tag while configuring collection)

  1. Go to Manage Data > Alerts > Monitors.

  2. Click Add.

  3. Click Import.

  4. On the Import Content popup, enter HAProxy in the Name field, paste in the JSON into the the popup, and click Import.

  5. The monitors are created in a "HAProxy" folder. The monitors are disabled by default. See the Monitors topic for information about enabling monitors and configuring notifications or connections.

Method 2: Install Monitors using a Terraform script

Generate a Sumo Logic access key and ID

Generate an access key and access ID for a user that has the Manage Monitors role capability. For instructions see  Access Keys

Download and install Terraform

Download Terraform 0.13 or later, and install it. 

Download the Sumo Logic Terraform package for HAProxy monitors

The alerts package is available in the Sumo Logic github repository. You can either download it using the git clone command or as a zip file. 

Alert Configuration 

After extracting the package , navigate to the  terraform-sumologic-sumo-logic-monitor/monitor_packages/haproxy/ directory.

Edit the file and add the Sumo Logic Access Key and Access ID from Step 1 and your Sumo Logic deployment. If you're not sure of your deployment, see Sumo Logic Endpoints and Firewall Security

access_id   = "<SUMOLOGIC ACCESS ID>"

access_key  = "<SUMOLOGIC ACCESS KEY>"

environment = "<SUMOLOGIC DEPLOYMENT>"

The Terraform script installs the alerts without any scope filters, if you would like to restrict the alerts to specific clusters or environments, update the haproxy_data_source variable. For example:

To configure alerts for...

Set haproxy_data_source to something like :

A specific cluster

All clusters in an environment


Multiple clusters using a wildcard


A specific cluster within a specific environment

proxy_cluster=haproxy-1 and environment=prod


This assumes you have configured and applied Fields as described in Step 1: Configure Fields of the Sumo Logic of the Collect Logs and Metrics for HAProxy topic.

All monitors are disabled by default on installation. To enable all of the monitors, set the monitors_disabled parameter to false.

By default, the monitors will be located in a "HAProxy" folder on the Monitors page. To change the name of the folder, update the monitor folder name in the folder variable in the file.

If you want the alerts to send email or connection notifications, follow the instructions in the next section.

Email and Connection Notification Configuration Examples

Edit the file to populate the connection_notifications and email_notifications sections. Examples are provided below.

Pagerduty connection example

In the variable definition below, replace <CONNECTION_ID> with the connection ID of the Webhook connection. You can obtain the Webhook connection ID by calling the Monitors API.

connection_notifications = [
      connection_type       = "PagerDuty",
      connection_id         = "<CONNECTION_ID>",
      payload_override      = "{\"service_key\": \"your_pagerduty_api_integration_key\",\"event_type\": \"trigger\",\"description\": \"Alert: Triggered {{TriggerType}} for Monitor {{Name}}\",\"client\": \"Sumo Logic\",\"client_url\": \"{{QueryUrl}}\"}",
      run_for_trigger_types = ["Critical", "ResolvedCritical"]
      connection_type       = "Webhook",
      connection_id         = "<CONNECTION_ID>",
      payload_override      = "",
      run_for_trigger_types = ["Critical", "ResolvedCritical"]

Email notifications example

email_notifications = [
      connection_type       = "Email",
      recipients            = [""],
      subject               = "Monitor Alert: {{TriggerType}} on {{Name}}",
      time_zone             = "PST",
      message_body          = "Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}",
      run_for_trigger_types = ["Critical", "ResolvedCritical"]
Install Monitors
  1. Navigate to the terraform-sumologic-sumo-logic-monitor/monitor_packages/haproxy/ directory and run terraform init. This will initialize Terraform and download the required components.
  2. Run terraform plan to view the monitors that Terraform will create or modify.
  3. Run terraform apply.

This section demonstrates how to install the HAProxy App.

Install the App

Now that you have set up collection for HAProxy, you can install the HAProxy App to use the pre-configured searches and dashboard that provide insight into your data.

To install the App, do the following:

Locate and install the app you need from the App Catalog. If you want to see a preview of the dashboards included with the app before installing, click Preview Dashboards.

  1. From the App Catalog, search for and select the app. 
  2. Select the version of the service you're using and click Add to Library.
  1. To install the app, complete the following fields.
    1. App Name. You can retain the existing name, or enter a name of your choice for the app.

    2. Data Source. Select either of these options for the data source.

      • Choose Source Category, and select a source category from the list.

      • Choose Enter a Custom Data Filter, and enter a custom source category beginning with an underscore. Example: (_sourceCategory=MyCategory).

    3. Advanced. Select the Location in Library (the default is the Personal folder in the library), or click New Folder to add a new folder.
  2. Click Add to Library.

Once an app is installed, it will appear in your Personal folder, or other folder that you specified. From here, you can share it with your organization. 

Panels will start to fill automatically. It's important to note that each panel slowly fills with data matching the time range query and received since the panel was created. Results won't immediately be available, but with a bit of time, you'll see full graphs and maps. 

HAProxy - Overview

The HAProxy - Overview dashboard provides an at-a-glance view of HAProxy Backend and Frontend HTTP error codes percentage, visitor location, URLs and Clients causing errors.

  • Identify Frontend and Backend Sessions percentage usage to understand active sessions. This can help you increase the HAProxy session limit.
  • Gain insights into originated traffic location by region. This can help you allocate computer resources to different regions according to their needs.
  • Gain insights into Client, Server Responses on HAProxy Server. This helps you identify errors in HAProxy Server.
  • Gain insights into Network traffic for the Frontend and Backend system of your HAProxy server.

HAProxy - Backend

The HAProxy - Backend dashboard provides an at-a-glance view for the number of backend active servers, backend weight, respond code from backend and throught put http. 

HAProxy - Frontend

The HAProxy - Backend dashboard provides an at-a-glance view detail of HAProxy Frontend. It provides information such as number request to frontend, number of error requests,s, and current session.

HAProxy - Server

The HAProxy - Backend dashboard provides an at-a-glance view detail of HAProxy Server.  This dashboard helps you monitoring uptime, and error request by proxy.

HAProxy - Error Log Analysis

The HAProxy  - Error Logs Analysis dashboard provides a high-level view of log level breakdowns, comparisons, and trends. The panels also show the geographic locations of clients and clients with critical messages, new connections and outliers, client requests, request trends, and request outliers.

Use this dashboard to:

  • Track requests from clients. A request is a message asking for a resource, such as a page or an image.
  • To track and view client geographic locations generating errors.
  • Track critical alerts and emergency error alerts.

HAProxy - Outlier Analysis

The HAProxy -  Outlier Analysis dashboard provides a high-level view of HAProxy server outlier metrics for bytes served, number of visitors, and server errors. You can select the time interval over which outliers are aggregated, then hover the cursor over the graph to display detailed information for that point in time.

Use this dashboard to:

  • Detect outliers in your infrastructure with Sumo Logic’s machine learning algorithm. 
  • To identify outliers in incoming traffic and the number of errors encountered by your servers.

HAProxy - Threat Analysis

The HAProxy - Threat Intel dashboard provides an at-a-glance view of threats to HAProxy servers on your network. Dashboard panels display the threat count over a selected time period, geographic locations where threats occurred, source breakdown, actors responsible for threats, severity, and a correlation of IP addresses, method, and status code of threats.

Use this dashboard to:

  • To gain insights and understand threats in incoming traffic and discover potential IOCs. Incoming traffic requests are analyzed using the Sumo - Crowdstrikes threat feed.

HAProxy - Trends

The HAProxy - Trends dashboard provides an at-a-glance view of traffic to HAProxy servers on your network. Dashboard panels display the traffic count over one day time period, locations where traffic trends for visits by country one days time 

HAProxy - Visitor Access Types

The HAProxy - Visitor Access Types dashboard provides insights into visitor platform types, browsers, and operating systems, as well as the most popular mobile devices, PC and Mac versions used.

Use this dashboard to:

  • Understand which platform and browsers are used to gain access to your infrastructure.
    These insights can be useful for planning in which browsers, platforms, and operating systems (OS) should be supported by different software services.

HAProxy - Visitor Locations

The HAProxy - Visitor Locations dashboard provides a high-level view of HAProxy visitor geographic locations both worldwide and in the United States. Dashboard panels also show graphic trends for visits by country over time and visits by  US region over time.

Use this dashboard to:

  • Gain insights into geographic locations of your user base.  This is useful for resource planning in different regions across the globe.

HAProxy - Visitor Traffic Insight

The HAProxy - Visitor Traffic Insight dashboard provides detailed information on the top documents accessed, top referrers, top search terms from popular search engines, and the media types served.

Use this dashboard to:

  • To understand the type of content that is frequently requested by users. 
  • It helps in allocating IT resources according to the content types.

HAProxy - Web Server Operations

The HAProxy - Web Server Operations dashboard provides a high-level view combined with detailed information on the top ten bots, geographic locations, and data for clients with high error rates, server errors over time, and non 200 response code status codes. Dashboard panels also show information on server error logs, error log levels, error responses by a server, and the top URIs responsible for 404 responses.

Use this dashboard to:

  • Gain insights into Client, Server Responses on HAProxy Server. This helps you identify errors in HAProxy Server.
  • To identify geo locations of all Client errors. This helps you identify client location causing errors and helps you to block client IPs.