Prometheus Integration


Overview

Prometheus is an open-source software application that is used for systems/event monitoring and alerting. It records, collects, and stores real-time data in the form of time series using HTTP pull model, and aids in discovering and monitoring various resources using flexible queries and real-time alerting.

With Prometheus integration, you can automatically fetch scrape jobs configured from Prometheus server and categorize it into various monitor types supported in Applications Manager. Integrating Prometheus with Applications Manager enables you to achieve the following:

  • Automatic categorization of monitor type based on scrape job.
  • Data visualization within the product without the need for third-party tools.
  • Configuration of alerts, actions and reports for all the collected metrics.

Note: Currently, Applications Manager supports only basic authentication for Prometheus API Data collection.

Prerequisites

Prometheus server should be reachable to the system where Applications Manager is installed. If Prometheus server is deployed as a Pod/Container, the option cURL through SSH can be used for discovery and data collection, for which, the server should be accessible with localhost IP address or Pod IP address.

Supported Monitor Types :

Monitor type Prerequisites
Openshift Refer here
Tomcat Server Refer here

Steps to add integration

Follow the steps given below to integrate Prometheus with Applications Manager:

  1. After logging into Applications Manager, navigate to Settings → Product Settings → Add-On Settings.
  2. Click on Add icon shown in the Prometheus section. This will take you to the Prometheus integration page.
  3. Enter the Display Name of the add-on integration.
  4. Specify the Polling Interval time for discovery, in minutes.
  5. Choose Mode of data collection. Select Exposed Prometheus API if Prometheus server/pod is exposed over the network. Select cURL through SSH if Prometheus is accessible only on deployed server.
  6. Specify the Prometheus Server Details such as Host, API Port, Endpoint and the Protocol to be used while accessing Prometheus API.
  7. Choose Authentication to be either No Authentication, Basic Authentication or Service Account Token.
  8. Follow the given steps according to the type of authentication you prefer:
    • No Authentication: Enable if Prometheus Endpoint URL is unauthenticated.
    • Basic Authentication: Enable if Prometheus Endpoint URL is authenticated with Basic Authentication.
      • Enter the Basic Authentication credentials.
    • Service Account Token based Authentication: Enable if Prometheus Endpoint URL is authenticated with Service account from Openshift.
      • Enter the Service Account Token.
  9. Enter the required SSH Connection Details if the Mode of data collection is selected as cURL through SSH.
  10. Choose the Monitor Types, Discovery Options and the Action to be performed in case of data unavailability for discovered monitors.
  11. Click Save.

After performing the above steps, you can view the list of discovered and monitors in the Add-on-settings page. A button named Show Monitors will be present at the top right corner of each added integration thumbnail, clicking which will display the list of monitors added for that integration.

In addition, you can use various options to handle the monitor addition while performing the discovery. Use the Specific Instances option to customize the discoveries based on specific instances. Also, there are options to auto delete, un-manage monitors, and alert users if data is not available on Prometheus server.