当前位置:网站首页>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 .
边栏推荐
- Niuke Xiaobai monthly race 7 I new Microsoft Office Word document
- Educational Codeforces Round 22 E. Army Creation
- English语法_名词 - 使用
- Cbcgpprogressdlgctrl progress bar used by BCG
- Write it down once Net analysis of thread burst height of an industrial control data acquisition platform
- Abc229 summary (connected component count of the longest continuous character graph in the interval)
- [QNX Hypervisor 2.2用户手册]6.3.1 工厂页和控制页
- Mysql database basic operation -ddl | dark horse programmer
- Swagger突然发癫
- Comment utiliser async awati asynchrone Task Handling au lieu de backgroundworker?
猜你喜欢
公司要上监控,Zabbix 和 Prometheus 怎么选?这么选准没错!
C language - Introduction - Foundation - grammar - process control (VII)
Lenovo explains in detail the green smart city digital twin platform for the first time to solve the difficulties of urban dual carbon upgrading
Explore the contour drawing function drawcontours() of OpenCV in detail with practical examples
TCP两次挥手,你见过吗?那四次握手呢?
Chrome development tool: what the hell is vmxxx file
Comment utiliser async awati asynchrone Task Handling au lieu de backgroundworker?
西门子HMI下载时提示缺少面板映像解决方案
Opencv functions and methods related to binary threshold processing are summarized for comparison and use
English语法_名词 - 使用
随机推荐
Chrome development tool: what the hell is vmxxx file
实战模拟│JWT 登录认证
Euler function
Pytoch learning (4)
How test engineers "attack the city" (Part I)
2022 version of stronger jsonpath compatibility and performance test (snack3, fastjson2, jayway.jsonpath)
华为nova 10系列支持应用安全检测功能 筑牢手机安全防火墙
明明的随机数
1005 spell it right (20 points) (pat a)
Kotlin cycle control
YOLOv5s-ShuffleNetV2
FPGA timing constraint sharing 01_ Brief description of the four steps
Is it safe to open an account at Great Wall Securities? How to open an account when buying stocks
BCG 使用之新建向导效果
Explore the contour drawing function drawcontours() of OpenCV in detail with practical examples
@transactional滥用导致数据源连接池耗尽问题
HDU 1097 A hard puzzle
1011 World Cup betting (20 points) (pat a)
English语法_名词 - 使用
1011 World Cup Betting (20 分)(PAT甲级)