In a microservice architecture, we need to monitor our services continuously and any issues should cause alerts immediately. We need a separate service that will continuously monitor and alert us whenever something weird happens.
Prometheus consists of the following:
- Prometheus server, which is responsible for scraping and storing the time series data
- Libraries to instrument the application code
- A push gateway for supporting short-lived jobs
- An exporter to Grafana to visualize data
- An alert manager
- Other support tools
It provides multi-dimensional data models, which are time series and are identified by metric name and key-value pair. It has a flexible dynamic query language. It supports pulling time series out of the box and pushing time series via an intermediary gateway. It has multiple modes of graphing and dashboard support.
It is helpful in finding out problems when there is an outage. Since it is autonomous and does not depend on any remote services, the data is sufficient for finding where the infrastructure is broken.
It is helpful in recording the time series data and monitoring either via machine or highly dynamic Service Oriented Architecture.
Some things to consider when choosing Prometheus over JHipster Console are as follows:
- Prometheus is very good at exploiting the metrics of your application and will not monitor logs or traces. JHipster console, on the other hand, uses the ELK stack and monitors the logs, traces, and metrics of your application.
- Prometheus can be used to query a huge amount of time series data. ELK on JHipster console is much more versatile in terms of tracking and searching the metrics and logs.
- JHipster console uses Kibana to visualize the data while Prometheus uses Grafana (https://grafana.com/) to visualize the metrics.