当前位置:网站首页>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
边栏推荐
- One Minute! No code! Add [statistical analysis] to the website
- Introduction of thread pool and sharing of practice cases
- 期货怎么开户安全些?哪些期货公司靠谱些?
- What is a framework?
- MySQL日期时间戳转换
- Annual contribution! Tencent cloud middleware product upgrade conference is in hot registration!
- Cause analysis of the failure of web page live broadcast on demand RTMP streaming platform easydss streaming live broadcast
- 6 things all engineers should know before FEA
- Recent progress of ffmpeg go
- Applet wxss
猜你喜欢

C. K-th Not Divisible by n(数学+思维) Codeforces Round #640 (Div. 4)

Ui- first lesson

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

C. Three displays codeforces round 485 (Div. 2)
Advanced programmers must know and master. This article explains in detail the principle of MySQL master-slave synchronization
![[go] concurrent programming channel](/img/6a/d62678467bbc6dfb6a50ae42bacc96.jpg)
[go] concurrent programming channel
MySQL Advanced Series: locks - locks in InnoDB

ZOJ - 4104 sequence in the pocket

B. Ternary Sequence(思维+贪心)Codeforces Round #665 (Div. 2)

A survey on dynamic neural networks for natural language processing, University of California
随机推荐
基于STM32的MD5校验
企业安全攻击面分析工具
Don't let [mana] destroy your code!
Percona Toolkit series - Pt deadlock logger
MySQL date timestamp conversion
[go] concurrent programming channel
What is the difference between a network card and a port
Snowflake algorithm implemented in go language
Little red book, hovering on the edge of listing
Tencent blue whale Zhiyun community version v6.0.3 was officially released together with the container management platform!
Is Shanjin futures safe? What are the procedures for opening futures accounts? How to reduce the futures commission?
AI structured intelligent security video monitoring technology, supporting the protective umbrella of the reserve / wild animals
Cognition and difference of service number, subscription number, applet and enterprise number (enterprise wechat)
ThinkPHP vulnerability exploitation tool
50 growers | closed door meeting of marketing circle of friends ス gathering Magic City thinking collision to help enterprise marketing growth
[idea] dynamic planning (DP)
There are potential safety hazards Land Rover recalls some hybrid vehicles
Use Google search like a professional
Cloud + community [play with Tencent cloud] video solicitation activity winners announced
Tencent on the other hand, I was puzzled by the "horse race" problem