当前位置:网站首页>Systemctl start Prometheus + grafana environment
Systemctl start Prometheus + grafana environment
2022-04-23 03:02:00 【Yang Linwei】
01 The configuration file
stay /usr/lib/systemd/system New directory 4 Configuration files , Respectively :
① pushgateway.service file , The contents are as follows :
[Unit]
Description=Prometheus Push Gateway
After=network.target
[Service]
ExecStart=/opt/prometheus_env/pushgateway-1.4.2.linux-amd64/pushgateway
User=root
[Install]
WantedBy=multi-user.target
② node_exporter.service file , The contents are as follows :
[Unit]
Description=Prometheus Node Exporter
After=network.target
[Service]
ExecStart=/opt/prometheus_env/node_exporter-1.3.1.linux-amd64/node_exporter
User=root
[Install]
WantedBy=multi-user.target
③ prometheus.service file , The contents are as follows :
[Unit]
Description=Prometheus Service
After=network.target
[Service]
ExecStart=/opt/prometheus_env/prometheus-2.34.0.linux-amd64/prometheus \
--config.file=/opt/prometheus_env/prometheus-2.34.0.linux-amd64/prometheus.yml \
--web.read-timeout=5m \
--web.max-connections=10 \
--storage.tsdb.retention=15d \
--storage.tsdb.path=/prometheus/data \
--query.max-concurrency=20 \
--query.timeout=2m
User=root
[Install]
WantedBy=multi-user.target
④ grafana.service file , The contents are as follows :
[Unit]
Description=Grafana
After=network.target
[Service]
ExecStart=/opt/prometheus_env/grafana-8.4.7/bin/grafana-server \
--config=/opt/prometheus_env/grafana-8.4.7/conf/defaults.ini \
--homepath=/opt/prometheus_env/grafana-8.4.7
[Install]
WantedBy=multi-user.target
02 systemctl command
Overload configuration :
systemctl daemon-reload
Opening service :
systemctl start pushgateway
systemctl start node_exporter
systemctl start prometheus
systemctl start grafana
Set boot up :
systemctl enable pushgateway
systemctl enable node_exporter
systemctl enable prometheus
systemctl enable grafana
View service status :
systemctl status pushgateway
03 Other commands
Open port , Can be accessed by browser ( For example, turn on :3000)
firewall-cmd --zone=public --add-port=3000/tcp --permanent
service iptables restart :
firewall-cmd --reload
版权声明
本文为[Yang Linwei]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220632523315.html
边栏推荐
- 基于ele封装下拉菜单等组件
- Centos7 install MySQL 8 0
- How to write the expected salary on your resume to double your salary during the interview?
- tf. keras. layers. MaxPooling? D function
- Source code and some understanding of employee management system based on polymorphism
- Microservices (distributed architecture)
- 微软是如何解决 PC 端程序多开问题的——内部实现
- 基于.NetCore开发博客项目 StarBlog - (2) 环境准备和创建项目
- 对.NET未来的一点感悟
- Array and collection types passed by openfeign parameters
猜你喜欢

Depth deterministic strategy gradient (ddpg)

Introduction and use of openfeign component

C# WPF UI框架MahApps切换主题

最通俗易懂的依赖注入之服务容器与作用域
![[software testing] understand the basic knowledge of software testing](/img/ff/8fcd4b88de28505989aaf517d16113.png)
[software testing] understand the basic knowledge of software testing

Some problems encountered in setting Django pure interface, channel and MySQL on the pagoda panel

HLS / chisel practice CORDIC high performance computing complex square root

Small companies don't make formal offers

Innovation and management based on Scrum

Kubernetes study notes
随机推荐
Codeforces round 784 (Div. 4) (a - H)
Niuke white moon race 6 [solution]
How to count the number of all files in a directory under win10 system
In redis cluster, the master node fails, and the IP changes after the master-slave switch. The client does not need to deal with it
C# WPF UI框架MahApps切换主题
JS learning notes
Thoughts on the 2022 national network security competition of the national secondary vocational group (only one idea for myself) - network security competition questions (10)
Wepy learning record
Plug in for vscode
Sonic cloud real machine tutorial
tf. keras. layers. Conv? D function
REINFORCE
Openfeign details show
When using art template inheritance, compileerror: invalid or unexpected token generated
The express project changes the jade template to art template
Some problems encountered in setting Django pure interface, channel and MySQL on the pagoda panel
Slave should be able to synchronize with the master in tests/integration/replication-psync. tcl
【工欲善其事必先利其器】论文编辑及文献管理(Endnote,Latex,JabRef ,overleaf)资源下载及使用指南
[if you want to do a good job, you must first use its tools] Guide for downloading and using paper editing and document management (endnote, latex, jabref, overflow) resources
Openfeign service call