Introduction:
Prometheus is the open source monitoring solution which gives powerful metrics and alerts.
When to use?
- Time Series Data: It works well for numeric time series data.
- Multidimensional Data: If the organization follows Microservice architecture, Prometheus is a great tool to monitor multi-dimensional data.
- Machine Centric Monitoring: It is used for the machine-centric monitoring and application monitoring which is based on the service-oriented architecture.
- 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?
- 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
.
Features
- Supports Multidimensional Data Model
- Time series collection
- A functional expression language that lets the user select and aggregate time series data in real time.
- Multiple modes for graphing and dashboarding.
- Service Discovery / Static Configuration are supported.
Architecture
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.