prometheus learning a series: Prometheus Introduction

About Prometheus

prometheus inspired by Google's Brogmon monitoring system (similar kubernetes evolved from Brog system comes), Soundcloud be developed as open source from the beginning of 2012 by the engineer google, and released early in 2015 and earlier versions. May 2016 after becoming the second kubernetes join CNCF Foundation project, childhood officially released version 1.0 in June. By the end of 2017 released version 2.0-based GSK storage layer, better container platform, with cloud platform.

prometheus advantage

prometheus is based on a complete open source monitoring program, its traditional model test and alarm monitoring system has been completely subvert the formation of a new model of centralized rule-based computing, unified analysis and alarms. Compared to conventional monitoring system has the following advantages.

  • Ease of Management: Deploy using a go-compiled binary files, there is no third party dependencies, service discovery can be used to monitor the dynamic management objectives.
  • Internal operating status monitoring service: we can use the client library prometheus provides common development languages ​​provide complete application-level exposure data acquisition applications running inside information.
  • Powerful query language promQL: prometheus built a powerful data query language PromQL, queries can be achieved by monitoring data PromQL, polymerization. While also applied PromQL data visualization (e.g. grafana) and the alarm.
  • Efficient: For the monitoring system, a large number of monitoring tasks will inevitably lead to a large amount of data generated. Prometheus and process the data efficiently.
  • Scalable: prometheus relatively simple configuration, the data center can run independently of each prometheus Server, the cluster may be used federal, so generating a plurality of logical cluster prometheus example, the task may be a single prometheus Server excessive processing time , its expansion through the use of functional area and the Federal clusters.
  • Ease of integration: the current official languages ​​of the client sdk, you can quickly make applications into the monitoring system based on these sdk, and also supports integration with other monitoring systems.
  • Visualization: prometheus server comes with a ui, you can easily query the data and graphical display by this ui, you can dock grafana visualization tools to monitor indicators show beautifully.

Prometheus Infrastructure

 

Above architecture diagram has been drawn up in sufficient detail. Here at Simply put, prometheus is responsible for collecting data from pushgateway and job, the memory-to-back Storatge can be queried by PromQL, push alerts information to AlertManager. AlertManager alarm notification depending on the routing rules.

Core components

Prometheus

prometheus server is the core component of Prometheus, is responsible for implementing access to monitoring data storage and query.

exporters

exporter is simply collecting end, to retain a url address in the form http services, prometheus server by accessing endpoint endpoint of the exporter offers, you can get to the monitoring data to be collected. exporter divided into two categories.

  • Capture: Capturing this category exporter directly built-in support for Prometheus monitoring, such as cAdvisor, Kubernetes and so on.
  • Indirect acquisition: the original surveillance target does not support prometheus, prometheus customer needs by providing a client library to write monitor collection procedures, such as Mysql Exporter, JMX Exporter and so on.

AlertManager

In prometheus, the supports PromQL create alarm rules, if rules defined to meet, a warning message will be generated, enter AlertManager for processing. It can be integrated e-mail, Slack or custom alarm by webhook.

PushGateway

Since Prometheus data acquisition using pull manner set built must ensure prometheus server and exporter must correspond to the traffic, when the network situation is not directly meet, may be used pushgateway to transfer, by pushgateway the internal IP active push to the gateway which to, the use of pull mode pulling prometheus data pushgateway.

Scenarios

Suitable scene

Prometheus can be any well documented purely digital time series. It is suitable to machine centric monitoring, but also for monitoring highly dynamic architecture of service-oriented. In the micro-world service, its support for multidimensional data collection and query is a particular advantage. Prometheus is designed with reliability, it is the system that you use during the shutdown, allowing you to quickly diagnose the problem. Each server Prometheus are independent, not dependent on network storage or other remote services. When the rest of your infrastructure is destroyed, you can rely on it, and you do not need to set up extensive infrastructure to use it.

Not suitable Scene

Prometheus reliability values. You can always view statistics about the system, even in the event of a failure. If you need 100% accuracy, for example by requesting billing, Prometheus is not a good choice because the data collected may not be detailed and complete. In this case, it is preferable to use other systems to collect and analyze data for accounting, using Prometheus surveillance do the rest.

 

Guess you like

Origin www.cnblogs.com/zhaojiedi1992/p/zhaojiedi_liunx_56_prometheus.html