Why does Prometheus stand out?

No technology or concept will be a silver bullet to solve all problems, some are just trade-offs and choices "


image


Prometheus was inspired by Google’s Brogmon monitoring system (similar Kubernetes evolved from Google’s Brog system). It was developed by former Google engineers in the form of open source software in Soundcloud since 2012, and was released in early 2015. version. In May 2016, it became the second project to officially join the CNCF Foundation after Kubernetes, and version 1.0 was officially released in June of the same year. At the end of 2017, version 2.0 based on a new storage layer was released, which can better cooperate with container platforms and cloud platforms.

image


As a new generation of cloud native monitoring system, Prometheus has more than 650+ contributors participating in Prometheus' R&D work, and more than 120+ third-party integrations.


Monitoring goal


In the book "SRE: Google Operation and Maintenance Decryption", it is pointed out that the monitoring system needs to be able to effectively support white box monitoring and black box monitoring. Through the white box, the actual internal operating status can be understood, and the possible problems can be predicted through the observation of the monitoring indicators, so as to optimize the potential uncertain factors. Black box monitoring, such as HTTP probes, TCP probes, etc., can quickly notify relevant personnel for processing when a system or service fails. Through the establishment of a complete monitoring system, the following objectives can be achieved:

  • Long-term trend analysis: Through continuous collection and statistics of monitoring sample data, long-term trend analysis of monitoring indicators is carried out. For example, by judging the growth rate of disk space, we can predict in advance at what time the node will need to expand the resources.

  • Comparative analysis: What is the difference in resource usage between the two versions of the system? How does the concurrency and load change of the system under different capacity conditions? The system can be easily tracked and compared through monitoring.

  • Alarm: When the system appears or is about to fail, the monitoring system needs to respond quickly and notify the administrator, so as to quickly deal with the problem or prevent the occurrence of the problem in advance to avoid the impact on the business.

  • Fault analysis and location: When a problem occurs, it needs to be investigated and dealt with. Through the analysis of different monitoring and historical data, the root cause can be found and resolved.

  • Data visualization: Through the visual dashboard, intuitive information such as the operating status of the system, resource usage, and service operating status can be directly obtained.


Advantages of Prometheus


Prometheus is an open source complete monitoring solution that completely subverts the testing and alarm models of traditional monitoring systems and forms a new model based on centralized rule calculation, unified analysis and alarms. Compared with the traditional monitoring system Prometheus has the following advantages:


  • A multidimensional data model consisting of time series data identified by indicator names and key/value pair tags .

  • Powerful query language PromQL .

  • Does not rely on distributed storage; a single service node has autonomy.

  • The time series data is actively pulled by the server through the HTTP protocol.

  • It is also possible to push time series data through an intermediate gateway .

  • The monitoring target can be obtained through static configuration files or service discovery.

  • Support multiple types of charts and dashboards.




The overall architecture of Prometheus


image

The Prometheus ecosystem consists of multiple components, many of which are optional:

  • Prometheus Server is used as a server to store time series data.

  • The client library is used to test the application code.

  • Push gateway used to support temporary tasks.

  • Exporter is used to monitor special monitoring targets such as HAProxy, StatsD, and Graphite, and provides Prometheus with monitoring sample data in a standard format.

  • alartmanager is used to handle alarms.

  • Various other peripheral tools.

Most of these components are written in Go, so it is easy to build and deploy as static binaries.

What scenarios does Prometheus apply to

Prometheus is suitable for recording time series in text format. It is suitable for both machine-centric monitoring and highly dynamic service-oriented architecture monitoring. In the world of microservices, it has special advantages for multi-dimensional data collection and query support. Prometheus is designed to improve system reliability. It can quickly diagnose problems during power outages. Each Prometheus Server is independent of each other and does not rely on network storage or other remote services. When the infrastructure fails, you can quickly locate the point of failure through Prometheus without consuming a lot of infrastructure resources.

Prometheus is not suitable for what scenarios

Prometheus attaches great importance to reliability, even in the event of a failure, you can always view the available statistical information about the system. If you need 100% accuracy, such as billing based on the number of requests, then Prometheus is not suitable for you, because the data it collects may not be detailed and complete. In this case, you'd better use other systems to collect and analyze data for billing, and use Prometheus to monitor the rest of the system.


image


Guess you like

Origin blog.51cto.com/15127513/2657971