当前位置:网站首页>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
边栏推荐
- Assembly learning Chapter III of assembly language (Third Edition) written by Wang Shuang
- MAUI初体验:爽
- Cloud computing learning 1 - openstack cloud computing installation and deployment steps with pictures and texts (Xiandian 2.2)
- MYSQL03_ SQL overview, rules and specifications, basic select statements, display table structure
- eventBus
- 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
- L2-006 树的遍历(中后序确定二叉树&层序遍历)
- Wepy learning record
- Detailed explanation of distributed things
- The usage of case when and select case when is very easy to use
猜你喜欢
.NET点滴:说说Middleware构造中获取不到Scoped服务的问题
tf. keras. layers. Conv? D function
ASP.NET 6 中间件系列 - 执行顺序
Source code and some understanding of employee management system based on polymorphism
Passing object type parameters through openfeign
Deep q-network (dqn)
The input of El input input box is invalid, and error in data(): "referenceerror: El is not defined“
Liunx foundation - zabbix5 0 monitoring system installation and deployment
Q-Learning & Sarsa
Innovation and management based on Scrum
随机推荐
基于ele封装下拉菜单等组件
Basic SQL (VIII) data update operation practice
Winsock programming interface experiment: Ping
Redis data server / database / cache (2022)
Leangoo brain map - shared multi person collaborative mind mapping tool
Development notes of raspberry pie (12): start Advantech industrial control raspberry pie uno-220 Kit (I): introduction and operation of the system
Shell script learning notes -- shell operation on files sed
最通俗易懂的依赖注入与控制反转
Huawei machine test question -- deformation of hj53 Yang Hui triangle
Passing object type parameters through openfeign
【鉴权/授权】自定义一个身份认证Handler
Opencv fills the rectangle with a transparent color
《信息系统项目管理师总结》第六章 项目人力资源管理
AspNetCore配置多环境log4net配置文件
B blocks of the 46th ICPC Asian regional competition (Kunming)
Basic workflow of CPU
Openfeign details show
Thoughts on the 2022 national network security competition of the national secondary vocational group (only one idea for myself) - network security competition questions (8)
Source code and some understanding of employee management system based on polymorphism
What is the difference between varchar and char?