当前位置:网站首页>Prometheus deployment
Prometheus deployment
2022-06-24 16:37:00 【kevin_ yyc】
One 、 Environmental preparation
1、 Firewall configuration
The firewall is closed here , Or you can turn on the firewall 9100、9093 port [[email protected] ~]# systemctl stop firewall [[email protected] ~]# systemctl disable firewalld
2、selinux To configure
[[email protected] ~]# vim /etc/selinux/config SELINUX=disabled [[email protected] ~]# setenforce 0
3、 to update yum
[[email protected] ~]# yum update
Two 、Prometheus Deploy
1、 Download installation package
Download link :https://prometheus.io/download/
2、 Package decompression
tar xvfz prometheus-*.tar.gz
3、 To configure Prometheus monitor
cd prometheus-* [[email protected] prometheus-2.26.0.linux-amd64]# vi prometheus.yml # my global config global: scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute. evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute. # scrape_timeout is set to the global default (10s). # Alertmanager configuration alerting: alertmanagers: - static_configs: - targets: - 172.16.1.x:9093 # Load rules once and periodically evaluate them according to the global 'evaluation_interval'. rule_files: - "rules/*_rules.yml" - "rules/*_alerts.yml" # A scrape configuration containing exactly one endpoint to scrape: # Here it's Prometheus itself. scrape_configs: # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config. - job_name: 'prometheus' # metrics_path defaults to '/metrics' # scheme defaults to 'http'. static_configs: - targets: ['localhost:9090'] - job_name: 'linux172.16.1.4x' static_configs: - targets: ['172.16.1.4x:9100'] labels: instance: linux172.16.1.4x
4、 Deploy node_exporter
Download address :https://prometheus.io/download/
Download and upload installation package :node_exporter-1.1.2.linux-amd64.tar.gz [[email protected] prometheus]# tar -xzvf node_exporter-1.1.2.linux-amd64.tar.gz $ To configure node Boot up [[email protected] node_exporter-1.1.2.linux-amd64]# sudo groupadd -r prometheus [[email protected] node_exporter-1.1.2.linux-amd64]# sudo useradd -r -g prometheus -s /sbin/nologin -M -c "prometheus Daemons" prometheus [[email protected] node_exporter-1.1.2.linux-amd64]# cat << EOF > /usr/lib/systemd/system/node_exporter.service [Service] User=prometheus Group=prometheus ExecStart=/opt/prometheus/node_exporter-1.1.2.linux-amd64/node_exporter [Install] WantedBy=multi-user.target [Unit] Description=node_exporter After=network.target EOF $ start-up , Check the status , Configure boot up systemctl start node_exporter systemctl status node_exporter systemctl enable node_exporter
5、Master Node editing “prometheus.yml” increase “node_exporter”IP
[[email protected] plugins]# vi prometheus.yml - job_name: 'linux172.16.1.4x' static_configs: - targets: ['172.16.1.4x:9100'] labels: instance: 172.16.1.4x
6、 Hot update Prometheus.yml
curl -XPOST http://localhost:9090/-/reload
7、Web visit Prometheus Address :localhost:9090/targets
边栏推荐
- Global and Chinese markets of Leyte coin exchange 2022-2028: Research Report on technology, participants, trends, market size and share
- Advanced programmers must know and master. This article explains in detail the principle of MySQL master-slave synchronization
- Bitwise Operators
- Cognition and difference of service number, subscription number, applet and enterprise number (enterprise wechat)
- If only 2 people are recruited, can the enterprise do a good job in content risk control?
- 基于STM32的MD5校验
- The million bonus competition is about to start, and Ti-One will be upgraded to help you win the championship!
- AI structured intelligent security video monitoring technology, supporting the protective umbrella of the reserve / wild animals
- Is Guotai Junan Futures safe? How to open a futures account? How to reduce the futures commission?
- What is browser fingerprint recognition?
猜你喜欢

Ui- first lesson

ZOJ - 4104 sequence in the pocket

A survey on model compression for natural language processing (NLP model compression overview)

B. Ternary Sequence(思维+贪心)Codeforces Round #665 (Div. 2)
MySQL Advanced Series: locks - locks in InnoDB
Advanced programmers must know and master. This article explains in detail the principle of MySQL master-slave synchronization

C. K-th not divisible by n (Mathematics + thinking) codeforces round 640 (Div. 4)

C. Three displays codeforces round 485 (Div. 2)

There are potential safety hazards Land Rover recalls some hybrid vehicles
MySQL Advanced Series: Locks - Locks in InnoDB
随机推荐
【prometheus】1. Monitoring overview
Goby+AWVS 实现攻击面检测
A troubleshooting of golang memory leak
Istio FAQ: virtualservice route matching sequence
Virtual machine virtual disk recovery case tutorial
Ui- first lesson
What is a server
mysql时间戳格式转换日期格式字符串
Inter thread communication of embedded development foundation
Greenplum role-based fine-grained permission control
What is the difference between optical fiber jumper and copper wire
50 growers | closed door meeting of marketing circle of friends ス gathering Magic City thinking collision to help enterprise marketing growth
How to use the national standard streaming media server to view the video stream of the surveillance camera? How to correctly use UDP and TCP protocols?
AI video structured intelligent security platform easycvr intelligent security monitoring scheme for protecting community residents
What is the difference between a network card and a port
Applet wxss
One Minute! No code! Add [statistical analysis] to the website
[tke] nodelocaldnschache is used in IPVS forwarding mode
The mystery of redis data migration capacity
Global and Chinese market of computer protective film 2022-2028: Research Report on technology, participants, trends, market size and share