当前位置:网站首页>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 .
边栏推荐
- 1003 Emergency(25 分)(PAT甲级)
- Educational codeforces round 22 E. Army Creation
- How test engineers "attack the city" (Part I)
- Detailed explanation of the binary processing function threshold() of opencv
- Online data migration scheme encountered in the project 1 - general idea sorting and technical sorting
- 1006 Sign In and Sign Out(25 分)(PAT甲级)
- Multi table operation inner join query
- 有关架构设计的个人思考(本文后续不断修改更新)
- Is it safe to open an account at Great Wall Securities? How to open an account when buying stocks
- 公司要上监控,Zabbix 和 Prometheus 怎么选?这么选准没错!
猜你喜欢
Pointnet/Pointnet++点云数据集处理并训练
Actual combat simulation │ JWT login authentication
华为nova 10系列支持应用安全检测功能 筑牢手机安全防火墙
Opencv functions and methods related to binary threshold processing are summarized for comparison and use
[problem] Druid reports exception SQL injection violation, part always true condition not allow solution
C# 使用StopWatch测量程序运行时间
Introduction to ACM combination counting
Pythagorean number law (any three numbers can meet the conditions of Pythagorean theorem)
Introduction to polyfit software
Lenovo explains in detail the green smart city digital twin platform for the first time to solve the difficulties of urban dual carbon upgrading
随机推荐
有关架构设计的个人思考(本文后续不断修改更新)
如何使用Async-Awati异步任務處理代替BackgroundWorker?
Cbcgptabwnd control used by BCG (equivalent to MFC TabControl)
SSRS筛选器的IN运算(即包含于)用法
In operation (i.e. included in) usage of SSRs filter
BCG 使用之新建向导效果
Find the nth power of 2
Swagger suddenly went crazy
记一次 .NET 某工控数据采集平台 线程数 爆高分析
92.(cesium篇)cesium楼栋分层
1007 Maximum Subsequence Sum(25 分)(PAT甲级)
"Only one trip", active recommendation and exploration of community installation and maintenance tasks
YOLOv5s-ShuffleNetV2
Several methods of online database migration
English语法_名词 - 使用
1009 Product of Polynomials(25 分)(PAT甲级)
Functional interface
FTP, SFTP file transfer
Introduction to ACM combination counting
双冒号作用运算符以及命名空间详解