Scroll Top

Prometheus: Setting up Monitoring and Alerting for Application

monitoring

Introduction:

Prometheus is the open source monitoring solution which gives powerful metrics and alerts.

When to use?

  1. Time Series Data: It works well for numeric time series data.
  2. Multidimensional Data: If the organization follows Microservice architecture, Prometheus is a great tool to monitor multi-dimensional data.
  3. Machine Centric Monitoring: It is used for the machine-centric monitoring and application monitoring which is based on the service-oriented architecture.
  4. Quick Diagnose of the Infrastructure: It is designed for reliability. When something goes down Prometheus helps to debug and analyze the issues with the infrastructure.

When not to use?

  1. Accuracy: If the purpose is for 100% accuracy, like for billing systems, then it is not a suitable option.

Install Prometheus on Ubuntu

Step 1 | Download the latest version of the Binary


$ wget https://github.com/prometheus/prometheus/releases/download/v1.7.1/prometheus-1.7.1.linux-amd64.tar.gz

You can find the latest release of Prometheus here.

Step 2 | Untar zip file


$ tar -xvf prometheus-1.7.1.linux-amd64.tar.gz

Step 3 | Start Prometheus for Self Monitoring


./prometheus -config.file=prometheus.yml

Step 4 | Verify metrics

Verify that the prometheus will be running on port 9090.

Prometheus

Features

  1. Supports Multidimensional Data Model
  2. Time series collection
  3. A functional expression language that lets the user select and aggregate time series data in real time.
  4. Multiple modes for graphing and dashboarding.
  5. Service Discovery / Static Configuration are supported.

 Architecture

Prometheus

Architecture is also available here.

Push Gateway and Short-Lived Jobs: In Architecture, push gateway and short-lived jobs are used for the gathering the metrics.

Prometheus Server: Prometheus server runs independently and relies on local storage for processing and alerting. It gathers and stores all time series data. Where Prometheus server finds the targets from other services as well for example Kubernetes, Consul and DNS.

Alert Manager: Alert Manager is responsible for notifying the alert to the end user using different integrations like Pagerduty / Email.

UI: Prometheus is having its own Web UI, but it’s possible to use the Grafana as the user interface. You can check out our other blogs here.

Related Posts

Leave a comment