当前位置:网站首页>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
边栏推荐
- Annual contribution! Tencent cloud middleware product upgrade conference is in hot registration!
- ThinkPHP vulnerability exploitation tool
- What is Ethernet
- 50 growers | closed door meeting of marketing circle of friends ス gathering Magic City thinking collision to help enterprise marketing growth
- [tke] analysis of CLB loopback in Intranet under IPVS forwarding mode
- [tke] troubleshooting tips for container problems
- How to pop up an alarm through the national standard gb28181 protocol video platform easygbs for mobile detection / perimeter intrusion detection video recording
- [security] graphical CSRF injection of Web Security (II)
- Ui- first lesson
- 企业安全攻击面分析工具
猜你喜欢
MySQL進階系列:鎖-InnoDB中鎖的情况

A survey of training on graphs: taxonomy, methods, and Applications

Ui- first lesson

Cognition and difference of service number, subscription number, applet and enterprise number (enterprise wechat)

Some adventurer hybrid versions with potential safety hazards will be recalled

A survey on dynamic neural networks for natural language processing, University of California

B. Terry sequence (thinking + greed) codeforces round 665 (Div. 2)

Problems encountered in the work of product manager

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

There are potential safety hazards Land Rover recalls some hybrid vehicles
随机推荐
What is the difference between a network card and a port
Global and Chinese market of music synthesizer 2022-2028: Research Report on technology, participants, trends, market size and share
Fastjson vulnerability utilization techniques
转置卷积详解
Mathematics in machine learning -- point estimation (IV): maximum posteriori probability (map)
Use Google search like a professional
Automatically refresh CDN cache in real time based on cos log
对深度可分离卷积、分组卷积、扩张卷积、转置卷积(反卷积)的理解
Leetcode notes of Google boss | necessary for school recruitment!
Handling of communication failure between kuberbetes pod
Fastjson 漏洞利用技巧
Principle analysis of robot hardware in the loop system
What is cloud development? Why cloud development? Talk about our story
Clickhouse high performance column storage core principle
Greenplum role-based fine-grained permission control
Global and Chinese markets of Leyte coin exchange 2022-2028: Research Report on technology, participants, trends, market size and share
Understanding of deep separable convolution, block convolution, extended convolution, transposed convolution (deconvolution)
The mystery of redis data migration capacity
Annual contribution! Tencent cloud middleware product upgrade conference is in hot registration!
National standard gb28181 protocol video platform easygbs alarm reporting function adds video alarm reporting and video recording