In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "the introduction and installation method of prometheus". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn the introduction and installation of prometheus.
What is Prometheus?
Prometheus is an open source combination of monitoring-alarm-time series database, which was originally developed by SoundCloud. As it grows, more and more companies and organizations accept the adoption of Prometheus, and the community is so active that they turn it into an open source project with a company to operate. Google SRE also mentioned in his book that a similar implementation to their BorgMon monitoring system is Prometheus. Nowadays, the most common Kubernetes container management systems are usually monitored with Prometheus.
Advantages of Prometheus
1. Flexible configuration
Students who have used zabbix should have experienced the pain of installing dependent packages during installation, while the core part of premetheus only has a separate binary file, which can be downloaded, extracted and installed, and there is no dependent third-party library.
two。 Monitor more diversity
Prometheus supports clients in multiple languages, through which we can easily bury the core business, such as placing orders, adding shopping carts and other processes.
And prometheus already has a lot of system integration: for example
Application-level monitoring: nginx,haproxy,mysql, docker, etc.
System level such as: SNMP protocol monitoring, host monitoring, process monitoring
Container Cloud Monitor: docker,k8s openstack Private Cloud
3. Very efficient storage
The average sampling data accounts for about 3.5 bytes, 3.2 million of the time series, sampling every 30 seconds, holding for 60 days, consuming about 228g of disk.
Architecture of prometheus
Introduce it against each part of the figure:
Prometheus server
Mainly responsible for data collection and storage, providing PromQL query language support
Retrieval: sampling module, where the prometheus server pulls the data, retrieves the pulled data and distributes the data to TSDB for storage
TSDB: the local storage of the enclosure is TSDB by default
HTTP server: provides http API query and panel. The default port is 9090.
Short-lived jobs:
Short or batch businesses that do not have enough time to be deleted cannot be pulled by pull. You need to use push in combination with pushgeteway.
Service Discovery:
Service discovery, prometheus supports a variety of service discovery mechanisms: file, DNS,k8s,openstack, etc. Based on the process of service discovery, prometheus queries the list of target to be monitored through the third-party interface, and then polls these target to obtain monitoring data
Client SDK
The official client class library is go,java,python,ruby.
Pushgateway
The intermediate gateway that supports temporary job active push metrics. Prometheus is pulled from exporters by default. However, in some cases, we do not allow promethes to communicate directly with exporters. In this case, we can use pushgateway to actively push data to pushgateway from the client, and then pull data from prometheus. A lot of times we need to customize some components to collect
ProDash
Dashboard developed with rails to visualize metric data
Exporters
Import metrics from other data sources to prometheus, support database, hardware, message middleware, storage system, http server, jmx, etc.
Responsible for collecting the performance data of the target object and making it available to prometheus server through http interface
As long as it meets the interface format, it can be collected.
Alertmanager
Experimental component, used for alarm
Prometheus_cli
Command line tool
The workflow of prometheus
Prometheus server periodically pulls metrics from the configured jobs or exporters. Either accept metrics sent from pushgateway, or pull metrics from other prometheus server
Prometheus server stores the collected metrics locally and runs the defined arlt.rules to record a new time series or push an alarm to the alertmanager
According to the configuration file, Alertmanager processes the received alarm and issues the alarm.
In the graphical interface, visual data collection, you can use the grafana template written by others.
Prometheus deployment
Download address: https://github.com/prometheus/prometheus/releases/[root@zmedu-17 ~] # tar xf prometheus-2.7.2.linux-amd64.tar.gz [root ~] # mv prometheus-2.7.2.linux-amd64 / usr/local/ prometheus [root @ zmedu-17 ~] # cd / usr/local/prometheus/ [root @ zmedu-17 prometheus] # lsconsole_libraries NOTICE promtoolconsoles prometheusLICENSE prometheus.yml [root @ zmedu-17 prometheus] # lsconsole_libraries NOTICE promtoolconsoles prometheusLICENSE prometheus.yml
[root@zmedu-17 prometheus] #. / prometheus-- versionprometheus, version 2.7.2 (branch: HEAD, revision: 82f98c825a1437c0a24056eb4dc986d9a3fc7fae) build user: root@ab86c672c33a build date: 20190302-14:57:04 go version: go1.11.5 [root @ zmedu-17 prometheus] # [root@zmedu-17 prometheus] #. / prometheus & # launch [1] 66474 in the background
Access through the web site
At this point, I believe you have a deeper understanding of the "introduction and installation method of prometheus". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.