Prometheus_prometheus netstat

img
img
img

既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上软件测试知识点,真正体系化!

由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新

需要这份系统化的资料的朋友,可以戳这里获取

安装在server03 - 192.168.174.137

wget https://github.com/prometheus/prometheus/releases/download/v2.5.0/prometheus 2.5.0.linux amd64.tar.gz

tar xf prometheus 2.5.0.linux amd64.tar.gz

cp prometheus 2.5.0.linux amd64/{ prometheus,promtool } usr /local/

查看版本
prometheus version

cd prometheus 2.5.0.linux amd64

cp prometheus.yml prometheus.yml.orig

mkdir p /etc/prometheus

cp prometheus.yml /etc/prometheus

promtool check config /etc/prometheus/prometheus.yml

启动
prometheus --config.file /etc/prometheus/prometheus.yml


开始体验
在这里插入图片描述

node_exporter

下载

tar xf node_exporter-0.18.1.linux-amd64.tar.gz
cd node_exporter-0.18.1.linux-amd64/
cp node_exporter /usr/local/bin/

查看版本

root@server03:~/media/prometheus/node_exporter-0.18.1.linux-amd64# node_exporter --version
node_exporter, version 0.18.1 (branch: HEAD, revision: 3db77732e925c08f675d7404a8c46466b2ece83e)
  build user:       root@b50852a1acba
  build date:       20190604-16:41:18
  go version:       go1.12.5

配置 文本文件收集器
注:文本文件收集器,默认是加载的,我们只需要指定目录collector.textfile.directory

启用 system 收集器
采用collector.systemd.unit whitelist =“.+“ ,使用正则表达式

运行节点导出器
默认监听端口9100
nohup node_exporter --collector.textfile.directory /var/lib/node_exporter/textfile_collector --collector.systemd --collector.systemd.unit-whitelist="(docker|sshd|rsyslog).service" > node_exporter.out 2>&1 &

root@server03:~# netstat -antpl | grep 9100
tcp6       0      0 :::9100                 :::*                    LISTEN      74704/node_exporter


mkdir -p /var/lib/node_exporter/textfile_collector

echo 'metadata{role="docker_server",datacenter ="NJ"} 1' | tee /var/lib/node_exporter/textfile_collector/metadata.prom

启动
nohup node_exporter --collector.textfile.directory /var/lib/node_exporter/textfile_collector --collector.systemd --collector.systemd.unit-whitelist="(docker|sshd|rsyslog).service" > node_exporter.out 2>&1 &





![img](https://img-blog.csdnimg.cn/img_convert/b39bfd365f1686b1085accea4e74c29d.png)
![img](https://img-blog.csdnimg.cn/img_convert/c245f67ed11e7819d7cadbab2b013506.png)
![img](https://img-blog.csdnimg.cn/img_convert/cfeec10e5aa26bf819318aa83cf42185.png)

**既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上软件测试知识点,真正体系化!**

**由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新**

**[需要这份系统化的资料的朋友,可以戳这里获取](https://bbs.csdn.net/topics/618631832)**

,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新**

**[需要这份系统化的资料的朋友,可以戳这里获取](https://bbs.csdn.net/topics/618631832)**

  • 5
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值