Rocky Linux安装部署Node_exporter(Prometheus)

一、node_exporter的简介
Node Exporter是一个用于监控主机指标的软件插件。它收集和暴露系统级指标,如CPU、内存、磁盘、网络等信息,供Prometheus监控和报警。Node Exporter可以帮助用户了解主机的性能和健康状态。

二、prometheus监控体系
在这里插入图片描述

三、Rocky Linux系统安装
链接:VMware Workstation 下载安装(含秘钥)
链接:VMware Workstation 创建虚拟机
链接:Rocky_Linux 下载安装
链接:Rocky_Linux 网卡静态配置
链接:MobaXterm 下载安装

四、Rocky Linux安装部署Node_exporter
1、官网下载地址
链接:https://prometheus.io/download/
在这里插入图片描述

2、筛选“linux",“amd64”
在这里插入图片描述

3、向下拖动至“node_exporter”,点击下载“最新安装包”
在这里插入图片描述

3、上传至root目录下
教程链接:SFTP文件上传/下载

4、查看目录/root/下的文件,确认是否已上传

[root@localhost ~]# ll /root/

教程链接:Rocky Linux 运维工具 ls
在这里插入图片描述

5、解压/root/目录下的node_exporter至/opt/目录

[root@localhost ~]# tar zxvf /root/node_exporter-1.7.0.linux-amd64.tar.gz -C /opt/

教程链接:Rocky Linux 文件管理工具 tar
在这里插入图片描述

6、查看/opt/目录下的文件

[root@localhost ~]# ll /opt/

教程链接:Rocky Linux 运维工具 ls
在这里插入图片描述
7、重命名node_exporter

[root@localhost ~]# mv /opt/node_exporter-1.7.0.linux-amd64/ /opt/node_exporter

教程链接:Rocky Linux 运维工具 mv
在这里插入图片描述

8、查看/opt/下的文件

[root@localhost ~]# ll /opt/

教程链接:Rocky Linux 运维工具 ls
在这里插入图片描述
9、创建node_exporter服务

[root@localhost ~]# vi /etc/systemd/system/node_exporter.service
[Unit]
Description=node_exporter1
After=network.target

[Service]
Type=simple
ExecStart=/opt/node_exporter/node_exporter
--collector.ntp
--collector.mountstats
--collector.systemd
--collector.tcpstat
User=prometheus

ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure

[Install]
WantedBy=multi-user.target
[root@localhost ~]# cat /etc/systemd/system/node_exporter.service

教程链接:Rocky Linux 运维工具 vim
教程链接:Rocky Linux 运维工具 cat
在这里插入图片描述

10、目录授权

[root@localhost ~]# chown prometheus:root -R /opt/prometheus

教程链接:Rocky Linux 运维工具 chown
在这里插入图片描述

11、查看目录权限

[root@localhost ~]# ll /opt/

教程链接:Rocky Linux 运维工具 ls
在这里插入图片描述

12、加载服务

[root@localhost ~]# systemctl daemon-reload

教程链接:Rocky Linux 运维工具 systemctl
在这里插入图片描述

13、设置node_exporter服务开机启动

[root@localhost ~]# systemctl enable node_exporter.service

教程链接:Rocky Linux 运维工具 systemctl
在这里插入图片描述
14、启动node_exporter服务

[root@localhost ~]# systemctl start node_exporter.service

教程链接:Rocky Linux 运维工具 systemctl
在这里插入图片描述

15、查看node_exporter服务状态

[root@localhost ~]# systemctl status node_exporter.service

教程链接:Rocky Linux 运维工具 systemctl
在这里插入图片描述

16、防火墙放行端口9100

[root@localhost ~]# firewall-cmd --zone=public --add-port=9100/tcp --permanent

教程链接:Rocky Linux 运维工具 firewall-cmd
在这里插入图片描述

17、防火墙重新加载策略

[root@localhost ~]# firewall-cmd --reload

教程链接:Rocky Linux 运维工具 firewall-cmd
在这里插入图片描述

18、访问192.168.100.10:9100/metrics 显示有数据
在这里插入图片描述

19、配置文件添加监控点位

[root@localhost ~]# vi /opt/prometheus/prometheus.yml
  - job_name: 'nodes'
    static_configs:
    - targets: ['192.168.100.10:9100']

教程链接:Rocky Linux 运维工具 vim
在这里插入图片描述

20.重启prometheus,查看服务运行状态

[root@localhost ~]# systemctl restart prometheus.service
[root@localhost ~]# systemctl status prometheus.service

教程链接:Rocky Linux 运维工具 systemctl
在这里插入图片描述

21、重启node_exporter,查看服务运行状态

[root@localhost ~]# systemctl restart node_exporter.service
[root@localhost ~]# systemctl status node_exporter.service

教程链接:Rocky Linux 运维工具 systemctl
在这里插入图片描述

22、打开 http://192.168.110.10:9090,点击“Status”,点击“Target”
在这里插入图片描述
23、查看node_exporter运行状态
在这里插入图片描述
四、扩展
链接:Rocky Linux安装部署Prometheus

  • 27
    点赞
  • 24
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
要在Rocky Linux安装Spring Boot,您需要先配置yum源为阿里云,并更新缓存。可以使用以下命令更改yum源为阿里云并更新缓存: ``` sed -e 's|^mirrorlist=|#mirrorlist=|g' \ -e 's|^#baseurl=http://dl.rockylinux.org/$contentdir|baseurl=https://mirrors.aliyun.com/rockylinux|g' \ -i.bak \ /etc/yum.repos.d/Rocky-*.repo dnf makecache ``` 接下来,您需要安装Redis和Nginx,您可以根据需要选择单机版或集群版配置。以下是示例配置: 单机版配置: ``` #配置Redis的配置信息(单机版) #spring.redis.host=192.168.188.128 #spring.redis.port=6379 #spring.redis.password=123456 ``` 集群版配置: ``` #配置Redis的配置信息(集群版,连接哨兵集群) #指定所有哨兵服务的IP 端口多个地址使用逗号分隔 spring.redis.sentinel.nodes=192.168.19.129:26380,192.168.19.129:26382,192.168.19.129:26384 #指定集群名称取值来自哨兵配置文件 spring.redis.sentinel.master=mymaster #指定Redis的访问密码 spring.redis.password=123456 ``` 最后,您需要关闭SELinux和防火墙: ``` sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config systemctl disable firewalld systemctl stop firewalld ``` 以上是在Rocky Linux安装Spring Boot的一般步骤。请确保按照您的实际需求进行适当的配置和安装。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [cephadm部署ceph-quincy版(rocky8.6)](https://blog.csdn.net/w975121565/article/details/126770631)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] - *2* [Linux部署Linux上的相关软件](https://blog.csdn.net/Ssucre/article/details/115542747)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值