当前位置:网站首页>Prometheus installation
Prometheus installation
2022-07-04 19:57:00 【Code Taoist】
First, check the current server centos Version of
cat /etc/centos-release
It is divided into centOs6 and 7 Methods ;
【// If yum If not, run the following steps , If you can use it, you don't need to change the source , Upload the installation package manually , You don't have to change it
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
curl -k -o /etc/yum.repos.d/CentOS-Base.repo https://www.xmpan.com/Centos-6-Vault-Aliyun.repo
yum clean all
yum makecache
】
One 、 Download the software package on the official website
https://prometheus.io/download/
Upload package :( The installation package file has been installed ,)
prometheus-2.14.0.linux-amd64.tar.gz
Unzip package :
tar xvf prometheus-2.14.0.linux-amd64.tar.gz
mv prometheus-2.14.0.linux-amd64 /usr/local/prometheus
function Prometheus server:
cd /usr/local/prometheus
./prometheus --config.file=prometheus.yml
Two 、 To configure Prometheus
stay Prometheus.yml There is a configuration file , We can configure it , Of course, the first installation can also be configured without ;
vim /usr/local/prometheus/prometheus.yml
Verify the configuration file
./promtool check config ./prometheus.yml
To configure service Startup file
centos7 The method is as follows ://
vim /usr/lib/systemd/system/prometheus.service
Add content
[Unit]
Description=The Prometheus Server
After=network.target
[Service]
Restart=on-failure
ExecStart=/usr/local/prometheus/prometheus --config.file=/usr/local/prometheus/prometheus.yml
RestartSec=15s
[Install]
WantedBy=multi-user.target
systemctl daemon-reload
systemctl restart prometheus
ss -antl
centos6:
vim /usr/lib/systemd/system/prometheus.service
After entering the file, add the contents in the above command , There are no directories and files to create
sudo chkconfig daemon-reload
service prometheus restart
3、 ... and 、 start-up prometheus command
/usr/local/prometheus/prometheus --config.file=/usr/local/prometheus/prometheus.yml &
perhaps
**** ./prometheus
Four 、 On the web http://192.168.0.xxx:9090/targets Access is successful .
边栏推荐
- Find the nth power of 2
- Dark horse programmer - software testing - 09 stage 2-linux and database -31-43 instructions issued by modifying the file permission letter, - find the link to modify the file, find the file command,
- An example of multi module collaboration based on NCF
- Swagger突然发癫
- 勾股数规律(任意三个数能够满足勾股定理需要满足的条件)
- Mysql database basic operation -ddl | dark horse programmer
- 1007 maximum subsequence sum (25 points) (PAT class a)
- kotlin 继承
- node_ Exporter deployment
- 1002. A+B for Polynomials (25)(PAT甲级)
猜你喜欢
C语言-入门-基础-语法-流程控制(七)
牛客小白月赛7 谁是神箭手
The company needs to be monitored. How do ZABBIX and Prometheus choose? That's the right choice!
Upgrade the smart switch, how much is the difference between the "zero fire version" and "single fire" wiring methods?
Lenovo explains in detail the green smart city digital twin platform for the first time to solve the difficulties of urban dual carbon upgrading
欧拉函数
Hough transform Hough transform principle
Cbcgptabwnd control used by BCG (equivalent to MFC TabControl)
Dark horse programmer - software testing - 09 stage 2-linux and database -31-43 instructions issued by modifying the file permission letter, - find the link to modify the file, find the file command,
Several methods of online database migration
随机推荐
记一次 .NET 某工控数据采集平台 线程数 爆高分析
Mysql database basic operation -ddl | dark horse programmer
Euler function
C language - Introduction - Foundation - grammar - process control (VII)
The company needs to be monitored. How do ZABBIX and Prometheus choose? That's the right choice!
有关架构设计的个人思考(本文后续不断修改更新)
Niuke Xiaobai month race 7 who is the divine Archer
BCG 使用之CBCGPProgressDlgCtrl进度条使用
FPGA timing constraint sharing 01_ Brief description of the four steps
Jetpack compose tutorial
Utilisation de la barre de progression cbcggprogressdlgctrl utilisée par BCG
Functional interface
Chrome开发工具:VMxxx文件是什么鬼
牛客小白月赛7 谁是神箭手
Allure of pytest visual test report
Detailed explanation of the binary processing function threshold() of opencv
JVM系列之对象的创建
abc229 总结(区间最长连续字符 图的联通分量计数)
Online data migration scheme encountered in the project 1 - general idea sorting and technical sorting
C语言-入门-基础-语法-流程控制(七)