In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
What is the first understanding of prometheusprometheus and its main functional considerations what is prometheus?
My current readers must be monitored by prometheus, so what is it? Prometheus is a monitoring software based on time series (time_series). It is an open source monitoring and alarm solution by soundCloud. It has been used by many large companies since writing code in 2012 and open source on github in 2015. In 2016, prometheus became a member of the second CNCF (cloud native Computing Foundation Cloud Native Computing Foundation) after kubernetes. Version 2.0 based on a new storage layer was released at the end of 2017, which can better cooperate with container platform and cloud platform, and support alarm at the same time.
The main functions of prometheus: multidimensional data model (time series is composed of metrics [index] and KLV labels) flexible query statements (PromQL) support basic data operations and function independent storage, support different models of local and remote adopt http protocol, use pull/push schema to obtain data monitoring targets, and support a variety of statistical data models through service discovery and static configuration. Use prometheus server, the core component of graphical friendly prometheus with grafana: mainly on the acquired data and storing timing data, but also provide query and alert rule (alarm rules) configuration management client libraries: for docking prometheus server, you can query and report data Pushgateway: for batch, short-term monitoring data summary node, the monitoring host is reported to pushgeateway, and then pushgateway is reported to prometheus sever. Exporters: various exporters for reporting data, such as node_exporter for reporting machine data, cAdvisoralertmanager for reporting docker: prometheus infrastructure diagram for alarm notification
The following picture is an official architectural diagram.
From the figure above, we can also see that the main module of prometheus, pushgateway,exporters,retrieval,TSDB (storage) HTTP,PromeQl,Alertmanager.
His general logic goes like this:
1 targets Prometheus periodically requests exporters from the statically configured exporters or service discovery targets to obtain data from the server deployed on the monitored side, or the client sends data to pushgateway periodically through scheduled tasks, and then pushgateway sends data to prometheus.
2. When the new data is larger than the configured memory cache, prometheus persists the data to disk (to the cloud if remote storage is used)
3Prometheus can cooperate with grafana to get the monitoring graph we want through specific expression.
4Prometheus can configure rules (rules), and then query the data regularly. When the alarm condition starts, the alertmanager will be notified to push to the configured alarm information.
4According to the configuration, aggregation, de-duplication and noise reduction, the alarm manager can send a warning when it receives the alarm message.
Note: the data of prometheus used by promethesus is based on the fload64 value of time series (time-series). Prometheus is not suitable for audit billing, because his data is collected according to time intervals and pays more attention to the instantaneous status and trend of the system. Even if a small amount of data is not collected, it can be tolerated, but audit billing needs to record each request, and the data is stored for a long time. This prometheus cannot be satisfied. Comparison of prometheus and other monitoring advantages of prometheus over other software
1, easy to manage
The core part of prometheus has only a separate binary written in golang, and there are no third-party dependencies (database, cache, etc.). The only thing that needs to be done is local disk and memory, so it can run on various platforms.
Prometheus is an architecture based on pull and push models to build our monitoring system anywhere. For some complex situations, we can also use the ability of prometheus Service Discovery (server Discovery) to dynamically manage monitoring targets.
2. Monitor the internal running status of the service
Prometheus encourages users to monitor the internal status of the service. Based on prometheus's rich client library, users can easily add prometheus support to the application, so that users can get the real running status of the service and the application.
3, powerful data model
All the collected monitoring data are stored in the built-in time series database (TSDB) in the form of metric. In addition to the basic index name, all samples also contain a set of tags that describe the characteristics of the sample.
4, powerful query language PromQL
Prometheus has built-in a powerful data query language promQL, which can query / aggregate monitoring data through PromQL. At the same time, PromeQL is also used in data visualization (grafana) and alarm.
5. High efficiency
For the monitoring system, a large number of monitoring tasks will inevitably lead to a large amount of data generation. Prometheus can process this data efficiently, and for a single Prometheus Server instance it can:
Millions of monitoring indicators process hundreds of thousands of data points per second.
6. Scalability
Prometheus is so simple that you can run a separate Prometheus Sevrer in every data center and every team. Prometheus's support for federated clusters allows multiple Prometheus instances to generate a logical cluster, which can be extended by using functional partitions (sharding) + federated clusters (federation) when the task handled by a single instance Prometheus Server is too large.
7, easy to integrate
Because prometheus uses http protocol to communicate and obtain data, all languages can be used as exporters as long as they support http protocol.
8, visualization
Prometheus cooperates with grafana to develop exquisite monitoring charts.
Prometheus VS zabbixZabbix uses C and PHP, Prometheus uses Golang, and overall Prometheus runs a little faster. Zabbix belongs to traditional host monitoring, which is mainly used for physical host, switch, network and other monitoring. Prometheus is not only suitable for host monitoring, but also suitable for Cloud, SaaS, docker,kubernetes,Container monitoring. Zabbix has richer plug-ins in traditional host monitoring. Zabbix can configure a lot of things in WebGui, but Prometheus needs to manually modify the file configuration. Prometheus vs nagiosNagios data does not support custom Labels, query, alarm, denoising, grouping, and no data storage. If you want to query the historical status, you need to install a plug-in. Nagios is a monitoring system in the 1990s, which is more suitable for the monitoring of small clusters or static systems. Obviously, Nagios is too old and does not have many features. Prometheus is much better than it is. Prometheus vs InfluxDBInfluxDB is an open source time series database, which is mainly used to store data. If you want to build a monitoring and alarm system, you need to rely on other systems. InfluxDB does better in terms of horizontal storage scale and high availability. After all, the core is the database.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.